I’m making a platformer game following Makecode tutorials on Youtube and docs on https://arcade.makecode.com/docs but I’m a little confused with some stuff.
I’m trying to create moving platforms in my game but I can’t manage. I have created a sprite that is actually moving up and down but I can’t figure out how to my hero stay on it. Maybe I need to make a tile instead of a sprite but in that case I don’t know how to move it. Can anyone tell me how to deal with that ?
The second thing that I can’t get over is the use of a personnal palette when you display some auto generated stuff like hearts for level of life or effects or even settings menu. I have change the default palette so the colors of the sprites that I have not made are kind of unexpected…
Thanks for the help you could provide me with.
3issa
I can’t answer definitively but from what I’ve seen your approach is the one I would try. Tiles have limited resolution for placement so you would never be able to make a platform that gradually moved with a single tile. Perhaps you could do it with 16 tiles of same platform in different vertical positions but that sounds very hacky!
It all looks a bit jerky on the full screen view although I tried it on a PyGamer and it’s far less noticeable on a small screen. I think there’s a minor bug in the system’s camera code causing most of that. There are a few issues with MakeCode Arcade when it comes down to games which need things to work perfectly at the pixel level.
I think I’d be inclined to set the hero y value explicitly based on some “sprite touching sprite” code but that’s likely to end up with an ungainly implementation of touching - perhaps overlap will work ok here.
BTW, for movingClock variable you can do booleans if you want to. True and False values are in the Logic drawer.
I have found a way to make it work a bit better. At least, when the platform is moving horizontally, it lools pretty fine to me. I can’t try it on a PyGamer because is not easy to be delivered where I live.
What I have done :
sync vy and vx of the hero with the moving platform
set y of the hero a little higher than the platform
set ay of the hero to 0
set the state of the hero to “idle” (no animation)
Quick update for the jerkiness with the position offset approach; would require a fix in the ordering of events in the core game loop that is probably better but has to be considered a bit extra. A bit more details here (also just wanted to comment to say that I love the art in this :))
Just an update to share the last development of the game based on all I have learnt from this forum. Still in progress, there are some bugs that I have to solve.
The game is very playable on an STM32F411 development board.