Comments (8)
Ok, after reading the Language changes in release v0.10.0 I was able to fix a couple of compilation errors, see commit 73d190f of my fork.
However, after running example "simple" I realized, there's still a lot of work to do. For me, it currently prints the following (obviously changed print format string to satisfy zig v0.10.0 compiler):
entity: 1, pos: (x = 10, y = 10), vel: (x = 15, y = 17)
---- resetting iter
I think the output should be something like this:
entity: 1, pos: Position{ .x = 1.0e+01, .y = 1.0e+01 }, vel: Velocity{ .x = 1.5e+01, .y = 1.7e+01 }
entity: 0, pos: Position{ .x = 0.0e+00, .y = 0.0e+00 }, vel: Velocity{ .x = 5.0e+00, .y = 7.0e+00 }
---- resetting iter
entity: 1, pos: Position{ .x = 2.5e+01, .y = 2.7e+01 }, vel: Velocity{ .x = 1.5e+01, .y = 1.7e+01 }
entity: 0, pos: Position{ .x = 5.0e+00, .y = 7.0e+00 }, vel: Velocity{ .x = 5.0e+00, .y = 7.0e+00 }
from zig-ecs.
Hi! I haven't actually updated to v0.10 for many of my libs. There was quite a storm of changes with functions all needing to be * const
and a slew of other changes. I was holding out until perhaps zig fmt
could do some of the fixing and I also feared that there were still a lot more breaking changes coming (local functions are on their way amongst other things).
That being said, it sounds like you are pretty close. If you do want to send in a PR I'll for sure pull it in. Looking at your fork nothing specifically stands out. It seems you got the * const
for all the fn
s and the unused vars. I'll give it a read after work fully and see if something pops out.
from zig-ecs.
Hey @prime31,
Hi! I haven't actually updated to v0.10 for many of my libs. There was quite a storm of changes with functions all needing to be * const and a slew of other changes. I was holding out until perhaps zig fmt could do some of the fixing and I also feared that there were still a lot more breaking changes coming (local functions are on their way amongst other things).
Yes you are right, there have been a ton of changes. The release notes for v0.10.0 are lengthy 😅
That being said, it sounds like you are pretty close. If you do want to send in a PR I'll for sure pull it in. Looking at your fork nothing specifically stands out. It seems you got the * const for all the fns and the unused vars. I'll give it a read after work fully and see if something pops out.
To be honest, I don't think I'm that close yet. There is still a lot of stuff broken (like Iterators). Also there are one or two compilation errors, that cause building the tests to fail.
Unfortunately, mit zig knowledge isn't really worth mentioning, so it could take some time to figure out what needs to be done 😅
Best regards
Stefan
from zig-ecs.
Hey @prime31,
I managed to fix a couple of errors. Also the Iterator
implementation in MultiView
should work now.
All tests seem to run successfully. And at least the simple
example now shows expected output:
entity: 1, pos: (x = 10, y = 10), vel: (x = 15, y = 17)
entity: 0, pos: (x = 0, y = 0), vel: (x = 5, y = 7)
---- resetting iter
entity: 1, pos: (x = 25, y = 27), vel: (x = 15, y = 17)
entity: 0, pos: (x = 5, y = 7), vel: (x = 5, y = 7)
If you could review my latest commits, I'd be more than happy :)
EDIT: Latest fixes also work for zig compiler v0.10.1
. I think upgrading to zig compiler v0.11.0-dev
is only a matter of updating the build.zig
.
Best regards
Stefan
from zig-ecs.
Ok, I upgraded to zig v0.11.0-dev.1580+a5b34a61a
and fixed some compilation errors in this commit.
So it is now compatible with zig v0.11.0
.
Best regards
Stefan
from zig-ecs.
That all looks good to me!
from zig-ecs.
Great! I'll create a PR for this ;)
from zig-ecs.
Hey @prime31, thanks for the merge. This issue resolved now :)
from zig-ecs.
Related Issues (8)
- add zig topic to repo HOT 1
- Basisc Groups don't have an `each` method HOT 1
- panic: cast causes pointer to be null when creating an OwningGroup without entities
- Unable to create an Owning Group with no include and no excludinig components. HOT 1
- Missing license HOT 2
- Using two groups at the same time
- C ABI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zig-ecs.