Sign in to follow this  

Pixi.js simulation

Recommended Posts

Hello everyone! 

I'm working on a website where I need to simulate two entities (a drone and a rover), they communicate with each other trough sockets in the server. I'm displaying these entities using Pixi.js and I have a problem with consecutive animations, for example the drone class has 4 functions (moveRight, moveUp, moveDown, moveLeft) that allows him to move on a grid (tiled sprites and 2D array), all 4 of these functions contain an animation and are called in a function called followPath(), that takes a list of nodes and depending on the coordinates of those nodes plays the appropriate animation! But the code runs way faster than the single animations and followPath ends up playing only the last 'animation', how should I approach a situation where i have multiple animations and I need to wait for them to end before i can do something?  (sending updates to the server, update coordinates and so on). 

Share this post

Link to post
Share on other sites

That's an old Flash wisdom.

There are different implementations, like TweenLite

But, the ability to integrate it with your gameloop or pixi ticker is up to you.

Client-Server is much more difficult, I studied it for several years and I dont know how to describe all the problems you can encounter in a post. Fnd books about multiplayer games development.

Share this post

Link to post
Share on other sites

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

  • Recently Browsing   0 members

    No registered users viewing this page.