Development Blog
Hello! Haven’t posted anything for a couple of weeks (been meaning to but been getting distracted). Updates from my previous post are that I have a working system that is somewhat data-driven, however the way things stand currently I am not completely satisfied. I still want to optimize data access, while having a flexible system, so I have been reading/researching more on how to go about it. When I get this done I’ll finally be able to work on gameplay :), which I can’t wait to do!
Also new season of Fringe as started, firstly I thought it was a pretty good but not the best premiere of the series, however really sets up the mood and themes for episodes to come. I have been really impressed with this series, especially when it comes down to acting and character development .. I have no idea how these guys haven’t won more awards :/. Season 3 while was done in ratings from Season 1 and slightly from Season 2 was by far in my opinion some of the best television and story telling I have ever seen in a TV drama. I can’t wait to see how this season turns out in comparison, and hopefully fox renews it for a fifth season to wrap up an amazing series.
It also got me thinking about alternate universes in games. One thing I really have enjoyed about Fringe was the conflict between the two universes which are sooo much alike, but differ in little ways. A Legend To Zelda: Link to the Past made use of an alternate world that was very similar to the main world, and the mechanic of switching between each world gave the game some amazing gameplay mechanics. I believe another Zelda game (can’t remember which one, but it was for GBC or GBA can’t remember), where you had an alternate world which you had to visit in order to advance the story, but it differed a lot compared to the way the mechanic was used in Link to the Past where it was literally the same world but the “dark version” of the world. In modern games you don’t see this kind of thing often(if at all?), however it is definitely something I would like to see. With today’s writers and artists, telling a story of a conflict between two universes, and seeing how your actions affect those of the “other side” would be fairly interesting in my opinion, and could be make for a very epic game.
Anyway, hope to get some more work done on my XNA game this week, as well as continue my job search. Peace.
XNA stuff
09/13/2011 at 16:03
Hello! Back from a wedding I had to go to, and back to work :). Finally got to finishing the level generation and optimizing it(somewhat) for my XNA game I am working on! Take a look:

