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

As previously mentioned

Sign in to follow this  


Well, dodecahellspawn is compiling again, seemingly without any loss in functionality except for the aesthetic improvements in the solver. Basically, the big change here was that I went from hard coded states to a more extensible object oriented state system. So instead of code like
switch (current_state) {
case State::BASAL_STATE:
// do stuff
// do stuff
// etc.
I have code like
There are pluses and minuses to this system. For example, now all the different event handling code is spread across a bunch of different classes. However, the current state system now allows nested state machines. So the solver state contains a bunch of undo states that will transition to a orient state. And the undo states are themselves state machines that contain orientation and rotation states. This allows me to eliminate some of the unsightly code duplication, and actually reduced the total number of effective states in the system.
Sign in to follow this  


Recommended Comments

There are no comments to display.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!