For reference: https://github.com/ziglang/zig/pull/24329
some commits have been extracted from #1583, but the x86_64 backend has
been disabled due to its horrible performance.
Remaining work:
- [x] Wait for official builds on ziglang.org and upload them to our
repository
- [x] Add workaround for https://github.com/ziglang/zig/pull/24466
- [x] Fix TODO comment about ANSI support in stdout
- [x] Check for compile-time performance changes → it went from 13.1 to
11.9 seconds 🎉
This is done by replacing all illegal file name characters with `-`. Unicode is still preserved because it doesn't seem to be a problem for modern file systems.
The idea of file name encoding/decoding is discarded, instead the name is just stored in the zon
fixes#606
* Format all the files
* Fix compilation error.
* The install scripts now patch render.zig from the zig standard library.
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update the formatter, it doesn't need to run on .zig files anymore.
* Update ci.yml
* Update ci.yml
* Add a mistake to check if it works
* IT WORKS!
Also make sure that another port is used and communicated correctly when the default port is already in use.
This allows opening multiple singleplayer worlds on the same computer.
fixes#605
* Changed the saveFolder function so that it does the correct command on windows
* Changed the saveFolder function so that it does the correct command on windows
* why
To let the rest of the code know about this decision I implemented a wrapper over the Allocator interface which cannot fail.
This is just the first step in the upcoming refactoring attempt.
Instead of one general purpose allocator per thread, there now is one stack allocator per thread, which behaves like a basic stack.
Using this allocator for all the trivial allocations, makes the game overall more efficient, even if some larger allocations now require going through the global allocator.
Maybe in the future the stack allocator could be extended with a temporary arena allocator functionality?
This should help with #171 by almost halfing the CPU usage of the receiving network thread. However the issue remains.
When I started to use zig, I mostly used `var`. But over time I adapted to using `const` where possible which is more readable and the compiler is currently optimizing it better.
Note: Requires running `zig fmt` in the mach subfolder to work.
Zig did some weird stuff there. Partially helpful, partially annoying. But it made me clean up some old code, so that's a good thing I guess.
It can now do a handshake (sort of).
I also added a CommandQueue for the gui system to prevent issues from closing windows while they are being updated.