FPS drop or something like that

I’ve been working on a new project, and I’ve been experiencing some issues.

The game is in its very own early stages, and I’m actually I’m talking about a scene that there’s literally just 4 events (movements to change the animations of a top-down character).

The map is been made, and there’s 17 sprites that are repeatedly on the map.
The thing is: when I run the preview, sometimes the FPS drops hard when I’m walking, and sometimes it runs more smoothly, but it kinda gives some ‘frame jumps’, I don’t know how to explain.

The game is supposed to be pixel perfect, so I’ve changed, in the settings, to ‘Nearest neightboor’. When I changed back to the original one, I feel it runs way more smooth, perhaps with no problem at all. But it is strange anyway: i’m not using any events that requer a lot of ‘‘checks’’ for exemple, it’s basically just a map and a character movement. The GDevelop folder has only 9,7 MB.

Anyone experiencing that?

Almost 10 mb for just 17 sprites?
Do you use a really big Image as background? GD is pretty bad when it comes to handling big images. If you are using a large background image try to cut it into smaller parts.

As you can see, no big images at all. I’m using a 40x40 grid, and almost all sprites are 40x40.

There’s just another scene, which is a ‘RPG random encounter test’, so there’s a lot of events and other images as well, but not much. But anyway, the events from the other page are not been ‘previwed’, so it couldn’t interfere with the FPS in this scene, right?

The only 3 things that comes to my mind are:

  1. Overlapping of 2 sprites in the same layer. Could that affect the game anyhow, maybe?
  2. The pixel-perfect stuff.
  3. My computer could be a piece of garbage. (It is not good, a Ryzen 3 with integrated Radeon VEGA 8, 8 GB RAM and 120 GB SSD).

But the fact that this scene is THAT empty in sprites in event, I can’t understand how it can have such frame drops.

I’m guessing the problem is somewhere in the way your events are put together.

You may want to try making some functions or external events, and loading them into the scene events with conditions as needed.

Also you can test the preview in the debugger to see how long it’s taking events to execute; you may have an unwanted loop somewhere,

From my experience (limited as it is from using GDevelop since July)
1- not an issue unless the sprites are very large, which you say they aren’t
2- If I’m not mistaken, pixel perfect is faster than anti-aliased
3- I’m using an intel2 4gb ram integrated GMA graphics, so I don’t think that’s an issue

Are you by chance running any “for each object” events on any of your objects, with no conditions? The only fps drops I’ve ever seen in my game is when I’ve had events cycling through lots of instances of an object without a condition or timer, that will really wreck fps

Can you provide a screen shot of the scene events? This may shine some light on what’s happening.

Hi. Yes, here are the events from this specific scene:

As you can see, the only event in this scene is the camera. The other one are from this external events, which follows:

If I extend a spirte (not a tiled sprite) would that be consider a problem, in that sense? The sides of the cliff’s sprites are actually sprites that I extend from the top to the floor.

Yep, there’s definitely something wrong with the sprites. The events are not the issue here. I countinued developing the map (using the same sprites), here’s how it is now:

The FPS is now waaaaay worse, I can barely move. I can’t figure out what’s wrong with the spirtes/tiled sprites. :confused:
My other scenes has tons of events, but just almost no map, and it’s running perfectly.

All the sprites/tiled sprites are .PNG. Could that be the problem somehow? I highly doubt it, because each sprite is like 200 bytes in size.

What graphics mode are you using for the graphics? I think GDevelop prefers RGB and doesn’t like indexed or grayscale too much. Also you might check in your resources if you have the “smoothing” checkbox clicked

The smoothing checkbox is not clicked. I want the game to be pixel perfect, so the first thing I did when I created the project was set the Scale Mode to ‘Nearest’, instead of Linear. In the Resources tab, all sprite’s checkbox are unchecked (smooth and always loaded in memory).
I don’t understand what did you mean by graphics mode. How can I check that? My graphics card are integrated Radeon Vega R8.

I don’t know much about graphics… I use gimp. In gimp, it’s under Image → mode

It shouldn’t have anything to do with your graphics card, but in your image editor/graphics software.

that being said, it wouldn’t hurt to make sure you have the most up to date drivers for your video card installed

When does the FPS drop? Right from the start, or when you fire a bullet? I suspect the latter, because when you press the x key, tons of bullets are being generated. Use a “Trigger Once while true” condition on each of the 4 shoot events.

1 Like

No, it’s right from the start. I’m not even firing any bullet and since it’s once the key is released (not pressed), there aren’t many bullets beeing created. I’ve also tested running the game without linking to these external events (in other words, with just the normal top-down behaviour for the player, and nothing else, and it’s still lagged).

Weird. I did literally nothing. Went for a match of chess online, but kept my GDevelop open, as well as the forum, waiting for any reply.
I tried to run the game again, and it was smooth. Before, right from the start the FPS drop was heavy. Now it’s more ok, but sometimes it goes down a bit.
Could that be my computer having trouble renderizing all the map as I walk? :confused:

I doubt thats the issue… my laptop is a dinosaur and i’ve gotten close to 60fps with 500 sprites in a scene.

You can check your render time by running a preview in the debugger/profiler

Thanks. Gonna check this now. Regarding the software, I actually use the Piskel inside GDevelop.

Update: Veeery weird.
The name of the scene is ‘map1’. When I start the Preview being inside the map1 scene, the game right from the starts is lagged as f*ck. BUT, if I start the Preview from the map1 (Events) or from the Start Page, it runs smoothly in the beginning. O_o. What’s the relation?

@schumpeter are you using base assets or are you making everything from scratch inside piskel?

regarding the update, I’ve experienced the same thing. I asked about this recently in the discord channel; @arthuro555 explained it, but I don’t have the technical expertise to give a good explanation; something about the way GDevelop bundles up functions. Maybe arthuro will pop in at some point and give a proper explanation.

I’m making all from scratch.
Actually I did everything on one project, then I exported everything from piskel and added on this new project, but everything was done by me inside GDevelop’s Piskel.

In that case it’s probably not the graphics mode… I don’t know that there’s an option in piskel to change it.

It wouldn’t hurt to try closing out anything you have running in the background. I think GDevelop requires 1GB ram on its own to run plus whatevers needed for your project

The drivers for your video card could be an issue if its an older card and you haven’t updated your drivers for a while, but if all your hardware is in good working order it should be plenty to do what you’re trying to do.

Also would be prudent to ask if you’re using the most current and updated version of GDevelop (beta100)

My graphics are updated. I noticed that I had only 4 GB left in my SSD (I only have a 120 GB SSD for everything, don’t have an external HD or something like that), so I deleted some programs and got it up to 25 GB. I’ve also updated the GDevelop (I was using the beta98 version).

Then I closed everything and left only GDevelop open.
When I run the preview from the Start Page or from the Event’s, it’s running almost perfectly. When I run from the actual scene, it is still lagged right from the start, but I noticed an remarkable improvement.

1 Like