Check out the latest Staff Blog update that talks about what's changed, what's new, and what's up with these "Pixels".
About this blog
The ups and downs of a self taught programmer.
Entries in this blog
Also i fixed the updatescreen issue.. Seems during my editing trying to get things to work I deleted my updatescreen call from my main loop...so thats fixed
All i need to do now is have each class register itself automatically.. Iam sure I can do it through the class constructor... not sure though.
I just need to setup a stack/vector or something to hold all the diffrent interfaces that have events.. like menu - playgame - character and all that jazz.. But I figured out a way to hide the implmentation of SDL and still have it work well... Ima think about putting a bind system in so you can bind keys to the diffrent events.. we shall see.
I owe thanks to the event handling article. though iam not doing it the exact same many things taht have been made are modeled after what it did...
anyway tme to sleep maybe ill be able to do something useful toward the engine tommorow
It uses SDL for the video
It uses SDL_mixer for sound
The network API is undecided yet
I was thinking that this first version will be based for simple pen and paper/board games.. Or I might build it up so it can do a full scale RPG
Video system class to do all the inilization and drawing to the screen as well as tracking the x and y of each surface(this may change)..
A surface class to do all the loading and and setup of the surfaces that will be dealt with.
Audio system class that plays and initlizes sounds/music
Effect class for loading and setting up sound effects
Music class for doing the same thing as effect but for music
Not much here
Currently the system class has the game loop/kernal(whatever you want to call it) but it dosent do much else
this is where Iam working right now and I plan on adding
a Event system to do all the event procesing. a Logging system to log errors and such. And a timer system to track all the timing stuff...
Ill keep you all updated and if I can clean things up i may post a screenshot even though it will be extremtly boring right now lol..
[EDIT] haha VC++ 6.0 wont complie it
here is an example
static SDL_Surface* main_window; // here is the error
// the rest of my crap
Dunno if its VC++ 6.0 or iam not implmenting the static member right i dunno its late and i just worked all day ill get my book outa my truck in the morning..
What the book says static does is make that static member the same for all instances of the class which is great for making a min window in a video system class for SDL... but it wont compile.. ill re read teh section in the morning. night all
Anyway work goes as normal on Engine. slow until works over but Iam trying to get some done. Still havent had time to actually tackle the coding of my event system. thinking about how exactly i want to do it. I think iam going to read through all of the SDL docs for events this weekend and then go from there. well take it easy eveyrone
Who would have thought hiding the SDL API complety from game code would be this much of a pain.
I have the system right now.. my engine has a video/drawing class, it has a audio class (these work fine the way i want to use them.) Then I have my system class which is going to handle all loading/saving and events and for now thats it but it is open to more.. But that dosent work with what I want to do which is have my player class access the system class event system. but instead my system class event system has to handle all the actions of the game like if w is pressed then do the game class action of move north or drop block(depending on game)
I just had a semi idea .. each part of the game gets its own system event and it jumps into that when the gmae is at that point likeyou have your map.system.event then if esc is pressed it goes to menu.system.event which is really just another message loop of its own... and it handles the event each way in its own way.. of course it seems like it would take quite a bit of wrapper work to hide SDL but this sounds like a pretty good idea...
Man I love these journals just writing that out gave me a idea i feel is good.. Iam going to work on that after work..
What do you all think.. am I just shooting off in the wrong direction? either way Ill find out I guess........ until next time