HOW GAME STARTS
Basic description what functions called first and how game is works.
Last updated
Basic description what functions called first and how game is works.
Last updated
When game started many functions are called from _ready(). Something that need to run before starts in _init(). But I prefer mostly the first variant. And so, when game is launched, firstly game check if main menu will be shown and splash screen too (Splash can't be showed without main menu enabled)
This is two variables in GameManager (Singleton):
var main_menu : bool
var show_splash : bool
Of course you can change every variable before game actually starts in assets/scripts/p_app.gd
If you've decided to turn off these variables, game will start with level loading from player.json
When the project is opened, you'll see a game scene opened. There will be these nodes structure:
Please, do not edit or move any of these nodes in the game scene, this scene manipulates nodes through gameplay. So if u don't want to break the game - do not touch.
Game is root node
CanvasLayer is container for GUI elements
Sv is SubViewport node that add some on-screen shader with effects
EffectDither is node SubViewport with dithering effect
World is node that hold all in-game world nodes, player, sun, outsky etc.
SceneLight is light node that light scene
Player node is controllable node with mouse
Outsky is color sphere behind skyboxes and levels
PixelatedEffect - cut-off feature, forget to delete
Waypoints is node that holds levels waypoints paths and moves player
AIDemo node is cut-off feature, was used in first AI tests
AmbientSystem node is holder for ambient sounds and music