Sprite animation, collision masks, example file uses

Edit:It’s a little bit better with single large sprites as opposed to tile maps/tiled sprites/lots of sprites. Platformer now bounces off of the platform and isn’t visible most of the time, though. I also don’t know how to make it flip properly.

I tried to make a basic platformer, but something’s off. The player is often invisible, and when jumping/falling/running immediately dissapears or shows a frame or two before dissapearing. I think the images aren’t properly in, but the image bank says they are.

It sometimes appears, but not often. The collision with platforms seems to be wonky: the character likes to lodge itself into platforms and glitch around when colliding with them(including jumping onto or into them, or running on them).
(Mostly seen by camera/debug, I can’t see the player most of the time.)

The images in the image bank also aren’t working right, I think. I made another platformer object with the fall image and placed it, but it didn’t appear in the scene; a small(smaller than the selected image) box with no image appeared when I selected it. The images are in their place relative to the project folder.

I tried making a small square bottom collision mask to “stand” on, in addition to the other collision masks which are wrapped around the sprite as tightly as possible, but it didn’t seem to help, so I don’t think the masks are the problem, unless they have to be the size of the sprite.

Making the character larger seemed to make it more clear: when jumping, it just straight up dissapears. When running, it seems to run and then glitch out with the platforms. Really big character still didn’t fix it. I don’t see any options for platforms, so I don’t know what I’m doing wrong there.

Is there a way to zoom in when making collision masks? The only option I know of is lowering the screen resolution.

Also, are all of the files in examples free for same use as the engine/games made in it? The one I’m using is player(_run/_jump/_fall). I couldn’t find it in any of the examples, too, just the folder.

Holy wall of text, Batman!

There’s an example of Platformer game with GDevelop that works perfectly. :wink:

Collisions might be strange if all your animation images don’t have the same size (then the sprite size changes each frame).

Also, check if your png images are saved in 24/32 bits and not in 8 bits (doesn’t show in games if it’s the case).

EDIT : If you give us your project file (with all images), we can test it.

Sure thing.
New Compressed (zipped) Folder.zip (24.8 KB)

That’s exactly what I thought : the png images must be in RGB mode (24/32 bits) and not in indexed mode (If it’s the case, they are shown correctly in the editors but not when rendering in the game, causing some weird glitches).

To convert an indexed png image to a RGB image, you can use Gimp :

  • Open the png
  • Image > Mode > RGB
  • Export… (not “Save” as it will save the image in Gimp format)

I’ve converted the player images (from the folder New Folder) :
New folder.zip (10.1 KB)

(Everything works correctly)

Thank you very much. Are all the included files licensed for the same use as the engine/its output?

Not the same licence, but they are free (almost the same).

Ok, I was just want because those were in examples but didn’t appear to be in any of the example projects. Are they a leftover from something, or thrown in to use?

You can do what you want with them (that’s why we embed them in GDevelop)

There is also another problem in your project. You are testing if the user press on “Left Arrow” / “RightArrow”. It’s “Left” and “Right” instead (you should prefer using the other key press condition (without “text expression”) as it will automatically set the correct key according to which key you’ve pressed)