Open Mia75owo opened 6 months ago
Hmmm, I see a timer.wait call there, it's just one msec but it may add up:
Another pause is in the InitNewGameLevel function, I wonder if it's really useful:
BTW, there is already a level editor in the sources, it just need to be ported to SDL2: https://github.com/HurricanGame/Hurrican/tree/master/Editor
It was probably done to make the loading feel more uniform and to give people a chance to read the loading screen tips.
I guess it could be replaced by just keeping the loading screen displayed until a key is pressed, maybe with some text like "Press
The problem is that for every loaded item a new frame gets displayed. This is affected by VSync. On 60 FPS the game can only load a maximum of 60 items per second. And i know about the level editor but it's very outdated and hard to port as it is based on the Win32 lib, so i think it would be easier to just rewrite it from scratch (also it's way more fun this way :smile:)
Ah, nice catch! If you use --novsync it's much faster. Maybe it is worth disabling vsync when loading a level?
I am currently working on a small level editor for Hurrican. I noticed that it loads a level within ~0.5 seconds so i tried to find the cause of Hurrican taking so long to load. Hurrican takes ~8 seconds for me to load on startup, but when i placed an early return at the top of the DisplayLoadInfo function (Gameplay.cpp:902), this time got cut down to ~1 second. I will maybe try to fix this issue when I have time for the Game again.