Jump to content
  • Advertisement

Yar

Sign in to follow this  
  • entries
    208
  • comments
    383
  • views
    65883

Animation!!

Sign in to follow this  
H_o_p_s

298 views

Edit Note...

After getting fluid actor movement done all there is left to do is gameplay and eventually networking. This is excluding some of the GUI work to make things easier to develop, but it really does show how close I am to actually developing a game rather than an engine. Oh, and 5,314 lines!


All right, I finally did it. The battle engine now supports animation. This was something that I had been putting off because it was required that I rewrite some code into the new framework. I extended the GenericActor object into an AnimatedGenericActor object. It supports an unlimited amount of frames, so there is no worry about getting the animation into just a few frames. The frames also contain the information of how long the frame is, so there are no worries of having animations that pause on a single frame.

Sample:
String[] Graphic_Frames = {"frame0", "frame1", "frame2", "frame3", "frame4", "frame3", "frame2", "frame1", "frame0"};
int[] Wait_Frames = {200,200,200,200,200,200,200,200,200};
ActorTracker.addActor(new AnimatedGenericActor("Name", Graphic_Frames, Wait_Frames, 0, 0, 1};

It is automagically updated and rendered after that. And since it extends the GenericActor class it can be asked to move and other functions.

Next Step: Fluid Actor movement. I've had some ideas, now that I have graphics that have a jump animation I can have the actor jump before moving to tiles of higher height. This will make the movement much better than it was in JavaTactics.

Anyway, thought you'd all like to know.
Sign in to follow this  


3 Comments


Recommended Comments

Animation is one of my least favorite aspects of game programming, which is why you hardly see it in my games. Although, this is of course at the cost of quality.

The engine you're creating looks awesome I might add, and I want to commend you for creating an awesome Java game engine. I haven't seen alot of a Java game programmers here, or at least ones doing as cool of stuff as you are.

Anyways, keep up the great work.

Share this comment


Link to comment
Why is the list of frames of string type? Since they're always (right?) numerical, wouldn't an integer type be cleaner?

Share this comment


Link to comment
@Stompy: Thanks! I really appreciate that comment.

They are strings because the key to the graphics cache is a String object. The frame list could easily have been "actor001_south_walk_0" or something else. They should be integers if I really wanted to save a few ms, but right now it isn't necessary, and gives far more readability to the scripting.

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.

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!