I remember being blown away with delta force because there was no pop in and you could zoom forever. Felt like the future!
@PlasticCogLiquid10 ай бұрын
It still works too, I still play the first 3 games pretty often
@Eugensson6 ай бұрын
I remember how laggy it was on my pc
@josiahjack45511 ай бұрын
Would love if you dived into this more. Looks like there is some kind of deterministic noise in Delta Force giving extra detail, coupled with color blending and perhaps height blending. Would be interesting to explore how these might work.
@touilleMan Жыл бұрын
Well I have to say I didn't plan to spend my new year eve watching a voxel engine video, but I peek just a bit I got hooked until the end ! Happy 2023 folks, this is a very nice way to start the year 🤠
@ghosthuntergr Жыл бұрын
Gustavo you are a unique teacher and presenter!
@guilhermecampos831315 күн бұрын
Hallelujah! Lots of fun doing it!
@pikuma15 күн бұрын
@@guilhermecampos8313 That's the goal. 🙂
@RyanZola Жыл бұрын
Hallelujah! I made it all the way! Thank you for this fun and relaxing weekend programming adventure after a crazy week of professional programming lol. Thanks to your other videos and courses, i was also able to implement the lerp on the tilting motions as well as a gradual acceleration and deceleration. Super fun!
@pikuma Жыл бұрын
Great stuff! :)
@ViniciusSoaresBatista2 ай бұрын
Your passion for teaching is inspiring
@pikuma2 ай бұрын
Grande Vinícius. O tópico ajuda nesse caso. :)
@nahuakang Жыл бұрын
Thanks for a New Year's video to start 2023, Gustavo!
@burntt9993 ай бұрын
oh dear lord.. 3 hours whew. i'll be back! SUPER happy that this is online.. i've been wanting to find a place that would teach me the voxel graphics/engine/ whatever. bless you sir. but i'm gonna need to start this on a fresh day.
@ChooChooThomas3 ай бұрын
Here's to help even a bit with the algorithm. Thank you for making such a detailed explanation. Definitely a great resource!
@pikuma3 ай бұрын
Thank you. 💪
@HiddenAsbestos Жыл бұрын
Hallelujah! (thanks for this tutorial, great!)
@mikeand99 ай бұрын
Awesome tutorial, it is amazing how you show all of these things easily that for me was magical stuuf in the past! I'm enjoying all your videos. 🧑💻
@jzhu6232 ай бұрын
Wolfenstein 3d and Comanche came out in the same year, but you would never guess by just looking at them.
@ahmetpehlivan6312 Жыл бұрын
Hapoy new year! This is the best present i got today!
@abdou.the.heretic Жыл бұрын
Managed to get some craters forming on mouse click, but performance takes a Tyson's mean cross, I've noticed the craters keep all details even from far away unlike the terrain which gets pixelated by distance, not sure if I can call it an LOD problem. It's not something that bugs me I'm just happy I found some explanation that my old head who still holds Comanche and Delta Force to high regard, can understand and work with. My programming days are long gone, hell I'm using my son's gmail and account, but seeing your video being this long, explaining the very essence that made me love those games, made me boot up a laptop and start grinding my C gears again!! Thanks you, kind sir! And yeah, Hallelujah!
@pikuma Жыл бұрын
This is absolutely great! My coding days are also behind me, but the good news is that the fun part starts now. 🙂
@pikuma Жыл бұрын
PS: feel free to share your code on a Github repo.
@suvetar8 ай бұрын
Good on Kyle Freeman!! Worth noting that even in those heady days, Medical imaging was using point clouds and voxels, or technical versions that were close as to be twinned siblings, if not closer! It's important, too, to recognise his insight and very practical experience to making it work on your bog-standard PC in stead of a high power medical workstation! Don't forget other classics like Outcast and the Magic Carpet games too!
@suvetar8 ай бұрын
I think that the render sequence of the Genesis device in the Star Trek films also used this aapproach?
@R.B.10 ай бұрын
Hallelujah. Caught files vs. maps when you started. I was surprised you didn't have an error at that point, but then I remembered you were writing in C.
@thepink_game_dev6610 Жыл бұрын
What a master piece about old technology!! Gustavo, I think you are undervaluated!! You have made my head blow up!! It's an amazing lesson!! Thank you, thank you, thank you!
@henribas23 күн бұрын
Great lessons, thank you! About your end question: pseudo racing game (Top Gear, Outrun, Chase HQ, etc).
@dizphunkt Жыл бұрын
Crazy good content for new year. Thanks for sharing your knowledge - happy new year!
@alexandrohdez39827 күн бұрын
amazing 👏👏👏
@MrNareez Жыл бұрын
Another awesome video-book!
@abdou.the.heretic Жыл бұрын
I've been looking for an in depth video on this for ages, time to fire up my computer and get programming memory running again.
@CasperBorretzen5 ай бұрын
Hallelujah! Thank you so much for this aaaamazing tutorial, super interesting and fun!:) Hmm, option 2, exploring different pseudo 3D racers sounds very cool!
@Error-pb6ee Жыл бұрын
Great video!
@braveitor Жыл бұрын
Great content. Explanations are clear and the result is amazing. Thanks for sharing your knowledge.
@vinnyhorgan7186 Жыл бұрын
This is so cool! Thank you so much Gustavo!!!!!!
@ooichu_ Жыл бұрын
Great New Year's gift, Gustavo! Thank you!
@blacklistnr1 Жыл бұрын
Great visualisations! I understood the process even though I skipped the code parts
@lucetubegplusstillsux2678 Жыл бұрын
Hallelujah I got it with my own custom terrain rendered in Blender~
@pottuvoi2 Жыл бұрын
Back in the days the implementation I remember tracked the height of the ray on each point of the map it checked. So it just checked if height of ray was higher than pixel in heightmap. As an optimization when moving to next pixel, it started testing the height from same location on map. Without this optimization it could be used as full 3D renderer with free camera. (As long as ray generation supported it, but was really slow) Always fun to see voxel/heightmap renderers, a lot of possibilities for fun tricks.
@dustinclark5620 Жыл бұрын
Another wonderful video Gustavo!
@salsicha23 ай бұрын
Voce eh brasileiro! Boa, muito bom ver brasileiros fazendo magica!
@realcundo9 ай бұрын
Nice video! I remember Comanche being used as a proof that PC was better than Amiga. :D It also reminds me of an old dos demo MARS.EXE (search youtube for an example -- the original archive has a readme describing the rendering details). It worked back to front, but it was only rendering pixels when the upper edge of the closer Z plane was lower on the screen than the upper edge of the farther Z plane: it then rendered vertical pixels between the upper edge and the closer upper edge. This way it only rendered surfaces that were facing the camera and reduced the overdraw (painter's algorithm). And since it interpolated between heights and colours, it looked very smooth.
@pikuma9 ай бұрын
mars.exe was classic! 🙂
@SerBallister8 ай бұрын
@@pikumaThere were voxel terrain renderers running on stock AGA Amiga's (@14mhz), albeit in low resolution, although the PC was far better suited for voxel rendering, and they came with much stronger CPUs 40Kb intro from "Stellar" kzbin.info/www/bejne/a4qUY3eomqx3pdE
@Ehal256 Жыл бұрын
If you convert the constant depth algorithm to front to back order, you just need to maintain a per-column y buffer to prevent overdraw, and still maintain the benefit of reducing divisions for projection. You just need to calculate 1/z per constant-depth row, then multiply the height values fetched from the height map by the 1/z, which is much faster than a division. On very slow hardware you can even precalculate a table of 1/z values (and coordinate offsets for level of detail!), which I believe arkagis escape does on megadrive/genesis
@Ehal256 Жыл бұрын
I finished watching the video and see that the projection lookup table idea was already mentioned. :)
@pikuma Жыл бұрын
Yup. Quality comment. 🙂👍 Just checking something... Visitor from Hacker News, by any chance?
@Ehal256 Жыл бұрын
@@pikuma No, just linked by someone else, but I have written similar engines before :)
@eulondon2 күн бұрын
Hallelujah.
@gwelter10 ай бұрын
Just a comment to help you with the KZbin algorithm
@pikuma10 ай бұрын
That's the spirit. 🙂 Thank you so much.
@achyuththouta6957 Жыл бұрын
Wow. You have so much knowledge.
@PlasticCogLiquid10 ай бұрын
I love voxels sooooo much.
@Anonymousewizard10 ай бұрын
its so cool how coding works... you can be using a polygon system for so long, then some guy walks in, has a think, and boom, increased performance. incredible problem solving
@AngryCPPCoder Жыл бұрын
Thank you so much for this great video. I always wanted to learn more about voxel engines. Great explanation. For upcoming videos, I would say racer or a new topic.
@brunorcabral Жыл бұрын
Both options would be great
@Chevifier3 ай бұрын
Im gonna try doing this with compute shaders
@harshguptaxg2774 Жыл бұрын
Go Ahead!
@luispieri640 Жыл бұрын
Hallelujah! Gaucho!
@canova Жыл бұрын
Thank you Gustavo, excellent video. For the next option, I would like to know more about the optimization techniques you've mentioned.
@pikuma Жыл бұрын
Sure thing!
@elferna Жыл бұрын
Hallelujah!!!
@AnonANONY-jz1wg Жыл бұрын
Hallelujah
@pikuma Жыл бұрын
Ahhhhhh, the first! ❤️
@StiffAftermath2 ай бұрын
Have you seen John Lin's voxel engine yet? It is mind-blowing!
@pikuma2 ай бұрын
I was not aware of that project! Amazing. Thanks for the tip.
@StiffAftermath2 ай бұрын
@@pikuma thank you for your awesome work! I love voxel tech! If you see it, I'd love to hear your thoughts!
@billallwell6507 Жыл бұрын
Just completed the course tonight 2am Melbourne Aust. Amazing piece of work. Vista pro on the Amiga ! I remember I use to leave it running all night to generate a 100 frame animation and hope the trusty old Amiga 500 didn't crash. Please go with some pseudo 3d games, the format you use of theory and history coupled with the implementation is awesome. Not sure whether stunt car racer could be a consideration or Outrun?
@lorrainefigueroa4624 Жыл бұрын
Hallelujah! I am really enjoying learning something new this holiday. I vote for 3D racer!
@lucassamuel6069 Жыл бұрын
Amazing
@Aexorzist Жыл бұрын
Cool video! The 386 required a 387 to even run floating point code. I don't think one FSINCOS per frame would have been that bad even back then. It's 194-809 cycles on 387. About as much time as processing one vertical line? A LUT is trivial though so not an optimization that would have been missed.
@kevinbatdorf Жыл бұрын
Very well done. Thank you
@galacta6841Ай бұрын
Are you considering doing more tutorials on 2.5D engines like Mode 7, portal rendering, and such?
@pikumaАй бұрын
@@galacta6841 Yes, it's in the queue. 🙂
@nahuakang Жыл бұрын
Also, option 1 for the MS DOS implementation sounds fun :) But both are great ideas!
@OGkuma_ Жыл бұрын
Thank you for this content!! Are you planning to do a kind of course on creating a Minecraft clone in C++ and talking about some rendering optimization etc? That would be so nice
@TheIlluminatedParker Жыл бұрын
56:38 Is that yerba mate?? 🧉
@pikuma Жыл бұрын
It sure is... also known as "chimarrão" in the south of Brazil.
@TheIlluminatedParker Жыл бұрын
@@pikuma ahh, I didn't know it was a thing in Brazil. I only know about yerba mate, because I have some friends from Argentina
@shdon Жыл бұрын
Hallelujah indeed
@3f006 Жыл бұрын
Really cool
@aakarshanraj11768 күн бұрын
01:04:21 the formula of delta y is wrong, its missing + operator after pl.y
@sha5b Жыл бұрын
Great tutorial! Happy new year. 3rd comment, just saying
@pikuma Жыл бұрын
Maybe one day that'll be worth millions! 😅
@bimoverbohm6837 Жыл бұрын
Halleluja (on the Game Boy Advance btw). Would love to see what optimizations you can come up with and how your demo would run on a 386.
@pikuma Жыл бұрын
On the GBA??? Amazing. 😀 Share a video of it working with us on Twitter @pikuma. 💛
@pedrocosta17422 ай бұрын
Hallelujah😄
@pikuma2 ай бұрын
Grande!
@klr607 Жыл бұрын
I really enjoy the 6502 8-bit programming, but these 3D graphics are awesome 😊
@Rydn Жыл бұрын
1:04:22 There's something I'm not getting about this. If you are in the middle ray calculating delta X, the offset is zfar, so zfar/zfar gives an increment of one on the delta X, but for that ray, shouldn't deltaX be 0 all the way?
@pikuma Жыл бұрын
Hi Rydn, Let's imagine that our camera is in the middle of the map (512,512), and our zfar distance is 400. Therefore, the left and right points x coordinates are plx= -400 and prx=400. So, our delta X is: (-400 + ((400-(-400))/320 * 160)) / 400 which is zero!
@pikuma Жыл бұрын
The addition of plx (which is negative) with the other terms makes the deltax zero when our column is 160.
@Rydn Жыл бұрын
@@pikuma Oh! Thank you. I was wrongly thinking about plx as the zero in my head. I can't wait to finish this. Thank you for your great videos.
@akshatra2k1 Жыл бұрын
We want both options please, emulator and 3d racing game. Moreover, can we implement voxel space engine in real 3d from scratch using C?
@GabrielxC Жыл бұрын
Wich VI theme do you use friendo?
@pikuma Жыл бұрын
Hello. I use "ron" (default) or "Benokai".
@binaryburnout3d Жыл бұрын
first comment!!!! happy new year!
@pikuma Жыл бұрын
Happy 2023! 🙂
@peterlous853 Жыл бұрын
Thanks for excellent video! I would op for pseudo 3D race for next video.
@ramyres110 Жыл бұрын
Aleluia 🙌
@pikuma Жыл бұрын
Feitooooo! ❤️
@santitabnavascues86735 ай бұрын
Would it be posible to do something similar but with sprites? You know, rendering sprites with depth information or something... would it make sense? 🤔😅
@CYON4D Жыл бұрын
Great explanation. And since I have played all the DOS classics back in the day, this was exceptionally fun. I was wondering if you are considering uploading your "3D Computer Graphics Programming" lesson on Udemy.
@pikuma Жыл бұрын
Hi! It's a fun topic. 🙂 Unfortunately I don't use Udemy for my courses anymore.
@EmiTheLoomistar Жыл бұрын
Pls cover the MS - DOS implementation!!
@jamesonsouza9417 Жыл бұрын
Vim pelo canal do Fabio Akita. Sensacional a sua iniciativa de ensinar a base. Gostaria muito que tivesse seu curso em Português. Pagarei com todo prazer.
@ArtexStudios Жыл бұрын
Please optimize the voxel engine to old skool computers first and continue with other techniques later... Thanks. ;)
@erikmarchini32749 ай бұрын
Hi ! So from what I understood, you can determine the colour and the height of a pixel for the cost of 2 bytes. My question is, is there a way to determine the inclination of a pixel ?
@CGWerft4 ай бұрын
Either you save them in a normal map, which IS Just another Image saving the normal or you could calculate the slope by comparing that Pixel with the Pixels around it. I think there should be a formula in the blog of Inigo Quilez.
@jeffvenancius Жыл бұрын
57:49 - if the slopes are exactly oposites,, is it possible to make a loop where you use half the width while painting both fet and right pixels each time(?)
@jeffvenancius Жыл бұрын
Left*
@jeffvenancius Жыл бұрын
something like l_delta_x = plx + i r_delta_x = prx - i
@jeffvenancius Жыл бұрын
Interesting how it compares with mode 7
@StijnDeWittАй бұрын
1:01:30 You say you need to calculate delta x and y once for each ray, so 320 times. Yet you place the code inside the inner loop, where it will be calculated 320 * zfar times... It should go in the outer loop I think.
@StijnDeWittАй бұрын
Looks like in the actual code, you don't make that mistake
@PaulSpades11 ай бұрын
Hah... I actually never seen this vertical ray algorithm, the horizontal painters algo is slow and useless. This one integrates perfectly with existing ray cast rendering. Also, the 90deg fov sure simplifies some annoying trigonometry and results in faster operations. I've learned some stuff, thanks!
@josiahjack45511 ай бұрын
Halelujah, but how did you get the scanline effect....ooohh you cheated and used a CRT!! No wonder it looks so good.
@pikuma11 ай бұрын
The DOS-like framework has its own CRT shader. 🙂
@jamiecropley Жыл бұрын
Voxel course incoming?
@pikuma Жыл бұрын
Only if I get to really use DOS & VGA 0x13h.
@pieterverhoeven1642 Жыл бұрын
Did they ever combine these voxel landscapes with something like portal/cell rendering for interiors? Would have been an interesting alternative history where GTA was software rendered like that :P
@WesleyMarques79 Жыл бұрын
Sudo 3D racers please!!
@eobet Жыл бұрын
Fantastic video, but you should have connected it to Minecraft as well to get the attention of the kids! 😉 (Btw, can’t remember what computer I had when I got Comanche but it never ran anywhere close to that smooth!) 🤣
@pikuma Жыл бұрын
Oh, right! I forgot about Minecraft! 😅 I had a Cyrix 486 dx2 and it ran... ok.
@circuit10 Жыл бұрын
I don't think it would work for Minecraft because it can't do overhangs or detailed walls
@jeffvenancius Жыл бұрын
Aleluia!
@enricotrudu67603 ай бұрын
1:20:10 No.
@AnnatarTheMaia Жыл бұрын
You didn't have to quit out of vim every time: if your terminal discipline is configured correctly, you could have just sent SIGSUSP (^z), did whatever on the command line, and then typed "fg" to go back into vim.
@pikuma Жыл бұрын
Hi Annatar! I am used to have different windows for the editor and for my bash sessions (either via terminal window or termux). I believe I exited vi only in the first one or two times I was editing the file. After that, I was swapping between editor and command line without the need to quit vi. :)
@viniciusrodrigues1428 Жыл бұрын
hey gustavo, conheci teu canal pelo fabio akita e eu realmente fiquei interessado nos teus cursos, porém é muito caro o valor em dolár, você não pensa em adaptar esses valores em reais? um abraço e que video sensacional, estou gostando demais de ver os teus videos
@vitoralmeidasilva3 ай бұрын
Aleluia! :)
@vitoralmeidasilva3 ай бұрын
Btw, here is the Makefile that I used to compile the program using a Linux machine: build: gcc *.c `sdl2-config --libs --cflags` -lGL -lGLEW -lm -lpthread -o voxel clean: rm voxel run: ./voxel
@pikuma3 ай бұрын
Feito! 🙂👍
@jmssun5 ай бұрын
Mars.exe
@space302 Жыл бұрын
You sure enjoy repeating things multiple times. Meaning, you say things multiple times, so you repeat things. So to be clear, you say the same thing multiple times. So basically, you repeat.
@pikuma Жыл бұрын
I'll work on that. Thanks. 😉
@bcodetube Жыл бұрын
My channel has a tutorial on Pseudo 3D Racing using Pygame!