Still Rough

But more game-like than anything I've posted before. And it's looking better every day, which is the important thing.

I've ported over my atmospheric shader code from the XDX engine, and am using a neat new GUI class called a "render window" to test it out. I'll start playing with procedural planet textures soon, but that'll require implementing render-to-texture, which will require messing with framebuffers, a concept which I think is probably among the top five worst OpenGL design decisions. D3D's pDevice->SetRenderTarget absolutely puts OGL to shame.

Oh, and I did steal commodity names from Freelancer. Guess I'll have to get more creative if I want to release a product.

Top-Down Progress

My progress lately has been mostly engine-related and conceptual, which I suppose explains the lack of the usual pretty pictures that I like to post. I vowed to start from scratch at the beginning of summer, which I have done.

As per the "top-down" post a while ago, I am attempting to work in such a fashion. Already, I have built something that looks more like a game than anything else that I've ever created. Of course, it comes at the expense of polish. The graphics aren't stunning. And there's still not much to do. But it's more than the usual single-idea tech demos.

Below are some shots of a few planetary surfaces. I used my old method of chunked LOD with skirts. This is all done in a forward-renderer though, so no fancy postprocessing. The surface function is very simple and generated on the CPU (multiplication of two fractal Worley noises). Still, each planet is different, and it's neat being able to fly to and dock with different ones. I'm working on a trade interface right now, so hopefully gameplay isn't that far off. I re-used the GUI shader code that I developed for the XDX engine, as I really liked the look of it (but the GUI logic was rewritten and simplified for the new engine).

As for conceptual work, I have developed a nice, modularized game architecture, as well as a neat component-based entity system that I will probably describe in detail in a future post (it took a lot of thinking to come up with). Finally, I've factored this project into standard .h/.cpp separation (unlike my usual fast-prototyping style) so that I can use DLL-based scripts to control game logic. More on that later, but suffice it to say that being able to hot-swap game logic is going to be a real plus!

One of the Nice Things

About this new, fancy c++ standard is that it is now effortless to implement real "foreach" loops for iterable containers, thanks to the auto keyword and type inference:

#define foreach(elem, container, code)\
for (auto i = container.begin(); i != container.end(); ++i) {\
auto& elem = *i; {code;}}

Now, you just do, for example,
foreach(entity, entityList, entity->Draw());

That's pretty fun.

UPDATE:

Turns out that you can do something even cooler with VS2010. It uses a non-standard syntax, but there is an equivalent construct in the new c++, so something like this should, in theory, be supported by all C++11 compilers.

#define foreach(elem, container) for each (auto& elem in container)

Yes, it's that easy! Now, the nice thing is that the code body is no longer part of the macro expansion, so debugging is easier, and everything looks cleaner thanks to braces.

foreach(entity, entityList) {
entity->Update();
entity->Draw();
}

Just Another Dreamer

Seems that everyone has the same dream these days...

Bow Shock ~ http://www.gamedev.net/blog/1302-silviu-andreis-journal/
Britonia ~ http://britonia.wordpress.com/features/
Drifter ~ http://celsiusgs.com/drifter/
Infinity ~ http://www.infinity-universe.com/Infinity/index.php
Kinetic Void ~ http://kineticvoid.badlandstudio.com/
Nycterent ~ http://spacedjase.com/default.aspx
Pioneer ~ http://pioneerspacesim.net/
Predestination ~ http://predestinationgame.com/
Outerra ~ http://outerra.com/
Rodina ~ http://elliptic-games.com/
SkyJacker ~ http://www.kickstarter.com/projects/digitilus/al-skyjacker?ref=live
Space Engine ~ http://spaceengine.org/
SpaceOut ~ http://henryprescott.com/
X Rebirth ~ http://www.egosoft.com/games/x_rebirth/info_en.php

I guess we're all pretty much the same: we're nerds who watched Star Wars / Star Trek / BSG one too many times, we undersetand PCG, and we just can't get the dazzling dream of a massive space universe out of our heads.

I wonder if anyone will ever get it right? I'd like to think that I'll be the one to do it, but it would seem that more and more people share this dream every day. And some of them are even getting money for it. How much chance does this 20-year-old have of beating everyone else to the punch? I guess only time will tell.