Page 1 of 3

SSSF --> SnowStorm State Framework

Posted: Fri Feb 06, 2004 10:45 pm
by Robomaniac
I don't know where to post this, so I guess it belongs here. I've started on a project called the Ogre Game State Framework (OGSF). This will be a very, very watered down game structure, like badcamels, but w/o alot of features. This is mainly for people who just want a very basic game state structure and then just code the rest. This is based on the ICE (Irrlicht Common Engine Framework, This is just starting, but i've got the very, very basic structures worked out. I also have one screenshot to show everyone, nothing too much.


Posted: Sat Feb 07, 2004 1:08 am
by mashadar
Just to let you know, geocities doesn't let you link directly to images, so you'll have to link to a html file.

However, i saw the shot you had of OGRE running with the framework in your gallery, and it looks very impressive. I would like to see what you've done thus far.

I have been trying to get a simple game framework setup for myself (it's going rather slow), so if your looking for a helping hand, i would be glad to help.

Posted: Sat Feb 07, 2004 1:10 am
by Jezze
To be able to see the picture you have to make a new browser window and enter the text in it instead of just pressing the link...

Posted: Sat Feb 07, 2004 2:05 am
by Robomaniac
The screenshots in the shots page are not using the framework, but i've been having some troubles getting it to work. I can't seem to get it to run, but thats just me not really knowing the engine. If anyone wants to help a bit with some of the structure stuff by giving my some ideas about basic structure, that'd be great. Since there are no tutorials that don't use the ExampleApplication.h file, i've been having trouble getting one to work w/ my program format.

Posted: Sat Feb 07, 2004 2:15 am
by Robomaniac
Posted my source at ... mework.htm . If anyone would take a look at it and point me in the right direction, that would be appreciated

Posted: Tue Mar 09, 2004 8:48 am
by Robomaniac
Well, i've finally picked this back up, and it is almost to version 0.5. It currently has :
--> Input passing
--> Game States
--> Config Reader (from ogre)
--> basic Game Engine

Still Needs :
--> XML Parser
--> new configuration screen
--> actually useful gamestates (not just test ones)
--> More Stuff

Posted: Tue Mar 09, 2004 2:58 pm
by Robomaniac
Link -->

It should be up by 9 AM Eastern Time (aka. 4 minutes from this post)

Hope you like it.

It currently only has a dev c++ project though, as i am in the middle of converting it to visual c++

Posted: Tue Mar 09, 2004 6:38 pm
by Spoke_not_loged

We are working on a framework which uses code from here and there (bad_camel framework and the like) and we have a Game State Manager System working.

We are currently porting the GameStates to LUA so new game states can be defined as LUA classes without recompiling the exe.

The test, so far, are working fine and we spect to have something to release in the near future.

See you arround.

Posted: Tue Mar 09, 2004 6:47 pm
by psyclonist
Robomaniac wrote:Link -->
Can you provide the file on another host ? Or email it to me ? sites are a bit difficult to access from Germany, at least without using certain proxy servers.


Posted: Tue Mar 09, 2004 8:06 pm
by Antiarc
Psyclonist: I've mirrored it for you at

Posted: Tue Mar 09, 2004 8:27 pm
by psyclonist
Thanks a lot, Antiarc! :D


Posted: Sat Jun 19, 2004 12:40 am
by Robomaniac
Well, i'm picking this back up again for my upcoming game. Expect a refactor/rewrite and source posts every now and then :)

And Visual C++ Projects :)

If there is a demand for a dev c++ project, i'll add one, but if noone tells me, i'm not gonna go through the effort ;)

-- The Robomaniac

Posted: Sat Jun 19, 2004 1:42 am
by toastie
Robo, you're up there with wolfman8k, as far as geniouses under 15 go :)

Posted: Sat Jun 19, 2004 3:37 am
by Robomaniac
Why thank you :)

Posted: Fri Jun 25, 2004 8:23 pm
by wolfman8k
toastie wrote:Robo, you're up there with wolfman8k, as far as geniouses under 15 go :)
I'm not under 15.

I feel old :cry:

v 2.0 Feature List

Posted: Wed Aug 04, 2004 7:12 am
by Robomaniac
v 2.0 Will be coming out tomorrow, its feature set will be:
  • Saving and Loading of States from Memory (think Resume Game buttons)
    Cleaned Up Interface
    Game States now hold their own frame listeners, so one state can used buffered, another, unbuffered input and such
More features will be posted tomorrow (when I add them)

Optional Modules:
toLua++ Generated Lua Bindings
Documentation Manual

Look back tomorrow for the download!


Posted: Sat Aug 28, 2004 7:37 am
by Robomaniac
Well, a new version got done today. It uses the same principles as the 2.0, but much cleaner, and in a spiffier manner. ... p?download

Since i didn't get the chance to document it (and hardly any code comments :)), here is a short tutorial on how to use it.


In your main function, create an instance of SSSF::GameEngine;

Code: Select all

SSSF::GameEngine* engine = new SSSF::GameEngine();
For each gamestate you would like to create, create a child class of GameState

