How to code PONG w/ Rust and Geese
19:14
Пікірлер
@Izurak
@Izurak 17 сағат бұрын
Hey. Im working with voxels too. Maybe we could help eachother and create the best voxelengine there is together without having too much hybris. My approach has been physics, as I hear more and more people discouraging companies to focus on better graphics and instead focus on more systems. Ive finished implementing a working weather system based on real life mathematic models where for example a cycle can be created to form fog, fog turns to cloud and depending on the humidity and a bunch of other physics the cloud produces raindrops in forms of voxels. If the rest of the events are true, it can create storms, hurricanes and even tornadoes. Ive also gone for minkowski/GJK approach for collision but only if AABB cant handle it, its pretty cool. Ive taken a deeper look at materials such as corrosion and other aspects of how objects interact with other objects purely based on their physical and chemical properties. Im working with 1x1x1mm voxels too and Ive found a way to optimise it so it runs smooth and stable. I think itd be really cool to help eachother out.
@USBEN.
@USBEN. 3 күн бұрын
Can't wait to make some games with this.
@MajedyWajedy
@MajedyWajedy 7 күн бұрын
hey you seem to have alot of flickering going on i would recommend mip-mapping very simple and quick to implement but makes distant objects look much better and also improves visuals at lower resolutions by also lowering the actual texture resolution and averaging out colors
@onetwoval
@onetwoval 11 күн бұрын
hell yeah
@xXTrack394Xx
@xXTrack394Xx 13 күн бұрын
I wish I wasn't in grad school and could just spend all of my time making a beautiful game engine.
@Z0ctB0x
@Z0ctB0x 15 күн бұрын
this is pretty darn rad
@genocidoll
@genocidoll 22 күн бұрын
the fact u can run this on integrated and most modern software runs like shit even on good hardware is a good showcase of how hilariously horrendous software has become
@ChezSwiiz
@ChezSwiiz 25 күн бұрын
You might also render the snow generated by the server as falling on client before rendering it on the ground for an even better effect! Nice video as always!
@kieranjervis8590
@kieranjervis8590 Ай бұрын
Have you considered fluid simulations for this engine yet? Id be curious to see if you go with a pure voxel simulation like a 3d powder toy or a more minecrafty solution.
@darkstorm1432
@darkstorm1432 Ай бұрын
here's an idea if you throw something hard enought on the terrain or another object it could damage it , i know it's not simple to implement but it could be very funny. Love the video I hope to see more ^^
@spacetime2436
@spacetime2436 Ай бұрын
I found your videos as I was searching for optimizations to improve my own simple voxel game, and I am heavily thinking about switching over to ray marching. One thing I have always wondered about in your videos is how you are able to render objects not aligned to the grid, since your ray marching algorithms with their octrees and such seem like they should just work on grid aligned voxels. Also, I wonder how shadows work with these objects.
@RelentlessRage
@RelentlessRage Ай бұрын
Tell us you are alive
@DouglasDwyer
@DouglasDwyer Ай бұрын
@@RelentlessRage I am still alive and working on voxels :)
@RelentlessRage
@RelentlessRage Ай бұрын
@@DouglasDwyer YES, thank you! I was worried, glad that you are fine and well
@aryajpegasus
@aryajpegasus Ай бұрын
pleaaaase dark mode i beg 😢 my retinas are scorched
@usernameusernameusername12
@usernameusernameusername12 Ай бұрын
Looks like 3d Noita lol
@DoanythingpirayeOkke
@DoanythingpirayeOkke Ай бұрын
i saw that map in teardown
@michaelschlachter8865
@michaelschlachter8865 Ай бұрын
This is fantastic. Really appreciate the deliberate and detailed explanations.
@DreamaxeOfficiel
@DreamaxeOfficiel Ай бұрын
How do you handle hot reloading of wasm ?
@Gameout50
@Gameout50 Ай бұрын
11:00 that actually looks amazing.
@LyrelGaming
@LyrelGaming 2 ай бұрын
What a great explanation! Was looking for exactly this. Would love to see more of optimization tricks / rendering techniques
@FrankHarwald
@FrankHarwald 2 ай бұрын
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 2 ай бұрын
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 2 ай бұрын
neat optimisation
@build100apps
@build100apps 2 ай бұрын
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 2 ай бұрын
what did you end up doing to check if a chunk of voxels becomes disconnected to the environment?
@DouglasDwyer
@DouglasDwyer 2 ай бұрын
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 2 ай бұрын
@@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 2 ай бұрын
@@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 2 ай бұрын
@@DouglasDwyer neat! thank you
@FrankHarwald
@FrankHarwald 2 ай бұрын
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 2 ай бұрын
Do you use floodfill to convert floating chunks into rigid bodies?
@DouglasDwyer
@DouglasDwyer 2 ай бұрын
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 2 ай бұрын
Please never stop! This is amazing.
@Paloma1337
@Paloma1337 2 ай бұрын
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 3 ай бұрын
Cool! First of all, its a moddable game. The second one its WASM game
@robinmattheussen2395
@robinmattheussen2395 3 ай бұрын
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 3 ай бұрын
@@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 3 ай бұрын
@DouglasDwyer Understandable, I was just curious. Still, really impressive stuff man!
@voxoking32
@voxoking32 3 ай бұрын
I love you douglas
@lkjh161
@lkjh161 3 ай бұрын
Dude, how do you update the svo? It's supposed to be static. I'm trying to build my svo game engine
@m4rt_
@m4rt_ 3 ай бұрын
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 3 ай бұрын
Have you seen Dawn Apart?
@luuk3656
@luuk3656 3 ай бұрын
This looks sick af i hope you'll make it vr compatible
@eliteengineer7340
@eliteengineer7340 3 ай бұрын
This man is literally making history
@noviui
@noviui 3 ай бұрын
What about opensource?
@MountainLabsYT
@MountainLabsYT 3 ай бұрын
Looks fabulous, Also your video quality has gone up substantially.
@MountainLabsYT
@MountainLabsYT 3 ай бұрын
Gosh 0:15 looks so satisfying.
@lsgtm-11
@lsgtm-11 4 ай бұрын
Can you make an in depth tutorial for the 2D version of the physics engine?
@VcSaJen
@VcSaJen 4 ай бұрын
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 4 ай бұрын
Can you make a toutorial for making mods?
@quetolical_5178
@quetolical_5178 4 ай бұрын
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 4 ай бұрын
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 4 ай бұрын
Awesome.
@TeltStory
@TeltStory 4 ай бұрын
I can't wait to use this as a voxel renderer in godot
@thHogBox
@thHogBox 4 ай бұрын
Need to support low end gpus, just knock the res to 480p haha
@PlayBASIC-Developer
@PlayBASIC-Developer 4 ай бұрын
The low res render looks very N64