Category: Coding

Chernobog, Week 1

bilibinsmallI’m taking a class called C++ Programming II this quarter, and at the end of the quarter I will have an unfinished game that will be as close to presentable as I can make it in ten weeks.  I’m documenting it here to track my progress and see how far I can take it week-to-week.

“Unnamed Project for C++ II” doesn’t exactly roll off the tongue, so I gave it a working title.  It comes from a 12th-century Slavic god named Чернобог.  Whether the game will actually involve Slavic mythology is not clear.  I’m aiming to make a platformer in the vein of Super Metroid, for the specific reason that it’s more challenging to engineer than a strategy game or some out-of-the-box artsy thing.  The art will be placeholder city, the software architecture will be amateurish, and the whole thing will be woefully incomplete, but I’m putting as much time into it as I’m able.

One restriction is that I use SDL, which is written in C, so the first order of business is wrapping it into an object-oriented framework that will be easier to use as a client.  I got some first-hand knowledge of C from CS50, but I can’t fathom how people managed to organize complicated things like games and multimedia libraries before C++.

I learned some rudimentary XNA over the break, and that’s paying off now because I’m ripping off its basic architecture like nobody’s business.  So far, I have the Game object in place, with various graphics classes simplifying the process of loading and displaying images, as well as a couple of helpful utility classes.  I’ve got plenty of steam left; this is just an arbitrary end-of-week update.

Here’s a fake diagram of the class organization:

classorg01

And what it does, which is pretty boring as yet:

To do in the immediate future: Sprite class, Keyboard input, Animation class, SpriteManager

WordPress Themes