Announcement oddly timed with the anniversary of the Parkland shooting.
Build your own old-school 3D shooter in a weekend
31–40 of 105 posts
Re: Build your own old-school 3D shooter in a weekend
#32Earlier quoted context omitted.
Uh, I had never heard about these games before. I always thought Id created the franchise. Thank you for that bit of videogame history.
I read "Id" as " i'd " and thought this was the the most bizarre sarcastic comment. Time for more coffee
Re: Build your own old-school 3D shooter in a weekend
#33I think leaving the "old-school" out of the title doesn't do this justice. My first thought was, with modern engines, or even raw OpenGL that isn't that hard... I did it in a weekend for my "Advanced Computer Graphics" elective in college using OpenGL and that was 2008. But this is kind of cool... it's more of a tiny ray tracer and... well to borrow the title... old-school arcade game.
> it's more of a tiny ray tracer It's a ray caster, where the rays are sent out from the camera to intersect the map. With ray tracers, the rays are sent out from the light source, IIRC. Your point on OpenGL is valid, but that just removes all the learning from it. OpenGL does so much of the grunt work for you. This kind of old-school game engine is a great learning experience.
Re: Build your own old-school 3D shooter in a weekend
#34I love his "tiny" repositories. So cool.
Re: Build your own old-school 3D shooter in a weekend
#35Announcement oddly timed with the anniversary of the Parkland shooting.
Re: Build your own old-school 3D shooter in a weekend
#36I think leaving the "old-school" out of the title doesn't do this justice. My first thought was, with modern engines, or even raw OpenGL that isn't that hard... I did it in a weekend for my "Advanced Computer Graphics" elective in college using OpenGL and that was 2008. But this is kind of cool... it's more of a tiny ray tracer and... well to borrow the title... old-school arcade game.
Wolf3D was 1992, 16 years before. SGI released OpenGL a few months later. IIRC, the first gfx cards were thousands of dollars. The first successful consumer gfx was 3DFX Voodoo2 in 1996. We take so much for granted nowadays.
Re: Build your own old-school 3D shooter in a weekend
#37I think leaving the "old-school" out of the title doesn't do this justice. My first thought was, with modern engines, or even raw OpenGL that isn't that hard... I did it in a weekend for my "Advanced Computer Graphics" elective in college using OpenGL and that was 2008. But this is kind of cool... it's more of a tiny ray tracer and... well to borrow the title... old-school arcade game.
> it's more of a tiny ray tracer It's a ray caster, where the rays are sent out from the camera to intersect the map. With ray tracers, the rays are sent out from the light source, IIRC. Your point on OpenGL is valid, but that just removes all the learning from it. OpenGL does so much of the grunt work for you. This kind of old-school game engine is a great learning experience.
Ray casting on the other hand is basically ray tracing without any reflections or shadows, in other words each ray stops with the first collision.
Re: Build your own old-school 3D shooter in a weekend
#38Re: Build your own old-school 3D shooter in a weekend
#39I'm way out of practice with C++. (It's been since like 2006.) Framebuffer clear function appears to allocate a new vector. Does std::vector automatically handle the memory releases? This is called every frame, so I wanted to check here to see if I'm crazy or not.
> Does std::vector automatically handle the memory releases? Yes. What is going on here is that "img" is being assigned. The "old vector" will have its destructor called, which will call the destructor of all of its elements by default. ------- I assume you're talking about this code: https://github.com/ssloy/tinyraycaster/blob/master/framebuff... void FrameBuffer::clear(const uint32_t color) { img = std::vector (w*h…
Re: Build your own old-school 3D shooter in a weekend
#40Earlier quoted context omitted.
> Does std::vector automatically handle the memory releases? Yes. What is going on here is that "img" is being assigned. The "old vector" will have its destructor called, which will call the destructor of all of its elements by default. ------- I assume you're talking about this code: https://github.com/ssloy/tinyraycaster/blob/master/framebuff... void FrameBuffer::clear(const uint32_t color) { img = std::vector (w*h…
Instead of doing a memset, I'd recommend using std::fill (which will likely call memset or another fast implementation behind the scenes): it makes it clear what you are doing, and preempts questions of "is this legal to do" (which it is, but only for POD data types).
img.assign(w*h, color);
myself.