Player is much bigger than expected

I’ve just started using GDevelop, and I’m trying to make a simple top-down shooter. I’m using public assets for all of my sprites.

In the editor and in the player object’s properties, the height and width correctly describe its size. But when I run a preview of the game, the player’s dimensions seem to be over 50 times what it was in the editor. If I had to guess, the sprite stays unchanged but the actual size values multiply, since the projectiles are in the correct position ( playerX + (playerWidth / 2) ).

Right before this happened, I was resizing the projectile’s sprite in the piskel editor. But even after I undid my changes to that sprite, the player kept its incorrect size.

tldr player too big :‌(

Can we perhaps get a bit more info? What is your game resolution? What is the actual size of the image you’re using? Maybe also a screenshot of the events that are possibly changing the size of the object?

Of course, should have done that at first. Game resolution is 1280x720 (the desktop & mobile landscape preset), the asset is 38x34 pixels, and i’ve been changing around the object’s size for testing, but in the screenshot, the properties say it’s 22x22

editor (character is a ship in the middle):

and this is the preview:

Does the ship just have a single image or are there multiple animations? Is it on a dfferent layer than the green octopus? When you say the properties are 22x22 is that the custom size of the object as listed in the left panel of the scene editor? What happens if you delete that particular instance (not the whole object) of the ship from the scene and drag a new instance in?

  • The ship has only the one frame, no animations
  • They were both on the base layer, but after experimenting with different combinations the issue remained
  • Yes, 22x22 was the custom size of that object in the left panel
  • Deleted the old one, the new instance has the same issue
    In the end I just decided to create a new object with pasted behaviors and fixed all the code to fit the new one. This new character keeps its size. You’ve been really helpful but I don’t really feel like having this much trouble with a beginner project :sob:

Haha I hear you. We think we want a quick, easy and finished project. But maybe the real treasure was the friends we made along the way…

1 Like