mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 19:42:43 +00:00
damn it
parent
e45f3d49d3
commit
dd563a9019
@ -10,15 +10,10 @@ In the early days, the engine used the [Lua](http://www.lua.org/) scripting lang
|
||||
|
||||
The last third party scripting language that was used for shipped games was [Squirrel](http://squirrel-lang.org/), but it was also dropped too. At that point, it became evident that Godot would work more optimally by using a built-in scripting language, as the following barriers were met:
|
||||
|
||||
|
||||
* Godot embeds scripts in nodes, most languages are not designed with this in mind.
|
||||
|
||||
* Godot uses several built-in data types for 2D and 3D math, script languages do not provide this, and binding them is inefficient.
|
||||
|
||||
* Godot uses threads heavily for lifting and initializing data from the net or disk, script interpreters for common languages are not friendly to this.
|
||||
|
||||
* Godot already has a memory management model for resources, most script languages provide their own, which resulted in duplicate effort and bugs.
|
||||
|
||||
* Binding code is always messy and results in several failure points, unexpected bugs and general unmaintainability.
|
||||
|
||||
Finally, GDScript was written as a custom solution. The language and interpreter for it ended up being smaller than the binding code itself for Lua and Squirrel, and equally as functional. With time, having a built-in language has proven to be a huge advantage.
|
||||
|
14
Home.md
14
Home.md
@ -11,15 +11,10 @@ Welcome to the Godot Engine documentation center. The aim of these pages is to p
|
||||
|
||||
#### Executables:
|
||||
|
||||
|
||||
* [Mac OSX 32 bits.](http://www.godotengine.org/builds/release/GodotOSX32.zip)
|
||||
|
||||
* [Windows 32 bits.](http://www.godotengine.org/builds/release/godot_win32.exe)
|
||||
|
||||
* [Windows 64 bits.](http://www.godotengine.org/builds/release/godot_win64.exe)
|
||||
|
||||
* [Linux X11, 64 bits.](http://www.godotengine.org/builds/release/godot_x11.64)
|
||||
|
||||
* [Linux Server (Headless), 64 bits.](http://www.godotengine.org/builds/release/godot_server.64)
|
||||
|
||||
**NOTICE: iOS deployment targety will be available the coming weeks. **
|
||||
@ -30,12 +25,10 @@ Welcome to the Godot Engine documentation center. The aim of these pages is to p
|
||||
|
||||
#### Demos:
|
||||
|
||||
|
||||
* [Demos & Examples.](http://www.godotengine.org/builds/demos/godot_demos.zip)
|
||||
|
||||
#### Export Templates:
|
||||
|
||||
|
||||
* [Export Templates](http://www.godotengine.org/builds/templates/export_templates.zip) Needed to Export to All Platforms.
|
||||
|
||||
|
||||
@ -58,7 +51,6 @@ Welcome to the Godot Engine documentation center. The aim of these pages is to p
|
||||
|
||||
#### Intermediate
|
||||
|
||||
|
||||
* [GUI Control Repositioning](tutorial_gui_repositioning)
|
||||
* [GUI Skinning](tutorial_gui_skinning)
|
||||
* [Physics Engine (2D)](tutorial_physics_2d)
|
||||
@ -70,7 +62,6 @@ Welcome to the Godot Engine documentation center. The aim of these pages is to p
|
||||
|
||||
#### Advanced
|
||||
|
||||
|
||||
* [Servers (Low Levl API)](tutorial_servers)
|
||||
* [Paths](paths)
|
||||
* [Thread Safety](thread_safety) Using Multiple Threads.
|
||||
@ -79,7 +70,6 @@ Welcome to the Godot Engine documentation center. The aim of these pages is to p
|
||||
|
||||
#### Editor Plug-Ins
|
||||
|
||||
|
||||
* [Editor Plugin](editor_plugin) Writing an editor extension.
|
||||
* [Editor Plugin](editor_res_node) Writing a Resource or Node editor extension.
|
||||
* [Editor Import-Export](editor_import) Writing an editor import-export extension.
|
||||
@ -89,7 +79,6 @@ Welcome to the Godot Engine documentation center. The aim of these pages is to p
|
||||
|
||||
#### Class List
|
||||
|
||||
|
||||
* [Alphabetical Class List](class_class_list) List of classes in alphabetical order.
|
||||
* [Categorized Class List](class_category) List of classes organized by category.
|
||||
* [Inheritance Class Tree](class_inheritance) List of classes organized by inheritance.
|
||||
@ -97,7 +86,6 @@ Welcome to the Godot Engine documentation center. The aim of these pages is to p
|
||||
|
||||
#### Languages
|
||||
|
||||
|
||||
* [GDScript](gdscript) Built-in, simple, flexible and efficient scripting language.
|
||||
* [Squirrel](squirrel) Optional, more complex scripting language. **[DEPRECATED]**
|
||||
* [Shader](shader) Built-in, portable, shader language.
|
||||
@ -107,7 +95,6 @@ Welcome to the Godot Engine documentation center. The aim of these pages is to p
|
||||
|
||||
#### Import
|
||||
|
||||
|
||||
* [Import Process](import_process) The import process described.
|
||||
* [Importing Textures](import_textures) Importing textures.
|
||||
* [Importing 3D](import_3d) Importing 3D scenes.
|
||||
@ -117,7 +104,6 @@ Welcome to the Godot Engine documentation center. The aim of these pages is to p
|
||||
|
||||
#### Export
|
||||
|
||||
|
||||
* [Export](export) Exporting Projects.
|
||||
* [One Click Deploy](one_click_deploy) One Click Deploy.
|
||||
* [PC](export_pc) Exporting for PC (Mac, Windows, Linux).
|
||||
|
19
advanced.md
19
advanced.md
@ -2,50 +2,31 @@
|
||||
|
||||
## Compiling & Running
|
||||
|
||||
|
||||
* [Windows](compiling_windows) Compiling under Windows.
|
||||
|
||||
* [Linux](compiling_linux) Compiling under Linux (or other Unix variants).
|
||||
|
||||
* [OSX](compiling_osx) Compiling under Apple OSX.
|
||||
|
||||
* [Android](compiling_android) Compiling for Android.
|
||||
|
||||
* [iOS](compiling_ios) Compiling for iOS.
|
||||
|
||||
* [QNX](compiling_qnx) Compiling for BlackBerry QNX.
|
||||
|
||||
* [NaCl](compiling_nacl) Compiling for Google Native Client.
|
||||
|
||||
* [Compiler Flags](compiling_flags) General Compiler Flags.
|
||||
|
||||
## File Formats
|
||||
|
||||
|
||||
* [XML File](xml_file) XML file format for resources.
|
||||
|
||||
* [Shader File](shader_file) External shader file (.shader).
|
||||
|
||||
* [Theme File](theme_file) External theme (skin) file format.
|
||||
|
||||
* [Config File](engine_cfg) Global engine and project settings file (engine.cfg).
|
||||
|
||||
## Extending the Engine in C++
|
||||
|
||||
|
||||
* [Custom Modules](custom_modules) Creating custom modules in C++.
|
||||
|
||||
* [Resource Loader](add_resource) Adding a new resource loader.
|
||||
|
||||
* [Script Language](add_script_lang) Adding a new scripting language.
|
||||
|
||||
* [Server](add_server) Adding a new server (physics engine, rendering backend, etc).
|
||||
|
||||
* [Platform](add_platform) Porting the engine to a new platform.
|
||||
|
||||
## Misc
|
||||
|
||||
|
||||
* [Command Line](command_line) Using the command line, for fans of doing everything in Unix/Windows shell.
|
||||
|
||||
* [External Editor](external_editor) Configuring an external editor for opening scripts.
|
||||
|
@ -6,13 +6,9 @@ For most cases, using the built in deployer and export templates is good enough.
|
||||
|
||||
For compiling under Windows, the following is requiered:
|
||||
|
||||
|
||||
* Python 2.7+ (3.0 is untested as of now).
|
||||
|
||||
* SCons build system.
|
||||
|
||||
* Android SDK version 8 and 13
|
||||
|
||||
* Android NDK
|
||||
|
||||
# Setting Up SCons
|
||||
|
@ -24,11 +24,8 @@ scons <binary> tools=yes/no
|
||||
|
||||
Target controls optimization and debug flags. Each mode means:
|
||||
|
||||
|
||||
* **debug**: Build with C++ debugging symbols, runtime checks (performs checks and reports error) and none to little optimization.
|
||||
|
||||
* **release_debug**: Build without C++ debugging symbols and optimization, but keep the runtime checks (performs checks and reports errors)
|
||||
|
||||
* **release**: Build without symbols, with optimization and with little to no runtime checks.
|
||||
|
||||
|
||||
|
@ -2,21 +2,13 @@
|
||||
|
||||
For compiling under Linux or other Unix variants, the following is requiered:
|
||||
|
||||
|
||||
* GCC or LLVM
|
||||
|
||||
* Python 2.7+ (3.0 is untested as of now).
|
||||
|
||||
* SCons build system.
|
||||
|
||||
* X11 and MESA development Libraries
|
||||
|
||||
* ALSA development libraries
|
||||
|
||||
* Freetype (for the editor)
|
||||
|
||||
* pkg-config (used to detect the above three)
|
||||
|
||||
* **Ubuntu Users:** apt-get install scons pkg-config libx11-dev libxcursor-dev build-essential libasound2-dev libfreetype6-dev libgl1-mesa-dev libglu-dev
|
||||
|
||||
# Compiling
|
||||
|
@ -2,11 +2,8 @@
|
||||
|
||||
For compiling under Linux or other Unix variants, the following is requiered:
|
||||
|
||||
|
||||
* Python 2.7+ (3.0 is untested as of now).
|
||||
|
||||
* SCons build system.
|
||||
|
||||
* XCode
|
||||
|
||||
# Compiling
|
||||
|
@ -5,11 +5,8 @@
|
||||
|
||||
Godot is mainly used for creating client-side games and applications. However, there are many scenarios where a headless (no display or audio) version might be required, such as:
|
||||
|
||||
|
||||
* Automated Scripts (Running single scripts with a specific purpose)
|
||||
|
||||
* Automated Export (Exporting a project for a specific platform, useful for continuous integration)
|
||||
|
||||
* Running a server accepting connections (Godot is perfectly capable of running as a server).
|
||||
|
||||
### Compiling
|
||||
|
@ -2,11 +2,8 @@
|
||||
|
||||
For compiling under Windows, the following is requiered:
|
||||
|
||||
|
||||
* [Visual C++](http://www.microsoft.com/visualstudio) Visual C++ or Visual C++ Express compiler.
|
||||
|
||||
* [Python 2.7+](http://www.python.org/getit/releases/2.7/) Python 2.7+ (3.0 is untested as of now). Using the 32-bits installer is recommended.
|
||||
|
||||
* [SCons](http://www.scons.org) SCons build system.
|
||||
|
||||
# Setting Up SCons
|
||||
|
@ -55,11 +55,8 @@ Once downloaded, they can be installed using the "Install Export Templates" opti
|
||||
|
||||
When exporting, Godot makes a list of all the files to export and then creates the package. There are 3 different modes for exporting:
|
||||
|
||||
|
||||
* Export every single file in the project
|
||||
|
||||
* Export only resources (+custom filter), this is default.
|
||||
|
||||
* Export only selected resources (+custom filter)
|
||||
|
||||
<p align="center"><img src="images/expres.png"></p>
|
||||
|
@ -36,11 +36,8 @@ Scroll down to the section where the Android settings are located:
|
||||
|
||||
In that screen, the path to 3 files needs to be set:
|
||||
|
||||
|
||||
* The adb executable (adb.exe on Windows)
|
||||
|
||||
* The jarsigner executable (from JDK6)
|
||||
|
||||
* The debug keystore
|
||||
|
||||
Once that is configured, everything is ready to export to Android!
|
||||
|
@ -4,9 +4,7 @@ Exporting for iOS is done manually at the moment. These are the steps to load yo
|
||||
|
||||
#### Requirements
|
||||
|
||||
|
||||
* Download XCode for iOS
|
||||
|
||||
* Download the XCode project template: http://www.godotengine.org/builds/release/GodotiOSXCode.zip
|
||||
|
||||
The zip contains an XCode project, "godot_ios.xcodeproj", an empty data.pck file and the engine executable. Open the project, and modify the game name, icon, organization, provisioning signing certificate identities (??), etc.
|
||||
|
@ -10,15 +10,10 @@ In the early days, the engine used the [Lua](http://www.lua.org/) scripting lang
|
||||
|
||||
The last third party scripting language that was used for shipped games was [Squirrel](http://squirrel-lang.org/), but it was also dropped too. At that point, it became evident that Godot would work more optimally by using a built-in scripting language, as the following barriers were met:
|
||||
|
||||
|
||||
* Godot embeds scripts in nodes, most languages are not designed with this in mind.
|
||||
|
||||
* Godot uses several built-in datatypes for 2D and 3D math, script languages do not provide this, and binding them is inefficient.
|
||||
|
||||
* Godot uses threads heavily for lifting and initializing data from the net or disk, script interpreters for common languages are not friendly to this.
|
||||
|
||||
* Godot already has a memory management model for resources, most script languages provide their own, which resulted in duplicate effort and bugs.
|
||||
|
||||
* Binding code is always messy and results in several failure points, unexpected bugs and general unmaintaniability.
|
||||
|
||||
Finally, GDScript was written. The language and interpreter for it ended up being smaller than the binding code itself for Lua and Squirrel, and equally as functional. With time, having a built in language ended up being a huge advantage.
|
||||
|
@ -28,11 +28,8 @@ Since the resulting font is a bitmap, a few more options were added to make the
|
||||
#### Extra Spacing
|
||||
|
||||
It is possible to add more space for:
|
||||
|
||||
* Characters, the space between them can be varied.
|
||||
|
||||
* "space" character, so the distance between words is bigger.
|
||||
|
||||
* Top and Bottom margins, this changes the spacing between lines as well as the space between the top and bottom lines and the borders.
|
||||
|
||||
<p align="center"><img src="images/fontspacing.png"></p>
|
||||
|
@ -18,13 +18,9 @@ The aim of the import system is that it works well enough for most common cases
|
||||
|
||||
However, as mentioned before, this is on of the most difficult areas of writing a game engine. It may happen often (specially on large projects, ports, or projects with unusual requirement) that what is provided is not enough. It's easy to say that the engine is open source and that the programmer should make their own if they don't like what is there, but that would be making a huge disservice to the users and not the right attitude. Because of that, we made sure to provide as many tools and helpers as possible to support a custom import process, for example:
|
||||
|
||||
|
||||
* Access to the internals of almost all data structures is provided to the scripting and C++ API, as well as saving and loading in all supported file formats.
|
||||
|
||||
* Some importers (like the 3D asset importer) support scripts to modify the data being imported.
|
||||
|
||||
* Support for creating custom import plugins is also provided, even for replacing the existing ones.
|
||||
|
||||
* If all else fails, Godot supports for adding custom resource loaders, to load data in alternative formats, without intermediate conversion.
|
||||
|
||||
Both the import system and the custom tools provided will improve over time as more use cases are revealed to us.
|
||||
|
@ -20,9 +20,7 @@ Several problems arise from trying to use standard image formats:
|
||||
### Lack of MipMaps
|
||||
|
||||
Images in 3D hardware are scaled with a (bi)linear filter, but this method has limitations. When images are shrunk too much, two problems arise:
|
||||
|
||||
* __Aliasing__: Pixels are skipped too much, and the image shows discontinuities. This decrases quality.
|
||||
|
||||
* __Cache Misses__: Pixels being read are too far apart, so texture cache reads a lot more data than it should. This decreases performance.
|
||||
|
||||
(Todo, find image sample of why it looks bad)
|
||||
|
@ -4,11 +4,8 @@
|
||||
|
||||
Godot uses a simplified shader language (almost a subset of GLSL). Shaders can be used for:
|
||||
|
||||
|
||||
* Materials
|
||||
|
||||
* Post-Process
|
||||
|
||||
* 2D
|
||||
|
||||
and are divided in *Vertex* and *Fragment* sections.
|
||||
|
47
start.md
47
start.md
@ -11,15 +11,10 @@ Welcome to the Godot Engine documentation center. The aim of these pages is to p
|
||||
|
||||
#### Executables:
|
||||
|
||||
|
||||
* [Mac OSX 32 bits.](http://www.godotengine.org/builds/release/GodotOSX32.zip)
|
||||
|
||||
* [Windows 32 bits.](http://www.godotengine.org/builds/release/godot_win32.exe)
|
||||
|
||||
* [Windows 64 bits.](http://www.godotengine.org/builds/release/godot_win64.exe)
|
||||
|
||||
* [Linux X11, 64 bits.](http://www.godotengine.org/builds/release/godot_x11.64)
|
||||
|
||||
* [Linux Server (Headless), 64 bits.](http://www.godotengine.org/builds/release/godot_server.64)
|
||||
|
||||
**NOTICE: iOS deployment targety will be available the coming weeks. **
|
||||
@ -30,12 +25,10 @@ Welcome to the Godot Engine documentation center. The aim of these pages is to p
|
||||
|
||||
#### Demos:
|
||||
|
||||
|
||||
* [Demos & Examples.](http://www.godotengine.org/builds/demos/godot_demos.zip)
|
||||
|
||||
#### Export Templates:
|
||||
|
||||
|
||||
* [Export Templates](http://www.godotengine.org/builds/templates/export_templates.zip) Needed to Export to All Platforms.
|
||||
|
||||
|
||||
@ -58,108 +51,68 @@ Welcome to the Godot Engine documentation center. The aim of these pages is to p
|
||||
|
||||
#### Intermediate
|
||||
|
||||
|
||||
* [GUI Control Repositioning](tutorial_gui_repositioning)
|
||||
|
||||
* [GUI Skinning](tutorial_gui_skinning)
|
||||
|
||||
* [ Physics Engine (2D)](tutorial_physics_2d)
|
||||
|
||||
* [Cut-Out Animation](tutorial_cutout)
|
||||
|
||||
* [ Creating a 3D game](tutorial_3d)
|
||||
|
||||
* [Using the AnimationTreePlayer](tutorial_animation_tree)
|
||||
|
||||
* [Supporting Multiple Languages](tutorial_localization)
|
||||
|
||||
* [Creating Resizable GUIs Efficiently](tutorial_resizable_gui)
|
||||
|
||||
#### Advanced
|
||||
|
||||
|
||||
* [ Servers (Low Levl API)](tutorial_servers)
|
||||
|
||||
|
||||
* [Paths](paths)
|
||||
|
||||
* [Thread Safety](thread_safety) Using Multiple Threads.
|
||||
|
||||
* [Memory](memory) Memory model and administration.
|
||||
|
||||
|
||||
#### Editor Plug-Ins
|
||||
|
||||
|
||||
* [Editor Plugin](editor_plugin) Writing an editor extension.
|
||||
|
||||
* [Editor Plugin](editor_res_node) Writing a Resource or Node editor extension.
|
||||
|
||||
* [Editor Import-Export](editor_import) Writing an editor import-export extension.
|
||||
|
||||
* [Editor Scene Loader](editor_scene_loader) Writing a scene format loader.
|
||||
|
||||
* [Editor 3D Import](editor_import_3d) Writing a script for customizing imported 3D scenes.
|
||||
# Reference
|
||||
|
||||
#### Class List
|
||||
|
||||
|
||||
* [Alphabetical Class List](class_class_list) List of classes in alphabetical order.
|
||||
|
||||
* [Categorized Class List](class_category) List of classes organized by category.
|
||||
|
||||
* [Inheritance Class Tree](class_inheritance) List of classes organized by inheritance.
|
||||
|
||||
* [Relevant Classes](relevant_classes) List of the most relevant classes to learn first.
|
||||
|
||||
#### Languages
|
||||
|
||||
|
||||
* [GDScript](gdscript) Built-in, simple, flexible and efficient scripting language.
|
||||
|
||||
* [Squirrel](squirrel) Optional, more complex scripting language. **[DEPRECATED]**
|
||||
|
||||
* [Shader](shader) Built-in, portable, shader language.
|
||||
|
||||
* [Locales](locales) List of supported locale strings.
|
||||
|
||||
# Asset Pipeline
|
||||
|
||||
#### Import
|
||||
|
||||
|
||||
* [Import Process](import_process) The import process described.
|
||||
|
||||
* [Importing Textures](import_textures) Importing textures.
|
||||
|
||||
* [Importing 3D](import_3d) Importing 3D scenes.
|
||||
|
||||
* [Importing Fonts](import_fonts) Importing fonts.
|
||||
|
||||
* [Importing Audio Samples](import_samples) Importing audio samples.
|
||||
|
||||
* [Importing Translations](import_translation) Importing translations.
|
||||
|
||||
#### Export
|
||||
|
||||
|
||||
* [Export](export) Exporting Projects.
|
||||
|
||||
* [One Click Deploy](one_click_deploy) One Click Deploy.
|
||||
|
||||
* [PC](export_pc) Exporting for PC (Mac, Windows, Linux).
|
||||
|
||||
* [Android](export_android) Exporting for Android.
|
||||
|
||||
* [BlackBerry 10](export_bb10) Exporting for BlackBerry 10.
|
||||
|
||||
* [iOS](export_ios) Exporting for iOS.
|
||||
|
||||
* [NaCL](export_nacl) Exporting for Google Native Client.
|
||||
|
||||
* [HTML5](export_html5) Exporting for HTML5 (using asm.js).
|
||||
|
||||
* [Consoles](export_consoles) Exporting for consoles (PS3, PSVita, etc).
|
||||
|
||||
# Advanced
|
||||
|
@ -4,13 +4,9 @@
|
||||
|
||||
If there is something that most programmers hate with passion, that is programming graphical user interfaces (GUIs). It's boring, tedious and unchallenging. Several aspects make matters worse such as:
|
||||
|
||||
|
||||
* Pixel alignment of UI elements is difficult (so it looks just like the designer intends).
|
||||
|
||||
* UIs are changed constantly due to design and usability issues that appear during testing.
|
||||
|
||||
* Handling proper screen re-sizing for different display resolutions.
|
||||
|
||||
* Animating several screen components, to make it look less static.
|
||||
|
||||
GUI programming is one of the leading causes of programmer burnout. During the development of Godot (and previous engine iterations), several techniques and philosophies for UI development were put in practice, such as immediate mode, containers, anchors, scripting, etc. This was always done with the main goal of reducing the stress programmers had to face while putting together user interfaces.
|
||||
@ -79,13 +75,9 @@ As mentioned before, Godot includes dozens of controls ready for using in a user
|
||||
|
||||
This set of controls is enough for most games, where complex interactions or ways to present information are not necessary. The can be skinned easily with regular textures.
|
||||
|
||||
|
||||
* [Label](class_label) : Node used for showing text.
|
||||
|
||||
* [TextureFrame](class_textureframe) : Displays a single texture, which can be scaled or kept fixed.
|
||||
|
||||
* [TextureButton](class_texturebutton) : Displays a simple texture buttons, states such as pressed, hover, disabled, etc can be set.
|
||||
|
||||
* [TextureProgress](class_textureprogress) : Displays a single textured progress bar.
|
||||
|
||||
|
||||
@ -97,11 +89,8 @@ In any case, it will happen often that even for simple games, more complex UI be
|
||||
|
||||
The rest of the controls (and there are dozens of them!) are meant for another set of scenarios, most commonly:
|
||||
|
||||
|
||||
* Games that require complex UIs, such as PC RPGs, MMOs, strategy, sims, etc.
|
||||
|
||||
* Creating custom development tools to speed up content creation.
|
||||
|
||||
* Creating Godot Editor Plugins, to extend the engine functionality.
|
||||
|
||||
Re-positioning controls for these kind of interfaces is more commonly done with containers (see the [Size and Anchors](tutorial_gui_repositioning) tutorial for more info).
|
||||
|
@ -16,15 +16,10 @@ There are many types of nodes, some show images, others play sound, other nodes
|
||||
|
||||
But let's go to the basics. A node is a basic element for creating a game, it has the following characteristics:
|
||||
|
||||
|
||||
* Has a name.
|
||||
|
||||
* Has editable properties.
|
||||
|
||||
* Can receive a callback to process every frame.
|
||||
|
||||
* Can be extended (to have more functions).
|
||||
|
||||
* Can be added other nodes as children.
|
||||
|
||||
|
||||
@ -41,15 +36,10 @@ This is probably not clear yet and it makes little sense, but everything will cl
|
||||
|
||||
Now that the existence of nodes has been defined, the next logical step is to explain what a Scene is.
|
||||
A scene is composed of a group of nodes organized hierarchically (in tree fashion). It has the following properties:
|
||||
|
||||
* A scene always has only one root node.
|
||||
|
||||
* Scenes can be saved to disk and loaded back.
|
||||
|
||||
* Scenes can be *instanced* (more on that later).
|
||||
|
||||
* Running a game means running a scene.
|
||||
|
||||
* There can be several scenes in a project, but for it to start, one of them must selected to be loaded first.
|
||||
|
||||
Basically, the Godot editor is a *scene editor*. It has plenty of tools for editing 2D and 3D scenes as well as user interfaces, but all the editor revolves around the concept of editing a scene and the nodes that compose it.
|
||||
|
@ -24,11 +24,8 @@ This is automatically instanced and set when running a scene, no need to do any
|
||||
|
||||
It's important to know that this class exists because it has a few important uses:
|
||||
|
||||
|
||||
* It contains the root [Viewport](class_viewport), when a scene is first opened, it's added as a child of it to become part of the active scene (more on that next)
|
||||
|
||||
* It contains information about the groups, and has means to call all nodes in a group, or get a list of them.
|
||||
|
||||
* It contains some global state functionality, such as setting pause mode, or quitting the process.
|
||||
|
||||
When a node is part of the active scene, the [SceneMainLoop](class_scenemainloop) can be obtained by simply calling [Node.get_scene](class_node#get_scene)().
|
||||
|
@ -18,9 +18,7 @@ Godot also uses the [extend](http://c2.com/cgi/wiki?EmbedVsExtend) pattern for s
|
||||
|
||||
[GDScript](gdscript) (click link for reference) is a dynamically typed scripting language to fit inside Godot. It was designed with the following goals:
|
||||
|
||||
|
||||
* First and most importantly, making it simple, familiar and as easy to learn as possible.
|
||||
|
||||
* Making the code readable and error safe. The syntax is mostly borrowed from Python.
|
||||
|
||||
Programmers generally take a few days to learn it, and within two weeks feel comfortable with it.
|
||||
@ -37,7 +35,6 @@ Before continuing, please make sure to read the [GDScript](gdscript) reference.
|
||||
|
||||
This tutorial will begin by scripting a simple GUI scene. Use the add node dialog to create the following hierarchy, with the following nodes:
|
||||
|
||||
|
||||
* Panel
|
||||
* Label
|
||||
* Button
|
||||
|
@ -6,22 +6,15 @@ Scene Singletons are very useful things, as they represent a very common use cas
|
||||
|
||||
The scene system is very useful, but by itself it has a few drawbacks:
|
||||
|
||||
|
||||
* There is no "common" place to store information (such as core, items obtained, etc) between two scenes.
|
||||
|
||||
* It is possible to make a scene that loads other scenes as children and frees them, while keeping that information, but then if that is done, it's not possible to run a scene alone by itself and expect it to work
|
||||
|
||||
* It is also possible to store persistent information to disk in %%user://%% and have scenes always load it, but saving/loading that while changing scenes is cumbersome.
|
||||
|
||||
So, after using Godot for a while, it becomes clear that it is necessary to have parts of a scene that:
|
||||
|
||||
|
||||
* Are always loaded, no matter which scene is opened from the editor.
|
||||
|
||||
* Can keep global variables, such as player information, items, money, etc.
|
||||
|
||||
* Can handle switching of scenes and transitions.
|
||||
|
||||
* Just have something that acts like a singleton, since GDScript does not support global variables by design.
|
||||
|
||||
For this, the option for auto-loading nodes and scripts exists.
|
||||
|
Loading…
Reference in New Issue
Block a user