One of the 1k entries that got me thinking was the 1k cave raytracing demo, which uses the same effect that Wolfenstein 3D used.
With 10k I think I will be able to push the envelope even further. As the blog post title suggests I will Procedurally Generate as much as humanly possible.
The best example of Procedural Generation used in games is the .kkrieger demo that began in 2004, where an entire game demo was made using …wait for it …46k. Everything in the game: maps, textures, even sounds were made procedurally.
What I always find entertaining about .kkrieger is that taking a screenshot of it usually takes more room on disk than the entire game itself!
The raytracing won’t be like the subpixel lighting based raytracing used in 3D CAD but simply used to easily calculate what I need to render on screen. Everything will be done via HTML5 canvas element and hopefully should be very shiny.
These are just my early morning ramblings while I am at work. Check back to see how I progress as I begin to code…
So I have begun writing the Ray Tracer which projects onto a 3D Voxel grid which represents the landscape. This is a bit different to the usual raytracer examples that check if it interacts with a sphere, surprisingly those are easier to code!
This may not look amazing but you can navigate around the scene in near realtime (I haven’t done any optimisations yet) and more importantly I’ve set the size of the grid rather small (64×64) and the raytracer currently renders in 4×4 pixel blocks so there is room for improvement. Anyway, its going well and so far with no compression and with comments and formatting left in its only 6k!
If I have a few bytes free near the end I hope to incorporate HTML5 web workers to push the Ray Tracing onto separate threads for increased performance!
If you want to try it out (Can’t aways guarantee it working or performance) then point your browser over at MrPfister.com/JS10k.html
Next Step …Procedurally generated landscape