Game: Current State and Goals
08/23/14
So, right now my game is split along six cpp files:
- main.cpp: where the main function is
- image.cpp: wrapper functions to SDL image library
- clock.cpp: for frames per second and clock related functionality
- game.cpp: where the game loop lives
- world.cpp: currently just holds and renders the background image
- player.cpp: Holds player sprite, and handles mouse click events
For the next commit, I'm going to focus on splitting the player into separate bits of functionality. Right now, the Player class knows about where it's image is, what an SDL_event is, what gravity in the area is, and so on and so forth.
I want more than just the player to have a sprite to render (including the background) without copy-pasting code and without it being another player object (world.cpp has copy-pasted render code right now).
Basically, I want to mutate towards a component system, I think. But I don't want to make the mistake I made with my pygame toy and build a whole bunch of extra functionality right out of the gate. I need to build something simple, the makes what I currently already have easier to manage and improve, but nothing more. I need to think ahead only for general direction, I should not do any extra coding in the hopes that it'll be useful later.
Anyways, above is what I currently have working so far. You may be thinking, "Wow, that's pretty good art."
....
Yeah, that's placeholder art. You should know that, because it's Samurai Jack and Samurai Jack is awesome. That's a fan-made Samurai Jack spirte. I used these without permission. I need to put proper sources in the repo at some point before I take the art out, so anyone going through the history will have access to them.
I'll do that right now. The sprite appears to have originated from a neoseeker forum. Image search finds no other results....
The background is straight-up background art from the Samurai Jack show.
I do not own nor am I responsible in creating any art in the game so far. And by tomorrow I'm going to replace it with basic art that I do have the right to use. (I'll cook something up in gimp.)
I'll make a commit sourcing the real artists and then I'll switch to homebrew placeholder art. Next steps found!
PS: I'll have posts that go in-depth on how I got to the currently state of the game. They'll be one commit at a time. There's 13 commits between the basic commits I already went over. Most of the posts will be short, I think.