## Description
This pull request adds `rotation` parameter to `cubyz:sbb` simple
structure with default value `.random` which allows specifying fixed or
randomized rotation for structures generated. Rotation for structure is
only propagate through the strcuture children only for vertical child
blocks. Additionally, a `rotation` parameter was added to structure
building block children definition to allow overriding / re-enabling
random rotation for children of strcuture. Default value for that
parameter is `inherit` which takes the rotation of parent (only for
vertical child blocks until interrupted). Valid values for rotation are
`0`, `90`, `180`, `270`, `random`, `inherit`, all accepted as a string,
numeric values also accepted as floats and integers.
## Links
Resolves: #1529
---------
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
- [x] Prototype
- [x] Remove old code
- [x] ~~Apply this form of dithering to other shaders as well (item
drop)~~ → old dither looks better for items and display model
- [x] Can we finally remove the dither seed?
- [x] Check performance impact → it's slightly (insignificantly) faster
even
This PR turns font unit per pixel (a "magic number") into actually
computed value. Previously the "font unit per pixel" is hardcoded as
float `4.0`, because `units_per_EM` field of unscii is 64, and default
font size is 16. If another font is loaded, layout will be corrupted by
invalid scaling of `glyphPositions`. Note that only transformation from
font unit to pixel is affected, no visual change is made, and width of
glyph(character) is not changed.
Related to: #1507closes#1533
I'm pretty sure that the rest of the moving into a comptime mod
interface can be done in a future pr
---------
Co-authored-by: Krzysztof Wiśniewski <argmaster.world@gmail.com>
Adds game design principles for Cubyz that we can follow.
This PR is a work in progress, so please chip in with feedback and
suggestions.
I am also not the best at wording; feel free to make suggestions to how
things are worded to make it easier to understand.
---------
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
## Description
This pull request adds `ToolTypeIndex` struct that behaves similarly to
`ModelIndex` and `BaseItemIndex` structs.
## Links
Related to: #1290
Related to: #1060
---------
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
- reduces allocator overhead (less items in the free list of each
buffer)
- reduces the chance to run out of fake GPU memory (we can now
effectively store 50% more faces than before)
- reduces the chance to run out of actual GPU memory
- reduces height of lag spikes of buffer resizes (but increases their
frequency)
- makes it more clear in which LOD (LOD1) the main memory bottlenecks
are
- reduces the occlusion culling lag (#1161) after disocclusion of parts
of the screen (roughly halving the impact).
It however does decrease the granularity of timing information, since I
can no longer look at the passes separately, but I think that's a fair
price to pay
- [x] cleanup
In the process I had to improve how the player inventory is handled,
which required adding an interface to externally load an inventory for
the inventory system.
This new interface is also relevant for block inventories, which is why
I would like you to review this @Argmaster
fixes#978
This will allow for Cubyz Dev Kit to install compiler without building
the project itself.
---------
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
Fixes#357
Stuff left to do
- [x] Make them more like branches
- [x] ~Make them rotate~ Fixed automatically by making them like
branches
- [x] ~Let them be chiseled like stairs?~ This will be a future pr
- [x] Automatic migration between old and new logs
---------
Co-authored-by: Carrie <carriecapp9@gmail.com>
## Descriptions
This pull request adds inline SBBs feature which allows blueprints to be
used directly (without SBB zon file) as child in other SBB files.
Blueprint used this way must not any child blocks on it's own.
To ensure that the feature works correctly some of the now redundant SBB
zon files were removed.
Current implementation generates SBB at runtime for each of the
blueprints that has 0 child blocks and doesn't have an SBB with same ID.
In the future the implementation could be changed to create SBBs on
demand, to avoid wasting memory on blueprints which are not used or use
SBB with different name, that is not critical tho (really small gains)
and requires #1499
## Links
Resolves: #1403
---------
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
- [x] Rotation (already merged)
- [x] basic GUI
- [x] sign models and textures
- [x] sign blocks
- [x] update the text on the client
- [x] Figure out block entity rendering
- [x] Render the text to a texture on update
- [x] Render the texture in the world in the location of the sign
- [x] Use varint instead of u32 for storing the block data lengths,
(now, while we can still change it)
- [x] Sync the text with the server and all clients
- [x] Figure out block entity storage on the server
- [x] Send the entity data of the initial chunk
- [x] Store the text on the server
- [x] Set the chunk as changed whenever a block entity data update
happens, so we actually store it
- [x] Disable or figure out optimized local chunk transmission
- [x] fix memory leak
- [x] Rethink some of the API (do we need onPlace/onBreak, when there is
unload and updateData?)
- [x] Remove the background shadow from text, it produces too much
aliasing
- [x] Figure out if the default should be black or white
- [x] Correctly center the text
- [x] Why are newlines not working?
- [x] Check if a deadlock is possible on deinit --- it would be possible
only if another thread has a reference to it, which should not be the
case when unload is called.
- [x] Set the text margin and sizes reasonably
- [x] Make sure the GUI fits with the sign width
- [x] Create an issue for configurable sign texture size and
configurable default color
fixes#367
---------
Co-authored-by: Carrie <122191047+careeoki@users.noreply.github.com>
Co-authored-by: OneAvargeCoder193 <85588535+OneAvargeCoder193@users.noreply.github.com>
## Description
This pull request merges `sbb` and `blueprint` directory trees into
single directory tree as discussed in #1403 searched twice, once to load
blueprint files, once to load sbb zon files.
## Links
Related to: #1403
Related to: #1408
## Description
This pull request adds a tool palette to allow using stable indexes for
binary storage.
## Links
Related to: #1290
Related to: #1478
Related to: #1473
## Description
This pull request moves all of the `common*` variables into `Assets`
struct.
As a bonus change `Managed` was special cased in
`refAllDeclsRecursiveExceptCImports` to avoid infinite recursion for
`*HashMap*` aliases.
## Links
Resolves: #1205Resolves: #1204
Related to: #1181