Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    2
  • comments
    0
  • views
    4342

About this blog

ramblings about code, design and other games

Entries in this blog

 

CMaking progress!

A while ago I started converting my pet project from a vanilla visual studio solution to a cmake generated solution. CMake is a cross platform makefile/solution builder. While it makes it easier to have the same configuration for many platforms and compilers, the biggest win this gives (imo) is that you can comment and easily search your configuration files.

Why I haven't converted to cmake earlier is because I though that I had not influence over how the output looked, however I recently found out that with source_group you can instruct how the files should be laid out in the solution explorer and, as far as I can tell, it supports placing files directly under the project node, making the solution tidy:
source_group("" FILES ${game_src})

One downer is that you have to type the files to add. While this isn't that different from how visual studio works it is irritating. There is a glob command that can list files from a directory, and while it can, and some projects do, use this as list source files, it isn't recommended. I didn't want to go against recommendations and I didn't want to type files I decided to write a tool to write the files for me. So... two weeks of pythonscripting and four revisions later(iirc) I can add this to my cmake file:
#autogen this:
include(game_src.cmake)
and that tells my cmakegen.py script to autogenerate game_src.cmake in the same folder as the "caller". While the generated files are manually added to hg, and you have to run cmakegen.py when you add new files it support relative include paths (though it is undefined when two different files include the same cmake file) and it does generate the same output on both windows and ubuntu.

sirGustav

sirGustav

 

Hello world, this is me and this is my game!

I am Gustav, I am from south sweden, and this journal is hopefully where I'm going to write about stuff. I'll probably be reposting some of my older posts from my other dead blogs and I got some content in the pipeline and I think this will mostly be about code and gamedesign on my game.

Speaking about the game, the game is a third person shoot/beat em up with soldiers, wampires, zombies and wherewolves. Since I started designing on it back in 90-something, and coding it in 01/02 something, quite a bit has changed.
I've gone through:
4 name changes (was "the best", "infection", "infection: survivors" and now "survivors") a change in perspective (was a fps) at least 2 gamplay changes: It was, and still is, a shoot and kill and walk through the environment, but there was a period of it being a travel back and forth between camps of survivors, delivering messages. 3 different languages (C, C++, C# and now C++ again) 3 revision controls (copy when needed, svn and now hg) 2 engines (genesis 3d in the first write and since then custom open gl ones) 3 opengl startup libraries(sdl, custom and now sfml)and at least 5 total rewrites

With those stats out of the way, I started on this rewrite in July 2009, and I decided that I only will refactor in the future, so I converted the svn to hg less than a year later and it probably wont be long until I start on the refactoring as the rendering engine doesn't look like my target api. In the mean time I probably are going to change from my custom math library to cml (or something), visual studio project to cmake and intermediate mode to vbos, to name a few "smaller" changes that also need to happen.

For thoose who like to have a look(I welcome feedback btw), my game/engine can be found on code.google.com/p/pwn-engine/. I'm not sure I'll be putting survivors related code there however, since I plan to keep everything datadriven.
My c# attempt, among my other c# projects, can be found at code.google.com/p/prettygood/

Here are a few screens that I managed to dig up, for those that are wondering

The first version, C and genesis 3d: http://i.imgur.com/v6u9r.jpg
Some ot the later rewrites, still pretty old, I guess about 4 years ago, it might be my last C++ version before I tried C#: http://i.imgur.com/nC5Kt.png

phew. This was fun, digging though the past. If noone has anything against it, I'll probably dig though my other games and since they doesn't have as much history I'll probably go a little more to the depth, both code, design and graphics wise.

sirGustav

sirGustav

Sign in to follow this  
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!