Game dev – Game structure, Github, SFML and early version of the game.

We have sat down, us programmers, and discussed how we want the game built with engine, managers and states. We use a program for flowcharts called Dia. It seems to have some bugs though so maybe we will change it out. This is an early version of the flowchart I just mentioned. A work in progress:

Image

We worked on it, got feedback and here below is the final version as it looks now. Things might change:

Screenshot 2014-01-31 00.37.09

I added delta time in SFML as well. I used this function and I believe that it works. Here is how it looks now:
void Engine::UpdateDeltaTime()
{
m_xDeltaTime = m_xClock->restart();
m_fDeltaTime = m_xDeltaTime->asSeconds();
}

We have started using Github. Jonas showed me and Malin how to use it. I struggled with a weird error in the beginning of using it. No need to go into details but it works now. It seems really good but I save backups on my computer just in case.

I took over working on the SpriteManager from Jonas, who built it from the start. It works pretty good right now but it needs more work. This is the significant function within the Manager right now, the Load funcion which returns a sf::Sprite pointer. It saves all textures and sprites in two different maps. The textures are re-used for each sprite that need them and the sprites are saved in the map with a std::string name. Check it out if you want:

Image

I am currently sprinting towards making the game playable. It will be coded without all the fancy managers and states and an extremely simple version of the game BUT it will be playable. I have placed all things in the Engine right now and as managers and states are added things will be moved to their correct places.

I have learned a lot about using SFML and it’s soooo much easier to work with than SDL. You get very much for free. But it doesn’t support everything. I want to make a custom Sprite class because the built in class in SFML (sf::Sprite) doesn’t handle animations.

Here are some screenshots of the current code and the status of the game when it runs:

Not the best movement, I know:

Image

Adding rooms (or zones) and enemies:

Image

The game running. Keep in mind the sprites will look better later on, these are kind of placeholders:

Image