Summer Project 2014: Week 1
|
Back again after a short posting break, this time with a new project! The project this time is an unofficial summer course in programming, both for fun and to compliment whatever was missing in the Game Programming 1 and 2-courses. Short version is “make a game, blog about the development process, write a report”. For this project, I have decided to make a roguelike, where randomness is everywhere (like it should be in a roguelike). Everything from the room layout to the stats of you and the enemies and the stat increase from loot is randomized. The design document and schedule can be found here. Source code can be found on GitHub, here. This first week has been kind of busy for me, since I got nominated for (and won!) SGA, as well as midsummer stumbling in at the end of the week (this is also why this post is actually one day late). This meant that I couldn’t code as much as I wanted, but oh well. Since randomness is at the core of a roguelike, the first thing I had to do was get an unbiased RNG (Random Number Generator). Luckily, C++11 added the header, which contains the popular mersenne twister-PRNG (pseudorandom number generator). The reason for choosing the mersenne twister over the other available RNG’s was simply the widespread use of it. In my eyes, that means it has been tested over and over to make sure it provides the randomness needed. Game states and their associated manager got ripped from an earlier project. It worked well during these earlier projects, and ripping it saved me a bunch of time. Why make something new when the old one still works, right? The rest of the code (at this stage) is fairly standard. Make an engine, create the various managers, set up a rendering window, run the game loop. No plans for animations, so no need to make a wrapper for SFML’s sprites, nor an AnimationManager. Sound will come at a later stage, probably. The thing I’m currently trying to figure out is how to create the room layouts in a good way, while still keeping it fairly random. That’s what I’ll be working on next, until it’s done.
|