Download Core for FREE at bit.ly/Core-Tantan ^ I was actually surprised how quickly I could make the flower gun. (can now do it within 5min without any coding) It's just a matter of time till someone remakes Splatoon but with flowers in Core 😂 Also Bevy, Bevy, Bevy, Bevy!
C# i dont use game engine, C no classes, Cpp ugh memory, python too slow, js i don't whant a web app, java fvck oracle and jdk, Assambly too involved, basic limited graphics, yep i hate every language that exists...
I had a project where I tried to make a wrapper for pacman (the arch Linux package manager). While it taught me a lot and was fun, I was horrible in project management... The history: 1. Started it as a bash script 2. Switched to Python because bash argument parsing sucks 3. Decided to use a "database" of commands based structure which is parsed by an Python script 4. Realised json has no multiline support so I decided to use a python function returning a dictionary instead. 5. Had to still make a list of all my commands because I couldn't find a good way to feed my "database" into the argument parser 6. I Constantly switched between the database, the database parser and a Python logging library 7. Decided to add multiple command subvariations afterwards (like if the package database should be refreshed or not when this command is ran.) -> rewrote the entire parser and database 8. Realized the way my database was structured didn't allow a certain option > restructured database and parser 9. Repated step 8 at least 5 times 10. Temporally Forgot every good commenting practice I ever learned 11. Somehow managed to regularly forget to commit and named nearly all my commits "update" Ended up with a broken concept and code and a good logging library ... Looking back I am surprised it sometimes somewhat worked ... I probabatly gonna rewrite it in rust and use a real sqlite database instead
@@wumwum42 ahah, I did the exact same (pacman/apt wrapper), bash then Kotlin. Despite being much faster and convenient, the Kotlin version is so buggy that I just use the bash one on the daily
@@elzearcontelly2651 yes! recently, i wrote a live wallpaper utility for mac that downloaded video from yt and set it as live wallpaper in python. ate like 100 gigs of ram, wrote in go ate like 40 gigs of ram, 200 mb in rust, 30 in swift and then wrote simple bash script that all that, eats like 19 mb ram. shell is powerful than we realize.
Can't wait for more Rust tools like Bevy to push game dev forward. It feels like Rust has a lot of promising sprouts, just need to care for the ecosystem and turn it into a beautiful forest.
I'm way more excited by real programmers who know what they're doing doing awesome things than amateurs who think that Rust and some library will make them into a real gamedev.
@@shinobuoshino5066 Such a strawman argument. No one here thinks Rust and some library will make them "into a real gamedev". It is the exploration of tools that work that leads to progress. Also, there is no "real gamedev", sure one can be successful, but no one is perfect.
This video feels so well-timed. Yesterday was the first time I decided to really sit down and learn Rust. I decided I wanted to try to make a fluid simulation similar to one I had made using C++ back in college. Ended up using Bevy since I didn't want to deal with learning Rust *and* game design *and* [relearning] graphics programming all at the same time. So far the Bevy ECS has been mind-blowing from the perspective of a caveman OO programmer like myself.
Have you heard of Veloren? It is a CubeWorld-like game developed by community. Written in Rust too. Perhaps you will be interested in contributing to the Project too :)
Remaking is a great learning experience, but sometimes you need to ask yourself "do I want to be an engine developer, or a game developer .. or both!". I've gone down so many rabbit holes rewriting stuff (and learning!) but never finished any games due to running out of time and energy. Good luck and work hard my dude! Really love your content!
Inspired by some of your videos, I set about to make my own 3d engine in rust as my first major rust project (I just worked through the rust book and rustlings). It’s going terribly! I picked the wrong tutorial; it took literally > 500 lines of code to make a triangle appear on the screen with wgpu and I had no idea what was going on most of the time. Time to take a step back and find something simpler. I found a library called pixel-canvas and it seems more my speed for now.
Trust me I've been in the same boat. I can't count the amount of graphics programming tutorials I've done (more than 5 times). Take a step back, revisit later and eventually you'll start understanding what is going on! It took me quite some time
Bevy does look like a strong choice for building games in Rust. Previously I looked at other Rust-based engines/libraries. Amethyst was ambitious but difficult to get started with. I think Bevy really changed the game. At first the improvement over Amethyst seemed subtle - more like a pretty nice trick with Rust traits. But it was so powerful, and what you described here really brings that out. This architecture is really scalable. I really do want to know how the performance compared with Unity though. I find it amazing that Unity can perform as well as it does given how complicated the whole system is. A simpler engine built in Rust should be able to beat it in raw performance, because it doesn't yet carry all of the features.
ahhh yes, ECS in Rust ♥ got my first job working on that, learning rust at the same time as ECS for the backend, and making a the frontend in unity. it was very painful, ngl
7:00 Here's something I do: I make a function that is sort of a wrapper around the actual print function, and I do any debug mode checks I want in that. Then I just call that function.
Wow, I didn't know Bevy. I've been studying Unity and ECS for some time and getting totally disappointed. Now I really wanna try Bevy, it looks so cool! Thanks for the video!
Lasagna indeed! I'm learning so much about good code from you so thank you :) Hearing about the animation and world generation was really interesting, especially using the MIDI controller. BEVY seems to have a lot of promise as well which is awesome. Great stuff!
Not to denigrate your choice of bevy, which is by all accounts a really nice project, but there's nothing really wrong with passing lots of stuff to a function, or use a channel to send data to other functions... that seems like a strange reason to remake the whole game. If the sheer number of parameters bothers you, you can always tie them together into a struct. Also, making every kind of command an event seems to work pretty well in practice.
Personally I was wondering why the command couldn't just ask for a reference to a subsystem directly if it needs one instead of having to pass a reference to every single thing into it at once, that seems like a much better system imo
Love that chunk animation! Super interesting to heard about bevy and the builder structure you can use with it. This is sparked me thinking if I can utilise builders like this in my own engine.
Not gonna lie, in my current game im working on. My main script has over 500 lines of code and it handles all the racing systems and leaderboards. Thought it was really cool having a big boy script. Turns out thats really bad and is called spaghetti. I must now rewrite the game to have lazzanya (YEAH, IDK HOW TO SPELL IT AND IM NOT LOOKING IT UP)
I don't know why is Rust somewhat popular. I tried it briefly and I feel like it's easy to get started, and it turns into an absolute nightmare once you start using threads. Sometimes it's quite easy, sometimes it's barely possible. For example if you want process image by tiles or vertical scanline and it's in a single buffer. Or if you depend on some C library and you are not using Linux where libraries and headers are found in only few locations (/usr, /usr/local, ~/.local/, ...)
Because it is a language made to attract soydevs while at the same time removing them from communities like C and C++. Rust is literally best thing that has ever happened in my life, now I can peacefully work on my projects without idiots bothering me, because what I'm doing isn't a shiny new thing and so they go be somewhere else.
I'm new to game dev and have been doing research on different engines and such. I just wanted to make an observation and follow up with a question. Unity is apparently based on the ECS model. You said your code turned into spaghetti with Unity, so you left to go to Rust. Then you said your code turned into spaghetti with Rust. Now you've moved to Bevy, which uses the ECS model like Unity does. Just from observing, it seems like it has gone full 360. So some questions: Does Rust offer a benefit over Unity in terms of code organization (or as you put it, making lasagna)? If you had organized your code in a different/more organized way with Unity initially, would you have still moved to Rust anyways? Is it honestly more you just wanted to use Rust from the start, and that's why you're now using a Rust development stack over Unity? Just curious if it's a Unity problem to be on the lookout for, or a general code organizational issue, or if Rust is genuinely better suited for game development. Thanks!
Hey, I will just try to answer one of your questions, maybe Tantan can answer you later. I believe he left unity for x reasons, however I do not think the spaghetti was a major one, or maybe it was(?). If you are organized, you will ended up being organized in whatever language/framework/engine you choose. It comes down to time and experience, and how you like to structure your projects, so I guess that’s a personal thing
try 3d directionally weighted breadth first search in the voxel space, all pixels in once on the wave, with shadow marking, visible and shadow voxels, not rays or not raster
"I want to make my game now" I know the feeling with my own from scratch Rust engine. I am using the typical accessor(index)/storage(the data) approach. The farest I have come with ECS is the system part. Never got around making data storage work. I used Hecs but I rather write my own code. Soooo the index based way is a mess. All the way back to ECS it seems. I mean heck even Unity uses it now bot not Unreal for some reason.
Totally get the migration to an ECS, a bit confused about moving to a fledging game-engine with an integrated ECS over a standalone, but still.. makes sense.
The nice thing about bevy is that the lines between application code and engine code are very blurred. By default, you basically only get the ECS. Want to have rendering? add a RenderPlugin. Want audio? Add the AudioPlugin. Want a bunch of common engine stuff? Just add the DefaultPlugins.
I was actually first thinking about just integrating the ecs part of bevy into my own engine code. But as I was researching and exploring I realized I could make use of a lot of the bevy crates. Take the window code for example. It would make sense to have access to all of that through the Bevy eco system, instead of writing my own bevy plugin for that, bevy already has a plugin for that. The engine code is so nicely abstracted.
@@Tantandev I'm using raycasting (or raytracing idk the difference) to render my voxels, still a little buggy but I'm getting there, I really like this series and seeing the progression with your engine keep at it! :D
Amazing showcase - Bevy looks amazing, that said, have you tried looking into Unity's ECS?, And if so why did you end up going with Bevy? Was it the language, or something entirely else? :3 Additionally what was some of your hardships with using Bevy, and what did you really enjoy? :)
Very nice video! Did you try the Unity version of ECS in DOTS wit the job system and burst compiler? It's blazingly fast and works the same as in Bevy.
Have you considered moving the world-gen part to WGSL compute shader? I am now exploring that in my own project on the new bevy pipelined renderer (pipelined-rendering branch) and I have a great learning experience so far.
It might sound inefficient, but it boils down to reduce cache misses. If you have very small components and you process lots of the same component type at the same time you reduce cache misses. That is the essence of every data driven architectures like ecs. In most ecs systems there isn‘t even a entity class, it is merely an id. So the systems don’t even care about entities, it is all about components. A sound system only iterates over sound components, a physic system only over collisionvolume components, … . No entities here.
2:30 is almost exactly how my console window works in my game lol. The only difference is there are a few singletons that drive the core stuff. It's not great, but your project is larger than mine.
Ha ha! There'll be a fourth. :D When you realise that Bevy can't do something, you'll fork it and start another project. I'd be interested to hear your thoughts on the drawbacks of an ECS architecture. I've found (not from Unity, in a past life of doing algorithms with the pattern) that it when your app/game grows then it is difficult to debug individual behaviours or features (collection of components) because a feature is usually made from a number of different components. I used to find I had 10-15 components to do something I would normally have done in a single class. Also, IIRC, the ordering of components is really important and adding a new component in the middle of a stack can cause all sorts of weird behaviours. Great video, very enjoyable. I'm a big fan of Rust, it's a pity I don't use it for much. 😁
Oh and the OO pattern you needed for the console was a combination of the command pattern and the decorator. The things you want to run commands on (world gen) get a decorator that adds a command, giving it a reference. On run, each command registers itself with the console.
That’s a risk anytime you use a lot of method chaining, but there are definitely ways to mitigate that risk. One way is to ensure that each method checks for valid parameters, ensuring that you don’t make the configuration invalid. In C#, I wrap some of this code in a region so that it only runs during development and doesn’t impact production performance. I assume there is a Rust-idiomatic way to accomplish the same thing. Another thing that helps is ensuring that you implement chains only where they make sense-e.g., you shouldn’t have an arbitrary chain of methods where the order matters. One pattern I like to use is having a single “pipeline” method chain that is well-commented and has a single method for each well-defined “stage”. The actual work is done in methods executed within one of the stage methods. The rule for stage methods is that they have to be valid regardless of execution order. This pattern isolates the order-dependent sections of the architecture, while also making it easier to do instrumentation (since pipeline performance is all measured in the same place), and also providing great modularity if you want to swap out code that handles some part of the pipeline.
@@DanKaschel thanks for the tips! I was thinking about ECS in particular, where you attach your components into systems. Regardless of language, the order is important because all mutable code is a component.
Still kind of new to rust, so I have a question: does the "query" parameter at 6:00 need to be mutable? You are not assigning a new value to it, but you are modifying the entities it has references to. Hm....
you know what, that's something I've never bothered to investigate myself because I TO find it odd. I believe I found the answer: The query we receive is owned by our function, it's not a reference to a query, we are passed ownership to a query. We own the query but it's not mutable, unless we specify mut before. (why does the query need to be mutable, when we are mutating data not owned by the query, but received through the query?) BECAUSE! the query.iter_mut() is defined as this: pub fn iter_mut( *&mut self* ) -> QueryIter { iter_mut function only works if the query we are using is mutable. Now the reason why they did that with the api... is another question in itself I don't have time to investigate :P
You're as good as the likes of aarthificial and Kaos Rio! I'm subbed (: (also yeah I guess this can also be a recommendation for their channels, they're awesome)
Great video! By the way, has anyone already told you that "tantan" in Brazilian Portuguese (northeastern states, for the most part) is the equivalent slang for "cuckoo" in English? 😁
it happens with unit cause you need to call every script individualy every time you make a new script that needs to interact with another so it has repeatitive actions that messes with where real code begins and where calling finishes I tried to do a simple tps with aiming and ı needed to can 7 diffrent scripts just to chance state so in unity it wastes time so ı tried godot now ı have tpa character simple enemy and saving system in a week it took me to understand that tps in unity but godots coding language is stream lined so you can just say if ray hits activate hurt function in stead of creating 5 instances to get that working.
Have you been able to reuse part of the code between rewrites or just the knowledge within your brain? // this was asked before 3 min in the video. At 9 min I got my answer. :) Keep it up! It's great to hear your experiences! Also, did you have any experience with godot? Thank you for the reports from the front!
I think a better way to do the chunk spawn/despawn animation is to animate the maximum block height, rather than transforming everything... Maybe animate the height of each block level with a ramp so that the topmost blocks animate up simultaneously.
I'm not sure if transforming everything is easier to implement, but if it is, there's no reason to change it until you do a benchmark that shows it to noticeably slow down the game. Without a benchmark it's premature optimisation
Download Core for FREE at bit.ly/Core-Tantan
^ I was actually surprised how quickly I could make the flower gun. (can now do it within 5min without any coding)
It's just a matter of time till someone remakes Splatoon but with flowers in Core 😂
Also Bevy, Bevy, Bevy, Bevy!
C# i dont use game engine, C no classes, Cpp ugh memory, python too slow, js i don't whant a web app, java fvck oracle and jdk, Assambly too involved, basic limited graphics, yep i hate every language that exists...
@@amosnimos you didnt even mention rust!?!?!!
@@cub1cc exactly
Remaking a project because of a single obstacle is probably the most relatable thing ever
I had a project where I tried to make a wrapper for pacman (the arch Linux package manager).
While it taught me a lot and was fun, I was horrible in project management...
The history:
1. Started it as a bash script
2. Switched to Python because bash argument parsing sucks
3. Decided to use a "database" of commands based structure which is parsed by an Python script
4. Realised json has no multiline support so I decided to use a python function returning a dictionary instead.
5. Had to still make a list of all my commands because I couldn't find a good way to feed my "database" into the argument parser
6. I Constantly switched between the database, the database parser and a Python logging library
7. Decided to add multiple command subvariations afterwards (like if the package database should be refreshed or not when this command is ran.) -> rewrote the entire parser and database
8. Realized the way my database was structured didn't allow a certain option > restructured database and parser
9. Repated step 8 at least 5 times
10. Temporally Forgot every good commenting practice I ever learned
11. Somehow managed to regularly forget to commit and named nearly all my commits "update"
Ended up with a broken concept and code and a good logging library ...
Looking back I am surprised it sometimes somewhat worked ...
I probabatly gonna rewrite it in rust and use a real sqlite database instead
@@wumwum42 ahah, I did the exact same (pacman/apt wrapper), bash then Kotlin. Despite being much faster and convenient, the Kotlin version is so buggy that I just use the bash one on the daily
haha yes
@@elzearcontelly2651 yes! recently, i wrote a live wallpaper utility for mac that downloaded video from yt and set it as live wallpaper in python. ate like 100 gigs of ram, wrote in go ate like 40 gigs of ram, 200 mb in rust, 30 in swift and then wrote simple bash script that all that, eats like 19 mb ram. shell is powerful than we realize.
finishing that project tho lowkey is actually satisfying asf
Can't wait for more Rust tools like Bevy to push game dev forward. It feels like Rust has a lot of promising sprouts, just need to care for the ecosystem and turn it into a beautiful forest.
im way more excited by bevy than amethyst
I'm way more excited by real programmers who know what they're doing doing awesome things than amateurs who think that Rust and some library will make them into a real gamedev.
@@shinobuoshino5066 Agreed - Rust won't make your programs better, being a better programmer will make your programs better.
@@shinobuoshino5066 Such a strawman argument. No one here thinks Rust and some library will make them "into a real gamedev". It is the exploration of tools that work that leads to progress. Also, there is no "real gamedev", sure one can be successful, but no one is perfect.
One of the best ways to learn is repetition and trying new things , so remaking the game again in an engine is just giving you experience 😁👍
@@RozMazov lmao
looking forward to the next video when you move it to VBScript!
Oh hi jdh GO BACK WORK ON THE WIRING (jk)
This video feels so well-timed. Yesterday was the first time I decided to really sit down and learn Rust. I decided I wanted to try to make a fluid simulation similar to one I had made using C++ back in college. Ended up using Bevy since I didn't want to deal with learning Rust *and* game design *and* [relearning] graphics programming all at the same time. So far the Bevy ECS has been mind-blowing from the perspective of a caveman OO programmer like myself.
Have you heard of Veloren? It is a CubeWorld-like game developed by community. Written in Rust too. Perhaps you will be interested in contributing to the Project too :)
I can relate to this a lot! Don't think I've ever managed to do project where I got the code architecture right the first time 😅
Remaking is a great learning experience, but sometimes you need to ask yourself "do I want to be an engine developer, or a game developer .. or both!". I've gone down so many rabbit holes rewriting stuff (and learning!) but never finished any games due to running out of time and energy. Good luck and work hard my dude! Really love your content!
Inspired by some of your videos, I set about to make my own 3d engine in rust as my first major rust project (I just worked through the rust book and rustlings).
It’s going terribly! I picked the wrong tutorial; it took literally > 500 lines of code to make a triangle appear on the screen with wgpu and I had no idea what was going on most of the time.
Time to take a step back and find something simpler. I found a library called pixel-canvas and it seems more my speed for now.
Trust me I've been in the same boat.
I can't count the amount of graphics programming tutorials I've done (more than 5 times).
Take a step back, revisit later and eventually you'll start understanding what is going on!
It took me quite some time
as a wise men said: 3 times a charm
the project is looking beautiful.
Can't wait to see a full version
Rust is always been my favourite programming language ❤️
That animation looks nice👌
Also, that Bevy API looks very cache friendly, I need to look into it, thanks
Bevy does look like a strong choice for building games in Rust. Previously I looked at other Rust-based engines/libraries. Amethyst was ambitious but difficult to get started with. I think Bevy really changed the game. At first the improvement over Amethyst seemed subtle - more like a pretty nice trick with Rust traits. But it was so powerful, and what you described here really brings that out. This architecture is really scalable.
I really do want to know how the performance compared with Unity though. I find it amazing that Unity can perform as well as it does given how complicated the whole system is. A simpler engine built in Rust should be able to beat it in raw performance, because it doesn't yet carry all of the features.
ahhh yes, ECS in Rust ♥
got my first job working on that, learning rust at the same time as ECS for the backend, and making a the frontend in unity. it was very painful, ngl
7:00 Here's something I do: I make a function that is sort of a wrapper around the actual print function, and I do any debug mode checks I want in that. Then I just call that function.
Wow, I didn't know Bevy. I've been studying Unity and ECS for some time and getting totally disappointed. Now I really wanna try Bevy, it looks so cool!
Thanks for the video!
Lasagna indeed! I'm learning so much about good code from you so thank you :) Hearing about the animation and world generation was really interesting, especially using the MIDI controller. BEVY seems to have a lot of promise as well which is awesome. Great stuff!
Not to denigrate your choice of bevy, which is by all accounts a really nice project, but there's nothing really wrong with passing lots of stuff to a function, or use a channel to send data to other functions... that seems like a strange reason to remake the whole game. If the sheer number of parameters bothers you, you can always tie them together into a struct.
Also, making every kind of command an event seems to work pretty well in practice.
Personally I was wondering why the command couldn't just ask for a reference to a subsystem directly if it needs one instead of having to pass a reference to every single thing into it at once, that seems like a much better system imo
Love that chunk animation!
Super interesting to heard about bevy and the builder structure you can use with it. This is sparked me thinking if I can utilise builders like this in my own engine.
no no, 4th time is a charm. I can imagine you can archive same thing using godot-godex or voxel engine plugins more like in 2 days. great video.
Not gonna lie, in my current game im working on. My main script has over 500 lines of code and it handles all the racing systems and leaderboards. Thought it was really cool having a big boy script. Turns out thats really bad and is called spaghetti. I must now rewrite the game to have lazzanya (YEAH, IDK HOW TO SPELL IT AND IM NOT LOOKING IT UP)
I don't know why is Rust somewhat popular. I tried it briefly and I feel like it's easy to get started, and it turns into an absolute nightmare once you start using threads. Sometimes it's quite easy, sometimes it's barely possible. For example if you want process image by tiles or vertical scanline and it's in a single buffer. Or if you depend on some C library and you are not using Linux where libraries and headers are found in only few locations (/usr, /usr/local, ~/.local/, ...)
Because it is a language made to attract soydevs while at the same time removing them from communities like C and C++.
Rust is literally best thing that has ever happened in my life, now I can peacefully work on my projects without idiots bothering me, because what I'm doing isn't a shiny new thing and so they go be somewhere else.
Bevy, Bevy, Bevy!
I'm new to game dev and have been doing research on different engines and such. I just wanted to make an observation and follow up with a question. Unity is apparently based on the ECS model. You said your code turned into spaghetti with Unity, so you left to go to Rust. Then you said your code turned into spaghetti with Rust. Now you've moved to Bevy, which uses the ECS model like Unity does. Just from observing, it seems like it has gone full 360. So some questions:
Does Rust offer a benefit over Unity in terms of code organization (or as you put it, making lasagna)?
If you had organized your code in a different/more organized way with Unity initially, would you have still moved to Rust anyways?
Is it honestly more you just wanted to use Rust from the start, and that's why you're now using a Rust development stack over Unity?
Just curious if it's a Unity problem to be on the lookout for, or a general code organizational issue, or if Rust is genuinely better suited for game development.
Thanks!
Hey, I will just try to answer one of your questions, maybe Tantan can answer you later.
I believe he left unity for x reasons, however I do not think the spaghetti was a major one, or maybe it was(?).
If you are organized, you will ended up being organized in whatever language/framework/engine you choose. It comes down to time and experience, and how you like to structure your projects, so I guess that’s a personal thing
I am not sure whether Unity fully supports ECS already either. And it's still C# so with GC
Your bevy song from your first bevy video was a complete banger. It wouldn't hurt to get a longer version... ;)))))
omg, I am already very excited about Rust and writing it but your energy is enthralling. :D more please! :)
4:49 shows screen flickering on your secondary monitor, consider a high quality replacement to reduce eye fatigue
try 3d directionally weighted breadth first search in the voxel space, all pixels in once on the wave, with shadow marking, visible and shadow voxels, not rays or not raster
kinda raster but not
Bevy seems really cool! I'm only trying to use Macroquad right now, but will check it out in the future :)
You should check Veloren if you haven't already, an open source CW-like, made in Rust
"We are not trying to make spaghetti, we are trying to make lasanja" - Tantan 2021
Haha Lasanja
"I want to make my game now" I know the feeling with my own from scratch Rust engine. I am using the typical accessor(index)/storage(the data) approach. The farest I have come with ECS is the system part. Never got around making data storage work. I used Hecs but I rather write my own code. Soooo the index based way is a mess. All the way back to ECS it seems. I mean heck even Unity uses it now bot not Unreal for some reason.
Totally get the migration to an ECS, a bit confused about moving to a fledging game-engine with an integrated ECS over a standalone, but still.. makes sense.
The nice thing about bevy is that the lines between application code and engine code are very blurred. By default, you basically only get the ECS. Want to have rendering? add a RenderPlugin. Want audio? Add the AudioPlugin. Want a bunch of common engine stuff? Just add the DefaultPlugins.
I was actually first thinking about just integrating the ecs part of bevy into my own engine code.
But as I was researching and exploring I realized I could make use of a lot of the bevy crates.
Take the window code for example. It would make sense to have access to all of that through the Bevy eco system, instead of writing my own bevy plugin for that, bevy already has a plugin for that.
The engine code is so nicely abstracted.
Holy C.
The based programming language
I too am making a voxel engine from scratch, although I'm not using polygons for the rendering.
That sounds super interesting!
Might be a future interest exploring more rendering technuiques
@@Tantandev I'm using raycasting (or raytracing idk the difference) to render my voxels, still a little buggy but I'm getting there, I really like this series and seeing the progression with your engine keep at it! :D
well now I want to drop unity for bevy this looks great
im pretty sure bevys basically using singletons too tho
Amazing showcase - Bevy looks amazing, that said, have you tried looking into Unity's ECS?, And if so why did you end up going with Bevy? Was it the language, or something entirely else? :3
Additionally what was some of your hardships with using Bevy, and what did you really enjoy? :)
Well, he wanted to use Rust, and Bevy is a Rust engine. Unity is not.
We need a ~~Disney Princess that writes a~~ Deterministic Event-Sourced Minecraft with Time-Travel (-based debugging & netcode).
This guy is just making Veloren from scratch.
Never forget @Tantan. We are calling each approach a remade. Professionals just call it: It's the next iteration :D
Dropping unity was a blessing in disguise huh
Open source is the way
You are definitely the Brackeys of Bevy !
Brackeys seems like he might become the Brackeys of Godot himself based on his Twitter lol
@@st.altair4936Yep: right on!
Very nice video! Did you try the Unity version of ECS in DOTS wit the job system and burst compiler? It's blazingly fast and works the same as in Bevy.
I know this pain bro, last summer i made game for olc CodeJam and now i'm re-writing it like second time.
You're going over the same stuff that I had with Voxel stuff in the past, but actually committing to it unlike me
It's amazing how the new simplified API made this video look dated. It has come a long way and an editor is on the way
Have you considered moving the world-gen part to WGSL compute shader? I am now exploring that in my own project on the new bevy pipelined renderer (pipelined-rendering branch) and I have a great learning experience so far.
I'm curious if he knows that Veloren exists.
So every game tick, the game goes through EVERY component of EVERY entity ?!!!!
It might sound inefficient, but it boils down to reduce cache misses. If you have very small components and you process lots of the same component type at the same time you reduce cache misses. That is the essence of every data driven architectures like ecs. In most ecs systems there isn‘t even a entity class, it is merely an id. So the systems don’t even care about entities, it is all about components. A sound system only iterates over sound components, a physic system only over collisionvolume components, … . No entities here.
Later : I would like some speed, so I decide to write my game again from Scratch in C
Rust is for all intents and purposes, as fast as C
2:30 is almost exactly how my console window works in my game lol. The only difference is there are a few singletons that drive the core stuff. It's not great, but your project is larger than mine.
technically you only remade it twice. the first time you actually made the game
"off by one" error
@2:41 yes. i want to make more lasagna. i keep getting forced to make spaghetti tho :(
This is super cool! :D I also had that problem with Unity, where everything would just be spaghetti and I couldn't do anything XD
Ha ha! There'll be a fourth. :D When you realise that Bevy can't do something, you'll fork it and start another project.
I'd be interested to hear your thoughts on the drawbacks of an ECS architecture. I've found (not from Unity, in a past life of doing algorithms with the pattern) that it when your app/game grows then it is difficult to debug individual behaviours or features (collection of components) because a feature is usually made from a number of different components. I used to find I had 10-15 components to do something I would normally have done in a single class. Also, IIRC, the ordering of components is really important and adding a new component in the middle of a stack can cause all sorts of weird behaviours.
Great video, very enjoyable. I'm a big fan of Rust, it's a pity I don't use it for much. 😁
Oh and the OO pattern you needed for the console was a combination of the command pattern and the decorator. The things you want to run commands on (world gen) get a decorator that adds a command, giving it a reference. On run, each command registers itself with the console.
That’s a risk anytime you use a lot of method chaining, but there are definitely ways to mitigate that risk. One way is to ensure that each method checks for valid parameters, ensuring that you don’t make the configuration invalid. In C#, I wrap some of this code in a region so that it only runs during development and doesn’t impact production performance. I assume there is a Rust-idiomatic way to accomplish the same thing.
Another thing that helps is ensuring that you implement chains only where they make sense-e.g., you shouldn’t have an arbitrary chain of methods where the order matters. One pattern I like to use is having a single “pipeline” method chain that is well-commented and has a single method for each well-defined “stage”. The actual work is done in methods executed within one of the stage methods. The rule for stage methods is that they have to be valid regardless of execution order. This pattern isolates the order-dependent sections of the architecture, while also making it easier to do instrumentation (since pipeline performance is all measured in the same place), and also providing great modularity if you want to swap out code that handles some part of the pipeline.
@@DanKaschel thanks for the tips! I was thinking about ECS in particular, where you attach your components into systems. Regardless of language, the order is important because all mutable code is a component.
2:37 I would put all these things into a struct, and supply that single struct instead.
Is this the singelton you complained about a few seconds later?
Boom! A bevy bevy bevy.
I had to refactor an old project to fit a new one I'm making and oh god managing project structure has to be the most tedious thing of all time
Still kind of new to rust, so I have a question: does the "query" parameter at 6:00 need to be mutable? You are not assigning a new value to it, but you are modifying the entities it has references to. Hm....
you know what, that's something I've never bothered to investigate myself because I TO find it odd.
I believe I found the answer:
The query we receive is owned by our function, it's not a reference to a query, we are passed ownership to a query.
We own the query but it's not mutable, unless we specify mut before.
(why does the query need to be mutable, when we are mutating data not owned by the query, but received through the query?)
BECAUSE! the query.iter_mut() is defined as this:
pub fn iter_mut( *&mut self* ) -> QueryIter {
iter_mut function only works if the query we are using is mutable.
Now the reason why they did that with the api... is another question in itself I don't have time to investigate :P
@@TantandevDoes the non-mut variant enable parallelism?
i will wait for a more mature and stable version of bevy, but there a lot of potencial here
boom a bevy bevy bevy
"This is a lasagna!" - Garfield
Welcome to bevy community! :D
Hey, hey!
...
Singleton.
there is already a voxel game called veloren made in rust wgpu-rs
You're as good as the likes of aarthificial and Kaos Rio! I'm subbed (:
(also yeah I guess this can also be a recommendation for their channels, they're awesome)
Yay new devlog
Don't singletons usually solve spagehtti rather create it?
Great video!
By the way, has anyone already told you that "tantan" in Brazilian Portuguese (northeastern states, for the most part) is the equivalent slang for "cuckoo" in English? 😁
Wow, it's inspiring. And I see Rust pretty good! BTW, what VS code Color theme do you use?
Theme is called: one monokai.
I'm surprised at how many people ask about the theme, I really like it :)
This is a lesson in proper planning, if anything.
What editor and theme are you using? It looks really good :D
The main thing holding me back from creating right now is that im just empty of ideas.
Hey! it is cooool!! did you all the stuff do in RUST? amazing!!
Godot v4 for the win! Using the alpha and it's amazing.
You switched to Bevy too!!
I was fed up with unity and I think I might have found a game engine to try.
remaking the same project in multiple language is like benchmarking
well, bevy have skeletal animations now so that's *neat*
When there is no finish line we bound to chase our tail again and again.
Unity now has ECS 1.0 :) Aaaand switching engines in 3,2,1 GO
BEVY
it happens with unit cause you need to call every script individualy every time you make a new script that needs to interact with another so it has repeatitive actions that messes with where real code begins and where calling finishes I tried to do a simple tps with aiming and ı needed to can 7 diffrent scripts just to chance state so in unity it wastes time so ı tried godot now ı have tpa character simple enemy and saving system in a week it took me to understand that tps in unity but godots coding language is stream lined so you can just say if ray hits activate hurt function in stead of creating 5 instances to get that working.
Unreal Engine is actually good for managing code when things turn complex
But it uses old language that's not shiny new thing therefore bad albeit?
Have you been able to reuse part of the code between rewrites or just the knowledge within your brain? // this was asked before 3 min in the video. At 9 min I got my answer. :)
Keep it up! It's great to hear your experiences!
Also, did you have any experience with godot?
Thank you for the reports from the front!
Bevy = lasagne birb
Heath ledger making videogames
its almost like airshiper
Is this still the best game for such a project? Would a minecraft game with the pixel uvs like in minecraft be the same choice?
Do you make your own music for the videos?
me: yeah i just don't know if starting from scratch is wort-
tantan: humongous lasagna
me: i'm listening...
i wish you the best at making your game
kinda hate the chunk loading animation but cool video!
I made the exact same decision after searching trying to research which ecs to use. Bevy seems nice, really looking forward to vids :D
I think a better way to do the chunk spawn/despawn animation is to animate the maximum block height, rather than transforming everything... Maybe animate the height of each block level with a ramp so that the topmost blocks animate up simultaneously.
I'm not sure if transforming everything is easier to implement, but if it is, there's no reason to change it until you do a benchmark that shows it to noticeably slow down the game. Without a benchmark it's premature optimisation
@@xGOKOPx not a performance thing, it just looks goofy the way it is.
I adore bevy
dude we got the same keyboard and light it the same way wtf haha
awesome video!