Platformer Tutorial - Part 8 - ending up with duplicate players and levels

32 views
Skip to first unread message

mre...@gmail.com

unread,
Dec 3, 2016, 11:49:42 AM12/3/16
to melonJS - A lightweight HTML5 game engine
in http://melonjs.github.io/tutorial-platformer/#part8 , I've gotten the transition to level02 to work thanks to some assistance on a previous ticket. But now I'm getting duplicate players, and level02 seems to be layered on top of level01 - I can see map elements from both. Also, the active player I placed in level02 leaves a trail of itself when I move it. Screenshot: http://screencast.com/t/giq7TrRmKnVX . I'm not seeing any errors in the console.

playable demo at https://mrengy.github.io/pesky-squirrels/boilerplate-master/

Melon JS v3.1.0
Mac OS 10.11.3
Chrome Version 54.0.2840.98 (64-bit)

mre...@gmail.com

unread,
Dec 3, 2016, 11:53:01 AM12/3/16
to melonJS - A lightweight HTML5 game engine, mre...@gmail.com

Jay Oster

unread,
Dec 3, 2016, 5:12:33 PM12/3/16
to mel...@googlegroups.com, mre...@gmail.com
Hi Mike,

I just noticed the tutorial game itself was missing a LevelEntity class, so I just added it. The tutorial uses version 3.1.0, but I have verified that LevelEntity works as expected on 4.0.0, too.

Anyway, you're getting those streaks behind the player because your area02 map does not have a background. You can either set the background color in Tiled, or add an ImageLayer.

No background means there is literally nothing to draw, so it leaves whatever pixels were last drawn to the screen.

--
You received this message because you are subscribed to the Google Groups "melonJS - A lightweight HTML5 game engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to melonjs+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

melonJS

unread,
Dec 3, 2016, 8:20:08 PM12/3/16
to melonJS - A lightweight HTML5 game engine
Oups... the 4.0.0 update, forgot to merge it back into master ! :)

mike eng

unread,
Dec 4, 2016, 1:09:45 PM12/4/16
to mel...@googlegroups.com
Got it. That was easy. Thanks again!

---

On Sat, Dec 3, 2016 at 8:20 PM, melonJS <evi...@gmail.com> wrote:
Oups... the 4.0.0 update, forgot to merge it back into master ! :)

--
You received this message because you are subscribed to a topic in the Google Groups "melonJS - A lightweight HTML5 game engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/melonjs/sR40lHahQwE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to melonjs+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages