As previously mentioned

Published August 16, 2004
Advertisement
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    break;  case State::TRACKBALL_STATE:    // do stuff    break;  // etc.}
I have code like
current_state->do_stuff();
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.
Previous Entry See, I have a life
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

New bug to me

1910 views

Week/Class 9

1740 views

Week/Class 8

1789 views

Week/Class 7

1835 views

The promised files

2115 views

Week/Class 6

1518 views

Week/Session 5

1578 views

Week/Session 4

1519 views

On the soapbox

1636 views

Week/Session 3

1494 views
Advertisement