• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

State machine questione

L

Lemonz

Guest
I am thinking about making a turn based shmup prototype. The idea is that everything including bullets do not move unless the player inputs a command.

So I think how this would work is that there would be a global object that controls everything and each object reacts based on input.

Am I on the right path for this or should I start the process over? Maybe I do not need a global object at all? I'm also curious about timers. Would I need any timers if I am setting everything to look out for inputs?

I think if I did timers I could use them for "after x amount of inputs shoot a bullet" or something along those lines.
 

obscene

Member
Yeah I think I would use a controller object that gets commands and sends it to all your instances....

From your controller object
Code:
var up=keyboard_check(vk_up);
with (all) {global_up=up;}
Simple as that. Would definitely be more efficient if you had a convenient parent object you could use instead of all, but otherwise I think that's the best way.
 
Top