Jump to content
  • Advertisement


Sign in to follow this  
  • entries
  • comments
  • views

Actor Movement!

Sign in to follow this  


Actors can move now!!

ActorTracker.addActor(new GenericActor("001_s", "Cloud",0,0,1));
ActorTracker.moveActor("Cloud", ActorTracker.EAST, 2);

This is all instantaneos movement, but the more fluid movement is just another step beyond this. Currently the Actor is rendered based on his tile coordinates, but when you ad fluid actor movement there needs to be a boolean that tells the engine to render by pixel values that are offset from the tile coordinate.

Actor movement really got me thinking more about the message system as well... There should be two ways to process commands, one is the instantaneos one (play the music now) and then the other would be a delayed one (play the music in 10,000ms, or play when boolean b is true). This makes it so that I can say display the textbox after he moves down the screen...

So there will be an ArrayList full of commands waiting to be processed at time X, an ArrayList full of commands waiting to be processed when boolean b is true, and then just direct command processing.

While this might all sound really boring, it does bring up a lot of functionality that will be needed in the creation of actual battle maps and the actual battle system.

Oh! And I also added a function to my GraphicsCache class where if you try and load an image from a file, and for some reason it is unable to, it will load a red square instead of crashing.
Sign in to follow this  

1 Comment

Recommended Comments

Ah red squares - that's such a good idea! Why didn't I think of putting that in! :D Something to add this weekend.

Share this comment

Link to comment

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!