Starting up
Last updated
Last updated
Please, this tutorial requires minimal knowledge of the Godot engine and its node hierarchy.
So if you don't know how to use Godot - first look at some tutorials on YouTube.
Open source project of PITO in Godot editor.
Find folder called "level_editor" inside res://
With this folder, you'll be working when creating packed levels for the game.
It has different folders with names:
ai/
helpers/
MUST_HAVE/
sprites/
static_objects/
usable_triggers/
zones/
AI - contains prefabs of neutral NPC and HOSTILE NPC
HELPERS - contains in-editor objects such as target_point for transition zone, that will be hidden when game starts.
MUST_HAVE - a folder that contains must-have nodes on the level, or the game will not run the level.
SPRITES - contains 2D billboard sprites in 3D scenes (such as light sparkles, and trees)
STATIC_OBJECTS - contains 3D static objects like barrels, boxes, car etc.
USABLE_TRIGGERS - contains 3D trigger zones with colliders so players can interact with them.
ZONES - contains 3D areas (such as radiation zone, enemy eye zone)
Create a new scene using [Scene/New Scene] (1) or by clicking [ + ] (2) sign near the game scene.
Select 3D Scene for root node.
Rename root node of your level by double clicking on node name in the node tree.
Add to the level must-have node "level_settings" from MUST_HAVE/ folder by drag-n-drop prefab from folder to scene tree.
In the inspector at the right side of the editor set up settings for the level.
These keys are basic for levels and must be set! Daylight - key that enables/disables night mode on levels and allows work lights on scene (and flashlight) Fog - only works with night scenes (daylight must be off) Weather color - is color of outsky that will be behind the skybox model, there's in-editor presets for the sky color with hex (day: 4a739f, evening: 392e3d, night: 0a0a0a)
Let's add terrain to the scene and place a spawn point for the player. Go to MUST_HAVE/ folder and drag spawn_point.tres to the scene. Keep it on zero coordinates for XYZ by looking Transform group in Inspector and clicking on the round arrow in the corner.
Then set Y to 1.7 (it's probably 170cm in height of the main character)
Go to STATIC_OBJECTS/ folder and drag terrain.tres to the scene.
Add skybox_1.tres to the scene too. And set scale to 10 inside Transform group in inspector.
Save the level to the res://assets/levels/ with *.tres file type. (Ctrl+S) or (Scene->Save Scene As...)
The name of the level will be it's ID for loading. Now let's launch our new level! Now we'll going to the res://assets/creatures/player.json inside Source Project and edit "start_level" key with our new level name.
Start a new game by pressing the Play button at the top right corner and your new level will be loaded.
You can run the same level outside the source project if you first export the game using instructions from the main GitHub page and then copy assets/ folder from the source to the exported *.exe files, then just put a new level *.tscn file into assets/levels/ folder and do the same steps as here in step 11.
You only need to export the game once, you don't need to export every time before every level test. After all, the current version of the game 1.2 fix 3, which is in this project already knows how to run packed levels. If it is still difficult to export - you can download the latest version of the game from Itch and run your level with this downloaded version.
Objects that can be set must contain level_object.gd script on it and will have special "keys" dictionary variable (looks like JSON). All descriptions can be found on the levels page!
If you want to make skybox move (like in vanilla pito game) go to keys dictionary in inspector and add new String key with name "id" and add String value to it "skybox".