• Advertisement
Sign in to follow this  
  • entries
    208
  • comments
    383
  • views
    65742

Pathing

Sign in to follow this  

104 views

In the first version of JavaTactics that was posted (still downloadable above...) I had something that I was calling paths. Now these aren't the paths found to for moving from one side of the map to another, but rather for moving in between one tile. Its a set of nodes that have relative pixel locations based on time duration.


Path aPath = new Path(1 1,1);//CREATES A NEW PATH WITH ID 1, AND FINAL MOVE COORDS TO dx=1 AND dy=1
aPath.createNode(0,0,100);
aPath.createNode(2,1,100);
aPath.createNode(4,2,100);
aPath.createNode(6,3,100);
aPath.createNode(8,4,100);
aPath.createNode(10,5,100);
aPath.createNode(12,6,100);
aPath.createNode(14,7,100);
aPath.createNode(16,8,100);
aPath.createNode(18,9,100);
aActor.attachPath(1);//ATTACHES PATH 1 TO THE ACTOR

aActor.activate() {
getPath(path).start()
}



Following this method it is really easy to make new movement for our actors. From jumps to simple moving.

The problem that I'm having is with my event system in the new version...but should have that fixed by tonight.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

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