hobby-ish gamedev. This website contains my raw notes and documents my progress.
I want to finish the level switch and the first 3 levels today. For this, I created a gamemanager (autoload script) that manages which scenes are loaded.
At first I tried to check what scene is loaded in the current scene tree and compare it to existing level scenes I have. In the end the gamemanager itself started tracking the current level index and just counts up when a level is loaded. As the menu is level 0 and the rest of the levels just 1,2,3 loading them is pretty basic but functional.
Also for the future, as I had issues when the menu was 1920x1080 and the levels 640x320 I needed to scale up the levels. But then the grid calculation did not work any more. Thats because we use local_to_map when calculating the frogs position. For this to understand one has to understand two things:
global position = This is the position measured from the worlds absolute origin 0,0.
local position = This is the position relative to its parent node, measured from its parent origin.
If nothing is scaled, these two are the same, therefore no issues arise. But if scaling is used, this does not work anymore as local_to_map needs a position relative to the tile grid itself, not global space. But the code I used was using global positioning. By converting the frogs position into a position relative tot he tile grid first, the grid math worked again.
before:
var own_cell = fences.local_to_map(self.global_position)
after:
var own_cell = fences.local_to_map(fences.to_local(self.global_position))
So we now have the first tutorial level with its base mechanic. A menu scene and switching up between levels. An options menu that can be opened any time and where sound can be changed. The game can be closed (except on browser builds).

Doing for tomorrow (the final day for my own deadline) is to create the timer and a visual cost indicator for jumps. I wanted to have enemies that can be consumed to give the frog the power to jump. I guess I will do that in the second level.
Also, I think I invested to little time into the actual level mechanics and more into surrounding mechanics and perfecting the game feel. There is not much time left and I do not now if that is even enough time to think of puzzle level ideas and to create them. Especially when these levels need new mechanics like enemies or specific fields that allow different movement or unlock paths (randomized minigame when trying to solve a shortcut? Another idea, but think of among us?).
I just thought of that, but the player should be able to save its progress? Not manually, but maybe I need some kind of “maximum points” counter that is saved?
But that is something for tomorrow. At least I am having fun, and that is the important part.