Early December I posted about the 34th Ludum Dare and my desire to compete in it Here
While I did take part I did not succeed in producing a finished game out of it :/ Probably due to attempting a 3D game having never done one before and exhausting myself before deciding on the gameplay fundamentals.
Since then I have had a good Christmas break and had a poke around at the concepts that I didn't manage to suss out back then. Even though I didn't have a completed game to show for my efforts I don't feel they were in vain. Details below the fold...
What went right:
- New Editor - I was pleased with the performance of Atom. It functioned in much the same way as the other editors I had tried, Netbeans and Visual Studio, without being too constraining in the files it expected to be in your project folder. It was simple to set up the environment the way I preferred and the extension system let me add functionality I missed. I feel it hit that sweet spot between the super lightweight Notepad++ and the heavier, more involved editors. That it works in Windows and Linux is a major plus :)
- Study of Techniques required - 3D rendering has been something of a programming goal of mine for about as long as I have tried coding. Once I felt confident in general programming skills and game design I really wanted to reach this point. Of course I could have used any of a plethora of 3D graphics libraries but that wasn't my style :P For a few months now I had been studying the tutorials provided on Learning WebGL, brilliant tutorials and I learnt a lot from them. When it comes to the fundamentals of creating a 3D mesh and rendering it in a browser I manage fine.
- Modular Code Structure - I do like to keep my code base nicely structured and have iterated on the concept of splitting the parts of the program into logical modules. Essentially a Model-Control-View structure. The Model is what is being simulated, the Control handles player input which affects the Model and the View handles the visual representation of the Model to the player. I found this invaluable in adding the 3D render code as it could simply be slotted into the View as an alternative way of representing the underlying Model. This meant that I could reuse heaps of old code from other projects; mouse movement, procedural elevation code etc.
- Strong idea of desired appearance - Maps are great fun to generate and explore, sadly 2D representations of them lack a certain... verticality :P I was certain from the outset that I wanted to make a terrain map which was as 3D as possible. A proper globe which could be viewed at any arbitrary angle. My inspiration for this was the worlds you saw in Spore with cartoonishly large mountains rising out of the atmosphere and sea floors visible through the water. I was determined to achieve this effect and was overjoyed with the progress I made towards it, see image:
What went wrong:
- Aethetics first approach - In a sense this is the flip-side to the previous pro; because I was so focused on getting the look correct I neglected the other parts of the development of a proper game. I made the mistake of messing about with colour palettes, making a nice atmosphere gradient and even hacking together a rudimentary ambient occlusion shader. Neat side projects to get pretty screenshots but not what you want to be doing in the middle of a game jam! I had focused all my efforts into implementing the 3D renderer and getting the visuals just so that I had greatly neglected the other parts of the project.
- Solo Project - In the previous Ludum Dare (LD33) I had the good fortune to have friends and family members to work with on a group submission. This had meant I could focus on creating the engine whilst they focused on creating the graphics and sound effects. Working as a team was a great experience and meant that we were planning things ahead of time in order to coordinate everyone. Much easier to stay motivated when working together too, had there been other people depending on me to continue I might have not become so dispirited when realizing I had mismanaged my time.
- Nebulous Theme - Personally I found 'growth' to be a tricky theme to create something for, ironic as it had been one of my favourites in every Ludum Dare theme list it had appeared. Making things grow; whether they be cities, crops or armies has always been a compelling gameplay mechanic for me. This theme didn't combine well with my desire to render an entire planet though. Growing an entire planet? That was preposterous scope. Having a tie between two themes didn't help much either as 'two button controls' led me to attempting to create a mouse only game, which didn't go as planned...
- Poor Schedule Planning - It took me no small amount of time to create all the necessary structure and framework to implement my desired 3D render. Once it was all finally in place I took a sigh of relief, not realising that I have under-estimated the next stages. Implementing mouse selection in a 2D game is simple, I had done it before. In 3D though? Involves intersections of vectors and planes. Worse than having controls which could only manipulate the camera, I had no idea how to go about adjusting the attributes of a 3D mesh once it was in the scene the 3D renderer would display. These issues really knocked the wind out of my sails not to mention that I still didn't have any damn GAMEPLAY!
In conclusion I think it is clear that I really should have focused on creating the fundamental logic of the gameplay first before I thought about how to represent it at all, a minimum viable product of sorts. While I was pleased with what I had accomplished towards my dream of creating properly 3D games the Ludum Dare was not the place to pursue them. Because now I am left with the framework to make 3D renders without a game to actually use it.
It is a pretty nice framework though and I've been working on adding the functionality that it didn't have before. Worked out how to handle moving objects and changing the shape/colour/etc. of existing models. This code will definitely see reuse in the future :D