I’ve been looking around at game engines and they all use different terminology
the main one i am looking at is godot.
in godot a “level” i guess is a scene made up or sprites sounds text etc.
ive used gDevelop where you drag and drop sprites etc into a scene.
Is this the same here… when they talk about a scene would it be like:
Scene: Main menu
scene: character select
scene: level 1
scene: level 2
…
Scene: Level 200
Scene: End game
and so on?
so would i tell the game to first go to init, then preload, then craete, then update and use things such as if play button is clicked change scene to character select…
if character clicked change to scene level 1… if dead goto scene game over… if continur b utton clicked load scene level 1
Pretty much correct. It depends what type of game you’re developing - think of the scene as being a different set of game logic.
So some games might only have one scene for all of the levels, because all the levels share the same game logic and just change number of enemies/tilesets/etc. Similarly, You might have a ‘cutscene’ scene which handles all the cutscene logic, and keep revisiting that scene whenever you want to do a cutscene (with just a different parameter to tell it which graphics to load).
All scenes can use init(), preload(), create(), and update() in that order. There’s more stuff too, but those are all I have used so far. Update is the only part that loops.
My method is usually to create a scene for preload, the you can go to different scenes from there. So the end of my preload usually has this.scene.start('Title);
Then Title can include this.scene.start(‘Level01’) or this.scene.start(‘Game’) or wherever you want to go next.