As you can see I am generating levels from a grayscale bitmap and turning it into geometry. This is a picture of the level fully zoomed out, not at game level. I randomly colored the different regions just so you can tell things apart as right now I have not done any of the textureing // shader code, just using the basic effect class from XNA. I haven’t added ramps in but that is how you would navigate onto the different tiers of terrain.
Now that I got the level generation done, rendering, and somewhat optimized(still could be much better imo, but for right now this should do(using basic frustum culling to cull regions)), I am going to work on getting the entity system going to add game entities such as the player, enemies, structures etc. After I get a lot of that done I might make a sub-site for the game and updates related to it. My plan after I get the entity system working is to then work on either the AI, or the UI/class system in the game.
Anyway that’s about it for now. Might be getting a good internet connection soon ^_^, when I mean soon I mean it is going to take 2 weeks for an engineers assessment, and then another 4 weeks apparently for the equipment, which I think is just rediculous .. I have no freakin clue why it is going to take that long T_T. Peeace.
Hello! First a little update: uploaded a new video to show off the screen managemnet/menu system I implemented for Dodge and Destroy, as well as uploaded the source. I also included with the source a release build that should work under windows with processors that support x86 instruction set. Haven’t tested it under Linux so not 100% sure if it works but the code should compile under Linux as well.
Second I would just like to discuss Data Oriented Design a little bit. Throughout my university career, in most classes we were taught strictly about Object Oriented Design, and how to engineer our software around concepts. It wasn’t until later in my final year (this past spring) that I really got introduced to Data Oriented Design, however the course wasn’t focused on it. The course focused on parallelism and writing algorithms to take advantage of task and data parallelism. In order to take advantage of parallelism however you need to manipulate your data; keep all data of a specific type together and take advantage of filling cache lines and reducing cache misses. Even in single threaded systems by reducing the amount of cache misses you will increase performance by a lot as the CPU as access to data much quicker. It is much easier to perform parallel operations and design parallel algorithms on data that is neatly structured and of a single type. During this course my mind was blown how some simple manipulations to data in a GPGPU program can speed up a matrix multiplication on an extremely large data set by a significant amount.
As technology progresses we are going to have to stop thinking about algorithms/systems in a single threaded matter and start developing to maximize parallelism provided by things like the GPU, and multi-cored processors. This is where hardware is progressing so we must start developing with this in mind. These hardware advances allows us to manage more data quicker, and thus we must shift from focusing our teachings on OOP, and start thinking DOD in my opinion. While OOP works well for single objects, for GUI’s, it is extremely inefficient when managing a plethora of game entities. When I began learning about designing around data as opposed to objects outside of school I just didn’t understand why there was so much emphasis on OOP when in the near future if we are to take advantage of hardware we must design our systems around the Data instead.
Now I say this yet I still have been developing my games in the meantime with OOP in mind. Mostly it is because it was how I was taught, and when I began developing games like Dodge And Destroy I developed it in an OOP manner. Eventually my goal is to slowly change this over to a data orient approach which will not only speed up performance, but allow for multi-threading to occur. For instance: instead of processing an enemy object by calling enemy->update() each enemy independently which creates A LOT of cache misses the more enemies there are, I could process all of the positions at once by looping through an array containing all of their positions. Same goes for collision detection etc, if we loop through the raw data, and keep data elements 16, 32 bits large, more data can be stored in a cache line resulting in less cache misses, and an huge increase in performance. I am already taking this approach with my XNA game, and beginning development with a Data Oriented approach is much easier then beginning with OOP and switching everything over to fit a DOD paradigm.
Now I haven’t gone into detail fully about DOD, and its advantages, and explained in detail why its much more efficient for game design, but my point is why wasn’t this taught throughout my education from the beginning? My time at University was mostly spent thinking Object Oriented, while we did learn little bits about cache lines in some classes, it wasn’t until I took this course on parallelism that I really learned the implications data-oriented design had on performance and parallelism. I understand where OOP has its place, but in classes like our Universities Game Engine, or some Software Engineering classes things like data-oriented design should have been talked about(but wasn’t), especially since parallelism is going to have to be taken advantage of to get higher performance in the coming years.
Here are a couple links to DOD topics that go over it in much more(and clearer) detail than I have:
http://gamesfromwithin.com/data-oriented-design
http://bitsquid.blogspot.com/2010/05/practical-examples-in-data-oriented.html
Menu’s n stuff done!
09/04/2011 at 15:13
Got to coding, and finished the menu system for Dodge & Destroy fairly quickly. Just have to look through the code for any problems, update the video on the projects page, and upload the updated source :). Pretty happy about how it turned out, its fairly easy to create different screens and menus with the new code.
I didn’t manage to create a formal Input manager, but with the current implementation input is handled separately from all the screens. Also before I redesign the actual game to make it more data-driven opposed to object driven I am going to need some more time to look into the design; might have to rework a lot.
Anyway, that was a lot of fun :). Also I think if I have time when its on participating in a Ludum dare 48hr game competition. Played a bunch of the entries from the previous contest and it just looked like a lot of fun to participate in! I just gotta get more knowledge on deploying applications written in C++. Peace
Still having mad sleep problems although progress is being made on fixing them :). Haven’t gotten much done on any of my projects due to these sleep problems leaving me with not much time during the day for programming :/.
Thinking about updating dodge and destroy this weekend IF I get the time, hopefully I will. Thinking of adding in a UI/screen manager to the game as a fun quick project//addition. Also might rewrite some of the game code once again to optimize it a bit more. I also may make it more data oriented to decrease cache misses and improve performance while I am at it. It’ll be a lot of fun anyway; going to also have to write an input manager as different screens will require different inputs!(although theres always ways around that :P).
Anyway just a small update. I also fixed some of the formatting problems with the website during the week that were really quick, but other then that like I have said haven’t done much programming, however still went over some of my code for my various projects fixing minor things. But that is all peace!