3 Replies - 233 Views - Last Post: 10 March 2013 - 04:10 PM Rate Topic: -----

#1 ShroomiaCo  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 21
  • Joined: 13-January 13

State Machine main class code

Posted 08 March 2013 - 06:24 PM

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.

Is This A Good Question/Topic? 0
  • +

Replies To: State Machine main class code

#2 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10464
  • View blog
  • Posts: 38,783
  • Joined: 27-December 08

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.
Was This Post Helpful? 1
  • +
  • -

#3 ShroomiaCo  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 21
  • Joined: 13-January 13

Re: State Machine main class code

Posted 09 March 2013 - 02:35 PM

View Postmacosxnerd101, 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.

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.
Was This Post Helpful? 0
  • +
  • -

#4 ShroomiaCo  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 21
  • Joined: 13-January 13

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1