• entries
208
383
• views
65546

# Animated Water & Scripting

118 views

Well, I think I just about have the water animation tiles done, I'll get a screenshot up later tonight. The other big thing that I have been working on was how to move a character between tiles. So I started work on my Path class which will handle all movements of my Actors.

Its going something like this:
Path path = new Path();path.createNode(0, 0, 0, 50);path.createNode(1, 5, 0, 50);path.createNode(2, 10, 0, 50);path.createNode(3, 15, 0, 50);path.createNode(4, 20, 0, 50);path.createNode(5, 25, 0, 50);path.createNode(6, 30, 0, 50);path.createNode(7, 35, 0, 50);path.createNode(8, 40, 0, 50);Actor actor = new Actor();actor.attachPath("Move_Right", path);

All in all a lot of the code is similar to my Animation class that handles changing the animation frames. In the update(long milliseconds) I change the animation frames depending on how much time has passed. So in my path class, I use relative absolute pixel drawing (this is a wierd term... but it just means that it is not being drawed off of its internal X,Y values).
With the Actor.attachPath() medthod, it will be used in my scripting engine so when I write something like this:

Map.createNew(10,10);Map.fillTiles(0,0,10,10,"tile_grass","passable",1,"tile_vert_01");test_actor = Actor.createNew("Character",0,0);test_actor.attachAnimationFromFile("test_sprite_01.anm");test_actor.attachPathFromFile("Move_Right", "m_r.pth");test_actor.setActivateEvent("Move_Right");

I also have the option of loading events from file, making the scripting even better :)

Anyway, back to coding... Starting to work on the in game map modifcation methods. This will be the start of the map maker.

-=EDIT=-
Found an old screenshot from back when I was writing my engine in PHP!!! It was going to be an online game, and it was written in PHP and used the GD library for graphics...

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