Jump to content
  • Advertisement


Sign in to follow this  
  • entries
  • comments
  • views

Animated Water & Scripting

Sign in to follow this  


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:

test_actor = Actor.createNew("Character",0,0);
test_actor.attachPathFromFile("Move_Right", "m_r.pth");

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.

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...
Sign in to follow this  


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

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!