How to code PONG w/ Rust and Geese
19:14
Пікірлер
@DoanythingpirayeOkke
@DoanythingpirayeOkke 2 күн бұрын
i saw that map in teardown
@michaelschlachter8865
@michaelschlachter8865 5 күн бұрын
This is fantastic. Really appreciate the deliberate and detailed explanations.
@DreamaxeOfficiel
@DreamaxeOfficiel 12 күн бұрын
How do you handle hot reloading of wasm ?
@Gameout50
@Gameout50 17 күн бұрын
11:00 that actually looks amazing.
@LyrelGaming
@LyrelGaming 27 күн бұрын
What a great explanation! Was looking for exactly this. Would love to see more of optimization tricks / rendering techniques
@FrankHarwald
@FrankHarwald Ай бұрын
One thing: importance sampling is still beneficial even for an optimized path tracer, because even if you don't need to increase the number of rays anymore, importance sampling also increases the quality of the resulting image for the same number of rays (by further lowering its signal-to-noise ration) - especially in dimly lit areas. This means you might lower the amount of filtering/blurring without getting the image to become all noisy again. One problem which importance sampling has & will probably also be true here is that it has trouble getting high variance spikes of indirect light right, meaning to get this to look noise-free you'll either have to blur at least the overly sharp indirect scattering coefficients making reflections & refractions look a little more blurred or using a hybrid approach to only use importance adjusted random sampling only for direct light & broader lobes of the BRDF while for sharper spikes of the BRDF to fall back to the old method of uniformly sample them. (Not: does your engine even supposed to support reflections / refractions at this point? Because if not then this issue with sharp variance spikes of indirect light won't be an issue itfp)
@FrankHarwald
@FrankHarwald Ай бұрын
10:30 Note: this isn't necessarily the case if you're using a regular grid but the shape of the higher resolution voxels of an object might have a very long diagonal shape on screen so that it lies entirely between all of the horizontal & vertical coarse grid voxels - but this depends on the shape that the voxels of high-res objects can have.
@HiHi-iu8gf
@HiHi-iu8gf Ай бұрын
neat optimisation
@thegameengineblueprint
@thegameengineblueprint Ай бұрын
Hi, thanks for making the video! I was wondering in 2d do you only ever have to check corners with all other voxels? And do you do continuous collision detection, I saw it was mentioned in the Teardown talk but Denis didn't expand on it. Just checking if you knew more about it?
@smangalang
@smangalang Ай бұрын
what did you end up doing to check if a chunk of voxels becomes disconnected to the environment?
@DouglasDwyer
@DouglasDwyer Ай бұрын
That's a great question. Indeed, I use a version of flood-fill/depth first search to find groups of voxels that aren't touching anything else. (The flood-fill algorithm is highly optimized to work with a custom binary voxel data structure.)
@smangalang
@smangalang Ай бұрын
@@DouglasDwyer thanks for the response. do you run this every time there is a change to the voxel occupancy bitmask thing? and how do you choose which voxel to use as the seed for the flood fill algo?
@DouglasDwyer
@DouglasDwyer Ай бұрын
@@smangalang Yes, the algorithm is re-run for all user edits. Regarding a seed, the flood-fill algorithm involves multiple searches, so it can categorize every single connected component within the edited region. As such, the flood-fill algorithm is repeatedly run using a new voxel as the seed until all voxels in the edited region have been detected.
@smangalang
@smangalang Ай бұрын
@@DouglasDwyer neat! thank you
@FrankHarwald
@FrankHarwald Ай бұрын
Nice, but keep an eye out on the memory consumption of the loaded voxel scene for large maps - large detailed volumetric maps can easily eat more system memory than any system can handle if stored naively without any kind of deduplication (object instantiation) or sparsification/compression of the assets.
@EngineeringKa14
@EngineeringKa14 Ай бұрын
Do you use floodfill to convert floating chunks into rigid bodies?
@DouglasDwyer
@DouglasDwyer Ай бұрын
That's a great question. Indeed, I use a version of flood-fill/depth first search to find groups of voxels that aren't touching anything else. (The flood-fill algorithm is highly optimized to work with a custom binary voxel data structure.)
@markusangrignon5758
@markusangrignon5758 Ай бұрын
Please never stop! This is amazing.
@Paloma1337
@Paloma1337 Ай бұрын
so how do you get the color weighting if you don't know the order of the objects? Distance to the camera is the same as ordering of objects, no?
@tristotech
@tristotech Ай бұрын
Cool! First of all, its a moddable game. The second one its WASM game
@robinmattheussen2395
@robinmattheussen2395 Ай бұрын
Very cool! I was just wondering if you happened to make use of the Parry or Rapier crates when implementing this, and if so, how did that work out for you?
@DouglasDwyer
@DouglasDwyer Ай бұрын
@@robinmattheussen2395 nope! While off-the-shelf physics engines can be handy, they're not that useful for large-scale voxel engines since for performance all of the collision detection needs to be custom anyway. As such, I can't comment on those crates :)
@robinmattheussen2395
@robinmattheussen2395 Ай бұрын
@DouglasDwyer Understandable, I was just curious. Still, really impressive stuff man!
@voxoking32
@voxoking32 Ай бұрын
I love you douglas
@lkjh161
@lkjh161 Ай бұрын
Dude, how do you update the svo? It's supposed to be static. I'm trying to build my svo game engine
@m4rt_
@m4rt_ 2 ай бұрын
Have you looked at GJK/EPA? (Casey Muratori has a good video explaining GJK, both in his "Papers I Have Loved" talk, and his old video "Implementing GJK" where the former talks about it in more general terms, and the latter goes more into the details of how it works. Also, Kuju has a good video visualizing and explaining GJK. GJK is the base collision detection, EPA figures out how much it is overlapping, etc.) With GJK you may end up having to test less verticies/edges, as 1. you just check the verticies and 2. you use some clever tricks to figure out which ones to check. And if you end up doing this, you could gather the edge verticies to make a collision mesh, and just do the GJK on those, rather than directly on each voxel. Though you may have to subdivide the mesh if it isn't convex, as it has to be convex to work.
@hatersgonnalovethis
@hatersgonnalovethis 2 ай бұрын
Have you seen Dawn Apart?
@luuk3656
@luuk3656 2 ай бұрын
This looks sick af i hope you'll make it vr compatible
@eliteengineer7340
@eliteengineer7340 2 ай бұрын
This man is literally making history
@noviui
@noviui 2 ай бұрын
What about opensource?
@MountainLabsYT
@MountainLabsYT 2 ай бұрын
Looks fabulous, Also your video quality has gone up substantially.
@MountainLabsYT
@MountainLabsYT 2 ай бұрын
Gosh 0:15 looks so satisfying.
@lennart25311
@lennart25311 2 ай бұрын
Can you make an in depth tutorial for the 2D version of the physics engine?
@VcSaJen
@VcSaJen 3 ай бұрын
I understand why it's like that, but still, "real" rotating and moving in the voxel world wouldn't involve rotation of voxels themselves (just like how pixels don't rotate and move on a 2D screen when 2D objects are rotated and moved).
@Harald723
@Harald723 3 ай бұрын
Can you make a toutorial for making mods?
@quetolical_5178
@quetolical_5178 3 ай бұрын
I absolutely love the per-voxel lighting. I can’t explain it but the specular highlights and sharp shadows give a really nostalgic feel. The GI adds just enough realism 😇
@haydennorris2913
@haydennorris2913 3 ай бұрын
Simulating soft body voxels i think is usually hardware intensive. Minute papers had a video about a paper where people trained AI to handle the physics and made it an order of magnitude faster while being a very convincing fake simulation.
@MountainLabsYT
@MountainLabsYT 3 ай бұрын
Awesome.
@TeltStory
@TeltStory 3 ай бұрын
I can't wait to use this as a voxel renderer in godot
@thHogBox
@thHogBox 3 ай бұрын
Need to support low end gpus, just knock the res to 480p haha
@PlayBASIC-Developer
@PlayBASIC-Developer 3 ай бұрын
The low res render looks very N64
@MrUbister
@MrUbister 3 ай бұрын
0:13 Idk why but that pixelated lens flare is so cute hahaha
@crytracker
@crytracker 3 ай бұрын
I think one of the coolest things about averaged normals per-voxel is that you get nice edge bevels on sharp objects basically for free
@cosmo9762
@cosmo9762 3 ай бұрын
This technique is amazing and so simple! I've just implemented this in my own engine and it looks very promising. Thank you!
@sambubu4195
@sambubu4195 3 ай бұрын
Very cool
@Gandalf_Le_Dev
@Gandalf_Le_Dev 3 ай бұрын
Quick question, how would you load assets such as new textures or models from a mod ?
@marc5137
@marc5137 3 ай бұрын
I'm working on building a modding system for Bevy. It's tough getting all the different parts working together, especially between wasm and the engine but very rewarding when it finally does. Great work!
@marceloferrante
@marceloferrante 3 ай бұрын
What about using lua for scripting?
@gsestream
@gsestream 3 ай бұрын
nice webassembly hijacked the wasm name, from a native assembly compiler, lol. also your engine works like unreal engine visual coding with the mods. kinda. yep the mods are like visual coding system. xbox controllers are used often on pc games too. how about party animals, gang beasts or human fall flat style of physics game. also 3d worms style landscape pixel destruction game. or just 3d destructive landscape shooter.
@felix8307
@felix8307 3 ай бұрын
is the engine/game itself written in rust?
@DouglasDwyer
@DouglasDwyer 3 ай бұрын
Yes, it's Rust all the way down :)
@felix8307
@felix8307 3 ай бұрын
@@DouglasDwyer thanks for taking your time to reply!
@dmitry-diehl
@dmitry-diehl 3 ай бұрын
Please, look at Voxtopolis game. It is amazing and author releases video about his new building system yesterday.
@JanoschNr1
@JanoschNr1 3 ай бұрын
Well duckless, I hope you find your duck! :D
@daveyboon9433
@daveyboon9433 3 ай бұрын
I'm loving it! Multi player would be something I would be interested in.
@TheJasonParser
@TheJasonParser 3 ай бұрын
This is one of the best voxel engine's I've ever seen. Probably not that fastest but wow, the compatibilities are insane. It's very well thought out.
@Raffa064
@Raffa064 3 ай бұрын
I've heard "dogless"