I've been looking into State Machines and learned a lot: timers, canvases and other stuff.
I found a nice tutorial that I finally managed to make sense of after learning this info, but I am having an issue creating the main class for it.
The Tutorial This link contains the basic layout of my State class and my StateMachine class. Only difference is I am using a mouse listener. t. I have been tryint to make a main class, but I am a bit confused. Most importantly, I want to use the Runnable interface.
I am very bad with threads/runnable so any tips would be greatly appreciated.
State Machine main class code
Page 1 of 13 Replies - 99 Views - Last Post: 10 March 2013 - 04:10 PM
Replies To: State Machine main class code
#2
Re: State Machine main class code
Posted 08 March 2013 - 06:50 PM
A Main class is only a few lines of code to start the program. It's not involved, and the example in Dogstopper's tutorial isn't sufficient to copy/paste to run.
Some of Dogstopper's other blog entries expand on some of the tools, like an InputManager and the structure of a game.
Some of Dogstopper's other blog entries expand on some of the tools, like an InputManager and the structure of a game.
#3
Re: State Machine main class code
Posted 09 March 2013 - 02:35 PM
macosxnerd101, on 08 March 2013 - 06:50 PM, said:
A Main class is only a few lines of code to start the program. It's not involved, and the example in Dogstopper's tutorial isn't sufficient to copy/paste to run.
Some of Dogstopper's other blog entries expand on some of the tools, like an InputManager and the structure of a game.
Some of Dogstopper's other blog entries expand on some of the tools, like an InputManager and the structure of a game.
Sighs... I figured that out, and I did not copy his code, I derived structure from it, and I have my own listener class etc.
That tutorial on the structure of a game helped a bit...
I read the other one so that was not necessary,
but overall thanks.
#4
Re: State Machine main class code
Posted 10 March 2013 - 04:10 PM
Disregard this post from now on, I got it figured out and my State Machine is working now.
Thanks everyone who helped me.
Thanks everyone who helped me.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote






|