Scripts
Scripts
  • HOW GAME STARTS
  • GUI
    • SpawnMenu.gd
    • SplashScreenManager.gd
    • SpashScreen.gd
    • player_answer.gd
    • DeathScreen.gd
    • PauseMenu.gd
    • MainMenu.gd
    • GUI.gd
    • UI.gd
    • parameter.gd
    • pito_ui_text.gd
  • gameplay
    • Slot.gd
    • item.gd
    • marker.gd
    • Weapon.gd
    • NPC.gd
    • level_object.gd
    • Camera3D.gd
  • Systems
    • AmbientSystem.gd
    • BugTrap.gd
    • Dialogue.gd
    • GameManager.gd
    • GameAPI.gd
    • Game.gd
    • WeaponSystem.gd
    • Lang.gd
    • Journal.gd
    • Inventory.gd
    • Trading.gd
    • Statistic.gd
    • Map.gd
    • Loot.gd
  • misc
    • AudioLoader.gd
    • Utility.gd
Powered by GitBook
On this page

HOW GAME STARTS

Basic description what functions called first and how game is works.

Last updated 11 months ago

Game Start

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.

  1. Game is root node

  2. CanvasLayer is container for GUI elements

  3. Sv is SubViewport node that add some on-screen shader with effects

  4. EffectDither is node SubViewport with dithering effect

  5. World is node that hold all in-game world nodes, player, sun, outsky etc.

  6. SceneLight is light node that light scene

  7. Player node is controllable node with mouse

  8. Outsky is color sphere behind skyboxes and levels

  9. PixelatedEffect - cut-off feature, forget to delete

  10. Waypoints is node that holds levels waypoints paths and moves player

  11. AIDemo node is cut-off feature, was used in first AI tests

  12. AmbientSystem node is holder for ambient sounds and music

Nodes structure of game scene