Code: Select all

class GS_Server_Brower : public SSSF::GameState
A test bed game state is included.

in each of your GameState classes, add the following memebers
  • bool Update(float timeSinceLastFrame);
  • bool OnKeyEvent(float tslf);
  • bool OnMouseEvent(float tslf);
  • bool Create();
  • bool Destroy();
  • bool Hide();
Update(float tslf)
Does what it says, it updates the game state. Include any parts that need updating here.
Param: time since the last frame

OnKeyEvent(float tslf)
Here you process key events, although you could do it in Update, OnMouseEvent, wherever, this is the function that gets called
Param: time since last frame

OnMouseEvent(float tslf)
Same as above, but w/ mouse events

Here you create the items needed by the game state. Use this function instead of the constructor, so you can restore states.
See: GS_TestBed

Does nothing as of now

Hides the game state items, but keeps them in memory for future reference. If you want to remove the game state from memory, call Destroy right before you switch states.

In your constructor, or after you create an instance of a game state, to register it with the state_handler (GameEngine), call

Code: Select all

GameEngine::AddState(GameState* state);

States::GS_TestBed* state = new States::GS_TestBed("GS_TestBed", engine);
To switch to a different state, call the GameEngine::ChangeState function with the string handle of the game state you gave to ur state.


Code: Select all

...GS_TestBed("GS_TestBed", engine)...
This allows for easy extension using scripts. For example, using python (once bindings are made) (please don't mind any code errors, my python is a bit shakey ;))

Code: Select all

class GS_Main_Menu(GameState):
    #Functions go here

GS_Main_Menu menu("Main_Menu", engine);

This way, you can effectively create all of your gamestates in scripting, while keeping your ogre init and base code in c++.

Hope you like it, and expect mroe upgrades at random points.

P.S. The reason for the name change is that it is now part of the game engine i'm making, codename SnowStorm.


Posted: Sat Aug 28, 2004 6:01 pm
by Robomaniac
Also, i didn't include a project file as i don't have one. I've been as i said, developing this for my game engine (which may or may not be released)

Just add all files to your project, point to the ogre headers, and point to the ogre lib.

It's been tested using .net2k3 and i'm 90% sure it'll work on all other platforms.

If u get any errors, try to fix them, and if u can't just give em to me, and i'll see what i can do

Posted: Mon Aug 30, 2004 7:07 pm
by Robomaniac
Ok, some errors reared their ugly ugly heads.

1) m_RenderWindow->setDebugText(); does not work for some strange reason :\

2) I added a static Get function to the GameEngine class which acts as a getSingletonPtr() in ogre classes

I'll update the release in a few hours

Posted: Tue Aug 31, 2004 1:19 am
by PeterNewman
A tip for the setDebugText Robo:
WHat the ExampleApplication does is every frame (or so) it will call mRenderWindow->getDebugText()
It then gets the DebugText (or something similar name) element from the default Ogre overlay, and sets its value to the debug text.

I dont know if in the past the RenderWindow was responsible for this and with the chages to the GUI system its been moved out. But I know you said in the IRC that you weren't using the ExampleApplication, so I'm guessing that the setDebugText will never get displayed if you do do the update-the-overlay step.

Posted: Sat Sep 04, 2004 11:03 pm
by Robomaniac
Stupid, Stupid Me. :oops:

I switched this time writing this from using for loops to while loops for doing iterators.

I seem to have forgoten an i++; in each loop though :(

I'll post an updated version tonight, with a few enhancements.

Posted: Mon Sep 06, 2004 2:14 am
by Robomaniac

Errors, lots of unexplainable ones happened yesterday, i don't know what set them off. I'm rolling back to the old version and going from there.

Luckily, theres not too much of a difference

Posted: Wed Sep 22, 2004 1:19 am
by Robomaniac

Long time, no work.

I have got SSSF back to its improved state, and it seems to be working. I also generated lua bindings fine (toLua++) so those are included

I will upload another binary whenever i can get the chance (sat or sun most likely)

Btw, is anyone using this and has any suggestions for ways it can be improved?

Posted: Thu Sep 23, 2004 12:08 am
by Chev
Hi Robo! I decided to test this out today :)

Here's the code I'm using for my main loop. The demo runs and I see the ninja and can move around. When I hit esc it just hangs on engine->Destroy(). Do you have an example "main.cpp" that shows how to properly set up the loop and/or shut stuff down?

Code: Select all

#include "windows.h"
#include "Game_Engine.h"
#include "GS_TestBed.h"

	SSSF::GameEngine* demo1 = new SSSF::GameEngine();
	while (demo1->Update())
	return 0;

Posted: Fri Sep 24, 2004 5:22 pm
by Robomaniac
Sorry for the absense, i do, but not on my hands right now.

If it is running in debug, it'll take 10+ seconds to shut down due to ogre doing a mem leak check. If you in release, it should shut down pretty fast.

I'll check my main.cpp either tonight or tomorrow, depending on when i get my comp back