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.
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:
Overlapping of 2 sprites in the same layer. Could that affect the game anyhow, maybe?
The pixel-perfect stuff.
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
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.
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.
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?
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.
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.