0
\$\begingroup\$

I'm working with Melonjs, i have configured everything to update the character movement and still get this "delayed" rendering of the character.

below is the constructor

  // call the constructor
  settings.image='kit.walk';
  settings.spritewidth=56;
  settings.spriteheight=80;

  this.parent(x, y, settings);
  this.alwaysUpdate=true;
  // set the default horizontal & vertical speed (accel vector)
  this.setVelocity(3, 15);
  this.setFriction(0.4,0);
  // set the display to follow our position on both axis
  me.game.viewport.follow(this, me.game.viewport.AXIS.HORIZONTAL);
  this.renderable.addAnimation('walk',[0,1,2])
  this.renderable.setCurrentAnimation('walk');
  this.anchorPoint.set(0.5,1.0);

i'm not very familiar with the engine, but it doesn't seem to be a problem with the engine, i think is a configuration problem somewhere.. i tried to look into examples but nothing helped so far.

could it be a problem with the sprite?

delay effect

\$\endgroup\$
3
  • \$\begingroup\$ By the image provided it does not look like you are clearing your canvas or viewable area between frames. \$\endgroup\$
    – Casey
    Commented Mar 16, 2014 at 3:35
  • \$\begingroup\$ i found the problem, i didn't declare "backgroundcolor" map property in Tiled when i did it changed and rendered correctly \$\endgroup\$
    – Gntem
    Commented Mar 16, 2014 at 8:38
  • 1
    \$\begingroup\$ @GeoPhoenix Can you add that as an answer please, so that this thread gets closed. Thanks. \$\endgroup\$ Commented Mar 16, 2014 at 11:01

1 Answer 1

1
\$\begingroup\$

Apparently not declaring backgroundcolor as map property in Tiled and just leaving transparent background causes this.

Adding backgroundcolor with value #191919 or any other color at Map->Map Properties will render correctly the animation.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .