Procedurally generated 3D world in WebGL

Posted on:September 18 2013

I always wanted to create a whole 3D world by programming. Procedurally generating everything has a nice touch: You can build whole worlds with unlimited details, and by adjusting just a few parameters change everything easily. Because the work on my side-project game Darkness Springs has stopped (as reported on this blog), I needed another side project, so I started this a few weekends ago. I decided to write everything in JavaScript, using WebGL, and thus also be able to use it as test area for my WebGL JavaScript library, while also improving the WebGL backend of CopperCube as side effect.
For now, it only does some very basic 3D world generation, and it looks like this:


It generates simple terrain, buildings with a real floor plan, streets and trees. Nothing too exciting yet, but it is a start. I also found time to set up a small website for it, write down what the game will be about and setup a preorder button, so that if people like the game idea, they can pay something in order to speed up its development (That way I maybe can outsource some more work). The game will be named EndTime at Home and will be set in a post-apocalyptic world, where you walk around to gather food, hunt, and survive on your own. For simplicity, it is set in the universe of my book, just a few years before the story happening in that book. There is a playable demo of the 3D engine in action, try it out, if you like. It doesn't have that much content yet, but it shows that everything runs smoothly, even if it is only written using JavaScript.





Comments:


Wow Niko! That was an awesome experience.
I felt like I was walking for ever! How did you do it? When can we get the tech in Coppercube! Just pre-ordered BTW.
mrmdesign
Quote
2013-09-18 09:24:00


Cool :)
erik
Quote
2013-09-18 10:10:00


Please consider handling non QWERTY keyboards: almost all WebGL demos, forces us to use the WASD keys to move around which is really bad to really enjoy it. I know I can use the arrow keys but I don't do that in FPS games.
john
Quote
2013-09-18 11:03:00


Hm, it's more a procedural approach, where in CopperCube, you need to create the content by 3D artists. But it could be an idea to make a plugin for the editor from it, maybe.
Thanks for preordering :)

About QWERTY: ah, itneresting. What keyboard are you using, DVORAK?
niko
Quote
2013-09-18 12:00:00


A large cavern of what I'm about to ramble about may be unintentional, but I will still give the deserved praise for it.

The art of this demo. You have used a brown and green colour scheme (without layering on things like horrible 'generic brown FPS' post filters) that really gives a sense of atmosphere, without ruining contrast or immersion. This style makes this little demo unique. It's not a re-run of concepts and art ideas already run through by many other people before.

You could spend hours adding various other similar assets into the same generation logic but in consequence detract from the fun of the game. Or you could make the game itself more interesting by working on the dimensions of player interaction, including exploration. Some game devs go for the former in sequels or after their pets (*cough* Minecraft) become successful, focusing on furthering what is already successful (gaining little returns after a certain point) rather than ever expanding their ideas just as they did in the first place to capture people's imaginations.

Do what you want with YOUR game. Not what other people want from it :)



I'm dabbling in irrlicht at the moment, but I have not yet had a proper look at Coppercube. Your demo /seems/ to be multi-threaded -- I'm seeing graceful loading of texture resources in play. Is this correct?

At the moment I'm enjoying the demo best by getting the forward-walk key stuck on and then defocusing the window. The game explores itself :)
Hales
Quote
2013-09-18 12:03:00


Thanks for the feedback, that's exactly what I am also thinking.
About threads: Yes, it is emulating threads in order to be smooth when creating the world. Emulating because there isn't something like a real threads in JavaScript (web workers come close but they are useless for this kind of app). Have fun with irrlicht :)
niko
Quote
2013-09-18 12:37:00


French language keyboards use AZERTY. See: http://en.wikipedia.org/wiki/AZERTY
jonjon
Quote
2013-09-18 12:54:00


I am impressed
Martins1
Quote
2013-09-20 22:25:00


Quite a massive leap from 'Darkness Springs'. Truly incredible.
Tim
Quote
2013-09-23 09:14:00


irrlicht saved my neck in a project back in 2007/2008. i hope this engine grow commercially like unity
john
Quote
2013-09-25 06:42:00


Wow, not bad niko!
It looks like in the 90s, were 3d real time computer graphic just started. And now 20 years and many GHz and GB of ram later, this graphic has finally found a revival. Thanks to the usage of JavaScript and and WebGL. Good work, keep up doing what you do, this definitely the right way, it will push the computer graphics boundaries a little bit further.
Native Programme
Quote
2013-09-26 22:52:00


Add comment:


Posted by:


Enter the missing letter in: "Interna?ional"


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons