• entries
108
319
• views
137802

# Progress A Plenty

113 views

I've made a big leap in the progress of Lucid. Not only did I fix the major game state problem I was having, I also encorporated zooming into the sprites and made it so that the camera was seperate from the surface screen. This allows camera view changes which will become mighty helpful later on....

You can download and try it out. It's nothing much but can be entertaining. There's a bug in there somewhere, see if you can find it [smile]. Arrow keys move the guy in the center, space changes his look. Right click and left click add and take away balls, as usual.

If you're wondering about what the state machine looks like, I just use a class and then have a CurrentGameState variable defining where the game should go:
class State{public:	virtual void Enter(){ }	virtual void Update(){ }	virtual void Draw(){ }	virtual void UserInput(int value){ }	virtual void Exit(){ }};extern State* CurrentGameState;void SetState(State* state);
I made the functions virtual as opposed to abstract as you might not even want to program in the Exit or Enter functions in the derived State class. The next test I do for Lucid will include the use of this state machine.... So be patient.

As for scripting, I'll have to see what the capabilities of ieach script are before I choose one to really devote to. I'd like something that has the ability to modify and create class objects and stuff like that. So far I'm thinking either Squirrel, GameMonkey Script or Lua. Any other suggestions? Evolutional had a bunch, but I liked GameMonkey the best out of what he recommended. Haven't really compiled anything else....

... Just released the SDL_gfx DevPak for Dev-C++.

### Random Interest

You could also look at AngelScript by WitchLord on these forums. I haven't used it myself, but at least Andreas is really hot on his community support which is a real plus.

BTW: If you go with GM, you might find my tutorials useful. Which reminds me, I need to finish them - oh for the time :(

Other than that, I admire the progress you're making on your game coding. You're a man of many talents, Loach =)

Interesting work, Rob. I was wondering if you could give me some input on my method of gamestates.

What I do is create an enumeration containing all gamestates, and use that enumeration embedded within if statements in an infinite loop in the main() function.

Anything wrong/right with that?