The last 2 weeks were probably the hardest and the most annoying in my upcoming game
“Miko Adventures:puffball” … Here is the full devlog if you haven’t already saw it: Miko Adventures: Puffball devlog 😮 - #70 by CorianderGames
.
A month ago I started drawing the basics of the biggest level probably in the whole game, And after the drawing process in PS I decided it’s time to add the level into the engine and oh boy … A nightmare stared … performance was … look … I won’t say terrible but bad … it had this micro stutter that was consistent and didn’t go away so I decided cool let’s get back to PS And slice the picture even more to smaller picture … here’s how it went…
.
The level was more than (13000 x 12000 px) … yeah big I know!
So I started cutting the image into 4x4 (16 pictures) but didn’t’ work … 5x5 (didn’t work)
then 6x6 - 7x7 - 8x8 - 9x9 - 10x10 - etc…
Nothing worked (after over 8 days no sleep - food or anything) I was weak tired and scared about the game and what I’m going to do … I felt awful because I thought at the moment I wouldn’t be able to make it work and this means that the whole game is at risk … I slept (broken inside) …
.
The next day I woke up and I decided to do the impossible … which is cutting the image even more (to 32x32) which means I had to go through 1024 pictures … yes it’s painful
I didn’t even know if it will work or not and I decided to do it … I mean nothing was working so I might as well just try it and see who knows …
after 6 hours of adding pictures into parts … each with separate animations … numbers … lot’s of them … objects … hundreds … my eyes watering and dry … red … my fingers are going to stop working.
.
I open the game and BOOM!
It worked
I made gdevelop run probably the biggest level to be ever made in the engine (98% work fine with so little to no lag)…
the last 2 weeks were painful but I was determined to keep on pushing the boundaries of Gdevelop, I believed it can do it and it did…
.
So to the people wondering can you run a big level in a game you’re creating … the answer is 100% yes … but keep in mind these notes:-
.
1- JPEG 50-80% if you can … if not then PNG-8 (But I don’t recommend it with big levels) … don’t go for PNG-24 (just not worth it).
.
2- (The most important note) >>> Small images … small images … small images … how small? go under 300 * 400 px
.
3- Task manager is your close friend … memory … cpu … etc … less ram means better
.
4- optimizing the object in the scene which means if you can combine 2 objects then make it happen, if you want to color an object don’t use events … just go in PS and color what you want.
.
5- From testing hundreds of times maybe thousands (and working in GD for over 2 years) … I can tell that GD don’t care about the count of the objects in the scene but rather their size … in my biggest level the engine can handle + 1400 object in the scene no problems at all (and I can go even more np).
.
6- (This one is interesting) >> don’t over crowd objects in one place … lag will happen … separate them and you’ll be fine.
.
7- Whenever you can … use tiled sprite …
read this note carefully (from construct website):
Using Sprites instead of Tiled Backgrounds
Creating too many objects can cause slowdowns, and a common mistake is to use grids of sprite object instead of Tiled Background objects This is similar to using tilemaps inappropriately. For example, a 20x20 grid of sprites has 400 objects, which is a significant impact on the object count. A single tiled background can replace the grid of sprites and it only counts as a single object. Tiled backgrounds are specially optimised for repeating their texture so in this case it is literally 400 times more efficient than the grid of sprites. Always use Tiled Backgrounds instead of repeating Sprites wherever possible.
and take a look here: Game Making Software - Construct 3
.
8- Make your game clean … resources … objects … pictures directories … etc…
.
9- You’re going for a small game? … sure
going for an open world? … semi-open world?.. before you start … think how the engine will handle something this big … how will you save the game? … etc … (think deep about this … trust me … just think about this)
.
At the end I’d like to say that yes I’ve gone through a nightmare but I love every second of this… Gdevelop is just so awesome
Here is a picture of the level I was talking about
Enjoy : )
.
.
I hope my story helps anyone here
And if you have one … I’d love to hear it for sure : )