Dungeon Crawler under development

I tried it both ways. On my system it seems to run better with Z_perspective under the timer as well. that is, this gives me the best fps.

If I can ask, what are your hardware specifications? cpu/gpu/ram?

I have intel core2duo/integrated intelGMA/4gb

But my specs are maybe not typical. I dont know if its better to optimize for the lowest specs possible or if its better to aim towards what the average player will be using.

with enough time and good feedback, it could be possible to set in options different timer values to control rendering for different powered systems.

in the smaller maps i can get ~40fps easily this method but still only 25-35 in my largest map.

If I remove Z_perspective from the timer i still get 35-40 fps in small maps but in my largest map fps sometimes dips as low as 21fps which is a bit lower than Id like to see.

also, with the z_perspective under timer its actually in what i would call a playable state on my phone - not great, still choppy, but playable, so i think its not good to completely abandon it just yet. before was very bad on my mobile, sometimes 1-2fps

Im going to work on some external layouts to try and bring performance up a bit more. I think if only 1 room is loaded at a time could make a big difference. If i dont have to try so hard for fps i can focus optimization on smoothness and rendering instead.

Yes, the fps will increase, but the picture will become “twitchy”. But you might find a trade-off between fps and smoothness. My computer is over 10 years old. Specifications: Intel Core i7 870, 2.93 GHz / ATI Radeon 7870, 2 gb / 8 gb RAM.

Yes the twitches are noticeable but still better than lagging to 2fps in my opinion.

I made an attempt at using external layouts, but there is some undesireable behavior.

The layout is triggered to load on collision. Also added the behavior “destroy off screen.” That part works as intended; however I would have to find a way to account for screen rotation, since when you rotate,the walls are off screen and destroyed but there is no new collision to load the layout. I think in this way the example with raycasting is superior.

I may try again to adjust the raycasting example to optimize it for a lower end system.

Another option is to use the method of points so that I can create multiple walls from each base. I just don’t know if it’s worth the time. It will definitely bring a performance increase, but I don’t know if it will be a substantial increase to make worthwhile reconstructing all the levels.

As for the “method with sprite points”, you can test the performance. Here I applied optimization with timers (0.1 sec): https://games.gdevelop-app.com/game-8cb5e4d1-06e1-4827-8677-e5d474c6aaac/index.html

1 Like

The example above is the worst yet for fps, I’m only getting 10-15fps on my laptop, yet it appears to run very fast. It also doesn’t seem as choppy as it should with low fps, it seems to look better than other examples with 20-25 fps… very strange.



These example seems the most consistent. I keep very tight 21-22fps, and it renders smooth but there seems to be a “hiccup” effect. Not really lag, but a slight pause at regular intervals.


This example I like the least. Consistent fps ~22 but the “hiccup” effect seems worse.

I’ve only tested on my laptop so far, I’ll test them on mobile later when I am better charged.

I tried another optimization which failed miserably. My effort was to load only the nearest 300 wall tiles, using object variable to sort which bases have been used and “Pick the nearest” but I think using “Pick the nearest” base tile 300x was creating too much lag. Maybe this form of optimizing would work better with the points example, since there are less bases to find. I got the idea from the raycasting example but raycasting seems much more efficient.

I am only guessing but I imagine the inconsistencies when testing on mobile have something to do with the ARM processors used in most mobile devices.

It would be interesting to see the performance on two comparable systems one with ARM one with x86.

1 Like

Confusion with fps on different test builds is most likely due to this setting:
(standard settings: fps does not fall below 20)

In the example that I posted here, the settings are as in the screenshot. Perhaps this is a how the true FPS is shown

1 Like

A useful diagnostic tool.

It indicates I have more work to do lol.

I changed my game settings to get a true reflection of fps, it was a big eye opener.

After trying some different solutions, this one seems to give me the best results in a large map with lots of things to render:

Basically doing the scaling/positioning every other frame rather than every frame, and the z order every 4 frames.

My logic is that it’s easier for gdevelop to increment a variable each frame than to keep track of a timer. Maybe I’m wrong but it seems to work well for me.

The downside is that in a smaller level it makes things a bit worse.

I decided instead of trying to make something for everyone I would try to make a customization solution.

What I did here is create 3 graphics settings.
When Variable graphics_mod = 0, it runs really slow and choppy on my laptop, but makes it playable on my mobile.
When graphics_mod = 1, I get a good balance between the smoothness of rendering and frame rate on my laptop.
and graphics_mod = 2, the highest setting, I test everything every frame. This is the best looking and smoothest rendering but I get really bad fps.

To also help optimization, I’m making a lot of tiny changes to the events: things I would have done before if I was smarter. Making a lot of what I call “shortcuts” - small functions for events that are repeated many times. For instance, I created a small function that tests if a mobile button was clicked on screen, or a y key on the keyboard, or a gamepad button was released. Basically searching the events for redundant code. (this would make a good idea for a new feature I think, to search for a group events that are identical) and making into functions to trim the overall size of the project and hopefully make it run a little better.

I also rearranged the way collisions are used. For less important collisions (dialogues, etc) the scaling/position/ordering is all taking place on different frames than the collisions are tested, except in the high settings. For important collisions, like those that keep the player from walking through walls, I test every frame.

1 Like

i finally have a model that works decent for me on mobile, getting ~30fps on my phone but there’s a few issues. 1, the mobile controls are a little awkward… i need to work a bit on the placement and sizing, and also add in a few more for moving backwards/sidestep. 2 (this is the bigger one) the shading makes it really hard to see on my phone (there’s an option to turn it off). I love the look of it on my laptop, but not sure if there’s a way to reproduce it on my phone. Maybe a condition to increase the brightness on the layer if it’s a mobile device? here’s a temporary test build if anyone wants to check it out and offer some feedback… I’m especially interested in performance on different devices. https://games.gdevelop-app.com/game-7d463629-c5d4-42bb-b705-9a5f0123a516/index.html

also there’s a bug in the options when switching between 32x32 and 64x64… the buttons are mismatched

1 Like

I dont know if its only me. But when I click on play nothing happens.

1 Like

@Siddharth thanks for giving it a try, and I’m sorry you had that experience. Which version are you using? There’s several iterations of development versions posted here, many of which are temporary; the ones uploaded to GDevelop only last about a week.

I’m really glad you mentioned this to me, as I went to itch (where the more current version is) and found it was bugged… for some reason itch couldn’t find the index.html in the file; even though it was there yesterday.

I made a new export and uploaded it and it’s now working again (at least for me). The newly exported browser version includes a few bug fixes and some improved maps. Let me know if you decide to try it again :slight_smile:

I’ve just tried it out. It looks very nice!\

Oops, looks like i’m VERY late!

1 Like