Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Progress A Plenty

Sign in to follow this  
Rob Loach


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{
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

Sign in to follow this  


Recommended Comments

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 =)

Share this comment

Link to comment
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?

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!