mirror of
https://github.com/Relintai/pandemonium_engine_docs.git
synced 2025-01-04 14:49:52 +01:00
Cleanups.
This commit is contained in:
parent
ff5a3c2bc4
commit
9a17898d09
@ -1,7 +1,6 @@
|
||||
|
||||
|
||||
Introduction to Pandemonium
|
||||
=====================
|
||||
# Introduction to Pandemonium
|
||||
|
||||
This article is here to help you figure out whether Pandemonium might be a good fit
|
||||
for you. We will introduce some broad features of the engine to give you a feel
|
||||
@ -11,8 +10,7 @@ know to get started?".
|
||||
This is by no means an exhaustive overview. We will introduce many more features
|
||||
in this getting started series.
|
||||
|
||||
What is Pandemonium?
|
||||
--------------
|
||||
## What is Pandemonium?
|
||||
|
||||
Pandemonium is a general-purpose 2D and 3D game engine designed to support all sorts
|
||||
of projects. You can use it to create games or applications you can then release
|
||||
@ -22,13 +20,13 @@ You can also create console games with it, although you either need strong
|
||||
programming skills or a developer to port the game for you.
|
||||
|
||||
Note:
|
||||
The Pandemonium team can't provide an open-source console export due to the
|
||||
licensing terms imposed by console manufacturers. Regardless of the
|
||||
engine you use, though, releasing games on consoles is always a lot of
|
||||
work. You can read more on that here: `doc_consoles`.
|
||||
|
||||
What can the engine do?
|
||||
-----------------------
|
||||
- The Pandemonium team can't provide an open-source console export due to the licensing
|
||||
terms imposed by console manufacturers. Regardless of the
|
||||
engine you use, though, releasing games on consoles is always a lot of
|
||||
work. You can read more on that here: `doc_consoles`.
|
||||
|
||||
## What can the engine do?
|
||||
|
||||
Pandemonium was initially developed in-house by an Argentinan game studio. Its
|
||||
development started in 2001, and the engine was rewritten and improved
|
||||
@ -38,7 +36,7 @@ Some examples of games created with Pandemonium include Ex-Zodiac and Helms of F
|
||||
|
||||
![](img/introduction_ex_zodiac.png)
|
||||
|
||||
![](img/introduction_helms_of_fury.jpg
|
||||
![](img/introduction_helms_of_fury.jpg)
|
||||
|
||||
As for applications, the open-source pixel art drawing program Pixelorama is
|
||||
powered by Pandemonium, and so is the voxel RPG creator RPG in a box.
|
||||
@ -47,8 +45,7 @@ powered by Pandemonium, and so is the voxel RPG creator RPG in a box.
|
||||
|
||||
You can find many more examples in the `official showcase videos`.
|
||||
|
||||
How does it work and look?
|
||||
--------------------------
|
||||
## How does it work and look?
|
||||
|
||||
Pandemonium comes with a fully-fledged game editor with integrated tools to answer the
|
||||
most common needs. It includes a code editor, an animation editor, a tilemap
|
||||
@ -67,20 +64,16 @@ Windows.
|
||||
|
||||
![](img/introduction_vscode.png)
|
||||
|
||||
Programming languages
|
||||
---------------------
|
||||
## Programming languages
|
||||
|
||||
Let's talk about the available programming languages.
|
||||
|
||||
You can code your games using `GDScript <toc-learn-scripting-gdscript )`, a
|
||||
You can code your games using [GDScript](toc-learn-scripting-gdscript), a
|
||||
Pandemonium-specific and tightly integrated language with a lightweight syntax, or
|
||||
`C# <toc-learn-scripting-C# )`, which is popular in the games industry.
|
||||
[C#](toc-learn-scripting-C#), which is popular in the games industry.
|
||||
These are the two main scripting languages we support.
|
||||
|
||||
Pandemonium also supports a node-based visual programming language named
|
||||
`VisualScript <toc-learn-scripting-visual_script )`.
|
||||
|
||||
With the `GDNative <toc-tutorials-gdnative )` technology, you can also write
|
||||
With the [GDNative](toc-tutorials-gdnative) technology, you can also write
|
||||
gameplay or high-performance algorithms in C or C++ without recompiling the
|
||||
engine. You can use this technology to integrate third-party libraries and other
|
||||
Software Development Kits (SDK) in the engine.
|
||||
@ -89,13 +82,12 @@ Of course, you can also directly add modules and features to the engine, as it's
|
||||
completely free and open-source.
|
||||
|
||||
See also:
|
||||
These are the five officially supported programming languages. The
|
||||
community maintains support for many more. For more information,
|
||||
see `GDNative third-party bindings
|
||||
( doc_what_is_gdnative_third_party_bindings )`.
|
||||
|
||||
What do I need to know to use Pandemonium?
|
||||
------------------------------------
|
||||
- These are the five officially supported programming languages. The
|
||||
community maintains support for many more. For more information,
|
||||
see [GDNative third-party bindings](doc_what_is_gdnative_third_party_bindings).
|
||||
|
||||
## What do I need to know to use Pandemonium?
|
||||
|
||||
Pandemonium is a feature-packed game engine. With its thousands of features, there is
|
||||
a lot to learn. To make the most of it, you need good programming foundations.
|
||||
@ -111,17 +103,17 @@ you everything you need to know to be off to a good start. It will save you
|
||||
countless hours and hurdles learning any game engine afterward.
|
||||
|
||||
Note:
|
||||
In CS50, you will learn multiple programming languages. Don't be
|
||||
afraid of that: programming languages have many similarities. The
|
||||
skills you learn with one language transfer well to others.
|
||||
- In CS50, you will learn multiple programming languages. Don't be
|
||||
afraid of that: programming languages have many similarities. The
|
||||
skills you learn with one language transfer well to others.
|
||||
|
||||
We will provide you with more Pandemonium-specific learning resources in
|
||||
`doc_learning_new_features`.
|
||||
|
||||
In the next part, you will get an overview of the engine's essential concepts.
|
||||
|
||||
.. _Blender: https://www.blender.org/
|
||||
.. _VSCode: https://github.com/Relintai/pandemonium_engine-vscode-plugin
|
||||
.. _Emacs: https://github.com/pandemoniumengine/emacs-gdscript-mode
|
||||
.. _official showcase videos: https://www.youtube.com/playlist?list=PLeG_dAglpVo6EpaO9A1nkwJZOwrfiLdQ8
|
||||
.. _CS50 open courseware: https://cs50.harvard.edu/x
|
||||
[Blender](https://www.blender.org/)
|
||||
[VSCode](https://github.com/Relintai/pandemonium_engine-vscode-plugin)
|
||||
[Emacs](https://github.com/pandemoniumengine/emacs-gdscript-mode)
|
||||
[official showcase videos](https://www.youtube.com/playlist?list=PLeG_dAglpVo6EpaO9A1nkwJZOwrfiLdQ8)
|
||||
[CS50 open courseware](https://cs50.harvard.edu/x)
|
||||
|
@ -1,7 +1,6 @@
|
||||
|
||||
|
||||
Pandemonium's design philosophy
|
||||
=========================
|
||||
# Pandemonium's design philosophy
|
||||
|
||||
Now that you've gotten your feet wet, let's talk about Pandemonium's design.
|
||||
|
||||
@ -20,8 +19,7 @@ Please watch
|
||||
`Pandemonium explained in 5 minutes ( https://www.youtube.com/watch?v=KjX5llYZ5eQ )`
|
||||
if you're looking for an overview of the engine's features.
|
||||
|
||||
Object-oriented design and composition
|
||||
--------------------------------------
|
||||
## Object-oriented design and composition
|
||||
|
||||
Pandemonium embraces object-oriented design at its core with its flexible
|
||||
scene system and Node hierarchy. It tries to stay away from strict
|
||||
@ -47,7 +45,7 @@ that extends your Character. Modify the Character in the editor and the Magician
|
||||
will update as well. It helps you build your projects so that their
|
||||
structure matches the game's design.
|
||||
|
||||
|image0|
|
||||
![](img/engine_design_01.png)
|
||||
|
||||
Also note that Pandemonium offers many different types of objects called
|
||||
nodes, each with a specific purpose. Nodes are part of a tree and always
|
||||
@ -58,26 +56,25 @@ body will use, most nodes work independently from one another.
|
||||
In other words, Pandemonium's nodes do not work like components in some
|
||||
other game engines.
|
||||
|
||||
|image1|
|
||||
![](img/engine_design_02.png)
|
||||
|
||||
Sprite is a Node2D, a CanvasItem and a Node. It has all the properties
|
||||
and features of its three parent classes, like transforms or the ability
|
||||
to draw custom shapes and render with a custom shader.
|
||||
|
||||
All-inclusive package
|
||||
---------------------
|
||||
## All-inclusive package
|
||||
|
||||
Pandemonium tries to provide its own tools to answer most common
|
||||
needs. It has a dedicated scripting workspace, an animation editor, a
|
||||
tilemap editor, a shader editor, a debugger, a profiler,
|
||||
the ability to hot-reload locally and on remote devices, etc.
|
||||
|
||||
|image2|
|
||||
![](img/engine_design_03.png)
|
||||
|
||||
The goal is to offer a full package to create games and a continuous
|
||||
user experience. You can still work with external programs as long as
|
||||
there is an import plugin for it. Or you can create one, like the `Tiled
|
||||
Map Importer ( https://github.com/vnen/pandemonium-tiled-importer )`.
|
||||
there is an import plugin for it. Or you can create one, like the
|
||||
[Tiled Map Importer](https://github.com/vnen/pandemonium-tiled-importer).
|
||||
|
||||
That is also partly why Pandemonium offers its own programming languages
|
||||
GDScript and VisualScript, along with C#. They're designed for the needs
|
||||
@ -92,7 +89,7 @@ Note that with GDNative, you can write high-performance code using compiled
|
||||
languages like C, C++, Rust, or Python (using the Cython compiler)
|
||||
without recompiling the engine.
|
||||
|
||||
|image3|
|
||||
![](img/engine_design_visual_script.png)
|
||||
|
||||
*VisualScript is a node-based programming language that integrates well
|
||||
in the editor. You can drag and drop nodes or resources into the graph
|
||||
@ -103,25 +100,12 @@ You'll need external programs or add-ons to edit terrains, animate complex chara
|
||||
Pandemonium provides a complete API to extend the editor's functionality using
|
||||
game code. See `The Pandemonium editor is a Pandemonium game` below.
|
||||
|
||||
|image4|
|
||||
![](img/engine_design_fsm_plugin.png)
|
||||
|
||||
*A State Machine editor plugin in Pandemonium 2 by kubecz3k. It lets you
|
||||
manage states and transitions visually.*
|
||||
|
||||
|
||||
Warning:
|
||||
|
||||
|
||||
`Pandemonium 4.0 will remove VisualScript from core entirely. ( https://pandemoniumengine.org/article/pandemonium-4-will-discontinue-visual-scripting )`
|
||||
As a result, creating new projects using visual scripting in Pandemonium is not recommended.
|
||||
Future Pandemonium 4.x releases may have VisualScript reimplemented as an extension.
|
||||
|
||||
While Pandemonium 3.x will keep VisualScript supported, we recommend
|
||||
`trying out GDScript <toc-learn-scripting-gdscript )` instead,
|
||||
especially if you intend to migrate your project to Pandemonium 4.
|
||||
|
||||
Open source
|
||||
-----------
|
||||
## Open source
|
||||
|
||||
Pandemonium offers a fully open source codebase under the **MIT license**.
|
||||
This means all the technologies that ship with it have to be Free
|
||||
@ -139,12 +123,10 @@ as Pandemonium will print errors with a stack trace, even if they come from the
|
||||
|
||||
Note:
|
||||
|
||||
- This **does not affect the work you do with Pandemonium** in any way: there's
|
||||
no strings attached to the engine or anything you make with it.
|
||||
|
||||
This **does not affect the work you do with Pandemonium** in any way: there's
|
||||
no strings attached to the engine or anything you make with it.
|
||||
|
||||
Community-driven
|
||||
----------------
|
||||
## Community-driven
|
||||
|
||||
**Pandemonium is made by its community, for the community, and for all game
|
||||
creators out there.** It's the needs of the users and open discussions
|
||||
@ -157,8 +139,7 @@ programmers work on features they may need themselves, so you'll see
|
||||
improvements in all corners of the engine at the same time in every
|
||||
major release.
|
||||
|
||||
The Pandemonium editor is a Pandemonium game
|
||||
--------------------------------
|
||||
## The Pandemonium editor is a Pandemonium game
|
||||
|
||||
The Pandemonium editor runs on the game engine. It uses the engine's own UI
|
||||
system, it can hot-reload code and scenes when you test your projects,
|
||||
@ -168,7 +149,7 @@ and scenes for your games, or **build plugins and extend the editor.**
|
||||
This leads to a reliable and flexible UI system, as it powers the editor
|
||||
itself. With the `tool` keyword, you can run any game code in the editor.
|
||||
|
||||
|image5|
|
||||
![](img/engine_design_rpg_in_a_box.png)
|
||||
|
||||
*RPG in a Box is a voxel RPG editor made with Pandemonium 2. It uses Pandemonium's
|
||||
UI tools for its node-based programming system and for the rest of the
|
||||
@ -181,22 +162,13 @@ you use in your projects.
|
||||
|
||||
Note:
|
||||
|
||||
- The editor is fully written in C++ and is statically compiled into the
|
||||
binary. This means you can't import it as a typical project that would have a
|
||||
`project.pandemonium` file.
|
||||
|
||||
The editor is fully written in C++ and is statically compiled into the
|
||||
binary. This means you can't import it as a typical project that would have a
|
||||
`project.pandemonium` file.
|
||||
|
||||
Separate 2D and 3D engines
|
||||
--------------------------
|
||||
## Separate 2D and 3D engines
|
||||
|
||||
Pandemonium offers dedicated 2D and 3D rendering engines. As a result, **the
|
||||
base unit for 2D scenes is pixels.** Even though the engines are
|
||||
separate, you can render 2D in 3D, 3D in 2D, and overlay 2D sprites and
|
||||
interfaces over your 3D world.
|
||||
|
||||
.. |image0| image:: img/engine_design_01.png)
|
||||
.. |image1| image:: img/engine_design_02.png)
|
||||
.. |image2| image:: img/engine_design_03.png)
|
||||
.. |image3| image:: img/engine_design_visual_script.png)
|
||||
.. |image4| image:: img/engine_design_fsm_plugin.png)
|
||||
.. |image5| image:: img/engine_design_rpg_in_a_box.png)
|
||||
|
@ -1,18 +1,11 @@
|
||||
.. Keep this page short and sweet! We want users to read it to the end, so they
|
||||
know where to find information, how to get help, and how to maximize chances
|
||||
of getting answers.
|
||||
|
||||
|
||||
|
||||
Learning new features
|
||||
=====================
|
||||
# Learning new features
|
||||
|
||||
Pandemonium is a feature-rich game engine. There is a lot to learn about it. This page
|
||||
explains how you can use the online manual, built-in code reference, and join
|
||||
online communities to learn new features and techniques.
|
||||
|
||||
Making the most of this manual
|
||||
------------------------------
|
||||
## Making the most of this manual
|
||||
|
||||
What you are reading now is the user manual. It documents each of the engine's
|
||||
concepts and available features. When learning a new topic, you can start by
|
||||
@ -29,11 +22,11 @@ general features, concepts, and how to use the editor, the reference is all
|
||||
about using Pandemonium's scripting API (Application Programming Interface). You can
|
||||
access it both online and offline. We recommend browsing the reference offline,
|
||||
from within the Pandemonium editor. To do so, go to Help -> Search or press
|
||||
:kbd:`F1`.
|
||||
`F1`.
|
||||
|
||||
![](img/manual_class_reference_search.png)
|
||||
|
||||
To browse it online, head to the manual's `Class Reference <toc-class-ref )`
|
||||
To browse it online, head to the manual's `Class Reference`
|
||||
section.
|
||||
|
||||
A class reference's page tells you:
|
||||
@ -52,16 +45,16 @@ A class reference's page tells you:
|
||||
4. Links to manual pages further detailing the class.
|
||||
|
||||
Note:
|
||||
If the manual or class reference is missing or has insufficient
|
||||
information, please open an Issue in the official `pandemonium-docs
|
||||
( https://github.com/Relintai/pandemonium_engine-docs/issues )` GitHub repository
|
||||
to report it.
|
||||
|
||||
- If the manual or class reference is missing or has insufficient
|
||||
information, please open an Issue in the official
|
||||
[pandemonium-docs](https://github.com/Relintai/pandemonium_engine-docs/issues) GitHub repository
|
||||
to report it.
|
||||
|
||||
You can Ctrl-click any underlined text like the name of a class, property,
|
||||
method, signal, or constant to jump to it.
|
||||
|
||||
Learning to think like a programmer
|
||||
-----------------------------------
|
||||
## Learning to think like a programmer
|
||||
|
||||
Teaching programming foundations and how to think like a game developer is
|
||||
beyond the scope of Pandemonium's documentation. If you're new to programming, we
|
||||
@ -77,8 +70,7 @@ recommend two excellent free resources to get you started:
|
||||
2. If you prefer books, check out the free ebook `Automate The Boring Stuff With
|
||||
Python ( https://automatetheboringstuff.com/ )` by Al Sweigart.
|
||||
|
||||
Learning with the community
|
||||
---------------------------
|
||||
## Learning with the community
|
||||
|
||||
Pandemonium has a growing community of users. If you're stuck on a problem or need
|
||||
help to better understand how to achieve something, you can ask other users for
|
||||
@ -142,8 +134,7 @@ information:
|
||||
Following these guidelines will maximize your chances of getting the answer
|
||||
you're looking for. They will save time both to you and the persons helping you.
|
||||
|
||||
Community tutorials
|
||||
-------------------
|
||||
## Community tutorials
|
||||
|
||||
This manual aims to provide a comprehensive reference of Pandemonium's features. Aside
|
||||
from the 2D and 3D getting started series, it does not contain tutorials to
|
||||
|
@ -1,7 +1,6 @@
|
||||
|
||||
|
||||
Creating instances
|
||||
==================
|
||||
# Creating instances
|
||||
|
||||
In the previous part, we saw that a scene is a collection of nodes organized in
|
||||
a tree structure, with a single node as its root. You can split your project
|
||||
@ -35,12 +34,11 @@ as `Ball.tscn`. However, you can modify each independently, such as changing
|
||||
how they bounce, how heavy they are, or any property exposed by the source
|
||||
scene.
|
||||
|
||||
In practice
|
||||
-----------
|
||||
## In practice
|
||||
|
||||
Let's use instancing in practice to see how it works in Pandemonium. We invite
|
||||
you to download the ball's sample project we prepared for you:
|
||||
:download:`instancing.zip <files/instancing.zip )`.
|
||||
:download:`instancing.zip (files/instancing.zip )`.
|
||||
|
||||
Extract the archive on your computer. Then, open Pandemonium, and in the project
|
||||
manager, click the Import button to import the project.
|
||||
@ -100,8 +98,7 @@ Play the game again. You should now see every ball fall independently from one
|
||||
another. This is what instances do. Each is an independent reproduction of a
|
||||
template scene.
|
||||
|
||||
Editing scenes and instances
|
||||
----------------------------
|
||||
## Editing scenes and instances
|
||||
|
||||
There is more to instances. With this feature, you can:
|
||||
|
||||
@ -160,8 +157,7 @@ Note:
|
||||
Resources are another essential building block of Pandemonium games we will
|
||||
cover in a later lesson.
|
||||
|
||||
Scene instances as a design language
|
||||
------------------------------------
|
||||
## Scene instances as a design language
|
||||
|
||||
Instances and scenes in Pandemonium offer an excellent design language, setting the
|
||||
engine apart from others out there. We designed Pandemonium around this concept from
|
||||
@ -210,8 +206,7 @@ to programmers, designers, and artists alike. A typical team development process
|
||||
can involve 2D or 3D artists, level designers, game designers, and animators,
|
||||
all working with the Pandemonium editor.
|
||||
|
||||
Summary
|
||||
-------
|
||||
## Summary
|
||||
|
||||
Instancing, the process of producing an object from a blueprint has many handy
|
||||
uses. With scenes, it gives you:
|
||||
|
@ -1,26 +1,10 @@
|
||||
..
|
||||
Intention:
|
||||
|
||||
- Giving a *short* and sweet hands-on intro to GDScript. The page should
|
||||
focus on working in the code editor.
|
||||
- We assume the reader has programming foundations, as explained in
|
||||
getting_started/introduction.
|
||||
|
||||
Techniques:
|
||||
|
||||
- Creating a sprite.
|
||||
- Creating a script.
|
||||
- _init() and _process().
|
||||
- Moving an object on screen.
|
||||
|
||||
|
||||
|
||||
Creating your first script
|
||||
==========================
|
||||
# Creating your first script
|
||||
|
||||
In this lesson, you will code your first script to make the Pandemonium icon turn in
|
||||
circles using GDScript. As we mentioned `in the introduction
|
||||
<toc-learn-introduction )`, we assume you have programming foundations.
|
||||
(toc-learn-introduction )`, we assume you have programming foundations.
|
||||
The equivalent C# code has been included in another tab for convenience.
|
||||
|
||||
![](img/scripting_first_script_rotating_pandemonium.gif)
|
||||
@ -32,8 +16,7 @@ See also:
|
||||
See also:
|
||||
To learn more about C#, head to the `C# basics ( doc_c_sharp )` page.
|
||||
|
||||
Project setup
|
||||
-------------
|
||||
## Project setup
|
||||
|
||||
Please create a new project to start with a clean slate. Your project should
|
||||
contain one picture: the Pandemonium icon, which we often use for prototyping in the
|
||||
@ -73,8 +56,7 @@ Then, click and drag the icon in the viewport to center it in the game view.
|
||||
|
||||
![](img/scripting_first_script_centering_sprite.png)
|
||||
|
||||
Creating a new script
|
||||
---------------------
|
||||
## Creating a new script
|
||||
|
||||
To create and attach a new script to our node, right-click on Sprite in the
|
||||
scene dock and select "Attach Script".
|
||||
@ -122,8 +104,7 @@ Note:
|
||||
You can hover any property's name in the Inspector to see a description and
|
||||
its identifier in code.
|
||||
|
||||
Hello, world!
|
||||
-------------
|
||||
## Hello, world!
|
||||
|
||||
Our script currently doesn't do anything. Let's make it print the text "Hello,
|
||||
world!" to the Output bottom panel to get started.
|
||||
@ -158,8 +139,7 @@ It should display "Hello, world!".
|
||||
Delete the `init()` function, so you're only left with the line `extends
|
||||
Sprite`.
|
||||
|
||||
Turning around
|
||||
--------------
|
||||
## Turning around
|
||||
|
||||
It's time to make our node move and rotate. To do so, we're going to add two
|
||||
member variables to our script: the movement speed in pixels per second and the
|
||||
@ -236,8 +216,7 @@ Run the scene to see the Pandemonium icon turn in-place.
|
||||
|
||||
![](img/scripting_first_script_pandemonium_turning_in_place.gif)
|
||||
|
||||
Moving forward
|
||||
~~~~~~~~~~~~~~
|
||||
### Moving forward
|
||||
|
||||
Let's now make the node move. Add the following two lines to the `process()`
|
||||
function, ensuring the new lines are indented the same way as the one before
|
||||
@ -278,8 +257,7 @@ Note:
|
||||
Our node currently moves by itself. In the next part
|
||||
`doc_scripting_player_input`, we'll use player input to control it.
|
||||
|
||||
Complete script
|
||||
---------------
|
||||
## Complete script
|
||||
|
||||
Here is the complete `Sprite.gd` file for reference.
|
||||
|
||||
|
@ -1,10 +1,5 @@
|
||||
.. Intention: only introduce what a script does in general and options for
|
||||
scripting languages.
|
||||
|
||||
|
||||
|
||||
Scripting languages
|
||||
===================
|
||||
# Scripting languages
|
||||
|
||||
This lesson will give you an overview of the available scripting languages in
|
||||
Pandemonium. You will learn the pros and cons of each option. In the next part, you
|
||||
@ -20,8 +15,7 @@ to the Camera2D node and code the shake.
|
||||
|
||||
![](img/scripting_camera_shake.gif)
|
||||
|
||||
Available scripting languages
|
||||
-----------------------------
|
||||
## Available scripting languages
|
||||
|
||||
Pandemonium offers **five gameplay programming languages**: GDScript, C#,
|
||||
VisualScript, and, via its GDNative technology, C and C++. There are more
|
||||
@ -45,11 +39,10 @@ Warning:
|
||||
Future Pandemonium 4.x releases may have VisualScript reimplemented as an extension.
|
||||
|
||||
While Pandemonium 3.x will keep VisualScript supported, we recommend
|
||||
`trying out GDScript <toc-learn-scripting-gdscript )` instead,
|
||||
`trying out GDScript ( toc-learn-scripting-gdscript )` instead,
|
||||
especially if you intend to migrate your project to Pandemonium 4.
|
||||
|
||||
Which language should I use?
|
||||
----------------------------
|
||||
## Which language should I use?
|
||||
|
||||
If you're a beginner, we recommend to **start with GDScript**. We made this
|
||||
language specifically for Pandemonium and the needs of game developers. It has a
|
||||
@ -66,8 +59,7 @@ with the language.
|
||||
|
||||
Let's look at each language's features, as well as its pros and cons.
|
||||
|
||||
GDScript
|
||||
~~~~~~~~
|
||||
### GDScript
|
||||
|
||||
`GDScript( doc_gdscript )` is an
|
||||
`object-oriented ( https://en.wikipedia.org/wiki/Object-oriented_programming )` and
|
||||
@ -109,8 +101,7 @@ Note:
|
||||
and features that would've been difficult to offer with third-party
|
||||
languages.
|
||||
|
||||
.NET / C#
|
||||
~~~~~~~~~
|
||||
### .NET / C#
|
||||
|
||||
As Microsoft's `C#
|
||||
( https://en.wikipedia.org/wiki/C_Sharp_(programming_language) )` is a favorite
|
||||
@ -140,42 +131,7 @@ Note:
|
||||
in GDScript, C#, or C++ won't have a significant impact on
|
||||
performance.
|
||||
|
||||
VisualScript
|
||||
~~~~~~~~~~~~
|
||||
|
||||
Warning:
|
||||
|
||||
|
||||
`Pandemonium 4.0 will remove VisualScript from core entirely. ( https://pandemoniumengine.org/article/pandemonium-4-will-discontinue-visual-scripting )`
|
||||
As a result, creating new projects using visual scripting in Pandemonium is not recommended.
|
||||
Future Pandemonium 4.x releases may have VisualScript reimplemented as an extension.
|
||||
|
||||
While Pandemonium 3.x will keep VisualScript supported, we recommend
|
||||
`trying out GDScript <toc-learn-scripting-gdscript )` instead,
|
||||
especially if you intend to migrate your project to Pandemonium 4.
|
||||
|
||||
`Visual Scripting( doc_what_is_visual_script )` is a graph-based visual
|
||||
programming language where you connect blocks. It can be a great tool for
|
||||
non-programmers like game designers and artists.
|
||||
|
||||
![](img/scripting_visualscript.png)
|
||||
|
||||
You can use other languages to create custom blocks that are specific to your
|
||||
game, for example, to script AIs, quests, or dialogues. That's where the
|
||||
strength of VisualScript lies.
|
||||
|
||||
While it provides all the basic building blocks you need to code complete games,
|
||||
we do not recommend to use VisualScript this way. Programming everything with it
|
||||
is slow compared to using other programming languages.
|
||||
|
||||
See also:
|
||||
|
||||
|
||||
For more information, see
|
||||
`Getting started with VisualScript ( doc_getting_started_visual_script )`.
|
||||
|
||||
C and C++ via GDNative
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
### C and C++ via GDNative
|
||||
|
||||
GDNative allows you to write game code in C or C++ without needing to recompile
|
||||
or even restart Pandemonium.
|
||||
@ -192,8 +148,7 @@ VisualScript.
|
||||
When working with GDNative, the available types, functions, and properties
|
||||
closely resemble Pandemonium's actual C++ API.
|
||||
|
||||
Summary
|
||||
-------
|
||||
## Summary
|
||||
|
||||
Scripts are files containing code that you attach to a node to extend its
|
||||
functionality.
|
||||
|
@ -1,7 +1,6 @@
|
||||
|
||||
|
||||
Your first 2D game
|
||||
==================
|
||||
# Your first 2D game
|
||||
|
||||
In this step-by-step tutorial series, you will create your first complete 2D
|
||||
game with Pandemonium. By the end of the series, you will have a simple yet complete
|
||||
@ -42,11 +41,10 @@ You can find a completed version of this project at this location:
|
||||
|
||||
- https://github.com/Relintai/pandemonium_engine-demo-projects
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
## Prerequisites
|
||||
|
||||
This step-by-step tutorial is intended for beginners who followed the complete
|
||||
`Getting Started <toc-learn-step_by_step )`.
|
||||
`Getting Started (toc-learn-step_by_step )`.
|
||||
|
||||
If you're an experienced programmer, you can find the complete demo's source
|
||||
code here: `Pandemonium demo projects
|
||||
@ -57,10 +55,9 @@ the code.
|
||||
|
||||
You can download them by clicking the link below.
|
||||
|
||||
:download:`dodge_assets.zip <files/dodge_assets.zip )`.
|
||||
:download:`dodge_assets.zip (files/dodge_assets.zip )`.
|
||||
|
||||
Contents
|
||||
--------
|
||||
## Contents
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
@ -1,7 +1,6 @@
|
||||
|
||||
|
||||
Setting up the project
|
||||
======================
|
||||
# Setting up the project
|
||||
|
||||
In this short first part, we'll set up and organize the project.
|
||||
|
||||
@ -12,7 +11,7 @@ Launch Pandemonium and create a new project.
|
||||
GDScript
|
||||
|
||||
```
|
||||
Download :download:`dodge_assets.zip <files/dodge_assets.zip )`.
|
||||
Download :download:`dodge_assets.zip ( files/dodge_assets.zip )`.
|
||||
The archive contains the images and sounds you'll be using
|
||||
to make the game. Extract the archive and move the `art/`
|
||||
and `fonts/` directories to your project's directory.
|
||||
|
@ -221,4 +221,4 @@ You may find these code samples useful as starting points for your own projects.
|
||||
Feel free to use them and experiment with them to see what you can make.
|
||||
|
||||
You can download this sample project here:
|
||||
:download:`2D_movement_demo.zip <files/2D_movement_demo.zip )`
|
||||
:download:`2D_movement_demo.zip (files/2D_movement_demo.zip )`
|
||||
|
@ -30,7 +30,7 @@ animation:
|
||||
![](img/2d_animation_run_preview.gif)
|
||||
|
||||
You can download the images here:
|
||||
:download:`run_animation.zip <files/run_animation.zip )`
|
||||
:download:`run_animation.zip (files/run_animation.zip )`
|
||||
|
||||
Unzip the images and place them in your project folder. Set up your scene tree
|
||||
with the following nodes:
|
||||
|
@ -62,7 +62,7 @@ Surface array
|
||||
The surface array is an array of length `ArrayMesh.ARRAY_MAX`. Each position in the array is
|
||||
filled with a sub-array containing per-vertex information. For example, the array located at
|
||||
`ArrayMesh.ARRAY_NORMAL` is a `PoolVector3Array` of vertex normals.
|
||||
See `Mesh.ArrayType <enum_Mesh_ArrayType )` for more information.
|
||||
See `Mesh.ArrayType (enum_Mesh_ArrayType )` for more information.
|
||||
|
||||
The surface array can be indexed or non-indexed. Creating a non-indexed array is as easy as not assigning
|
||||
an array at the index `ArrayMesh.ARRAY_INDEX`. A non-indexed array stores unique vertex information for
|
||||
|
@ -10,14 +10,14 @@ which takes up to four parameters. The first two are required, while the second
|
||||
|
||||
The first parameter is the `PrimitiveType`, an OpenGL concept that instructs the GPU
|
||||
how to arrange the primitive based on the vertices given, i.e. whether they represent triangles,
|
||||
lines, points, etc. See `Mesh.PrimitiveType <enum_Mesh_PrimitiveType )` for the options available.
|
||||
lines, points, etc. See `Mesh.PrimitiveType (enum_Mesh_PrimitiveType )` for the options available.
|
||||
|
||||
The second parameter, `arrays`, is the actual Array that stores the mesh information. The array is a
|
||||
normal Pandemonium array that is constructed with empty brackets `[]`. It stores a `Pool**Array`
|
||||
(e.g. PoolVector3Array, PoolIntArray, etc.) for each type of information that will be used to build the surface.
|
||||
|
||||
The possible elements of `arrays` are listed below, together with the position they must have within `arrays`.
|
||||
See also `Mesh.ArrayType <enum_Mesh_ArrayType )`.
|
||||
See also `Mesh.ArrayType (enum_Mesh_ArrayType )`.
|
||||
|
||||
|
||||
.. list-table::
|
||||
|
@ -59,7 +59,7 @@ character, created by Andreas Esau.
|
||||
|
||||
![](img/tuto_cutout_walk.gif)
|
||||
|
||||
Get your assets: :download:`gbot_resources.zip <files/gbot_resources.zip )`.
|
||||
Get your assets: :download:`gbot_resources.zip (files/gbot_resources.zip )`.
|
||||
|
||||
Setting up the rig
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
@ -37,13 +37,13 @@ See also:
|
||||
animating within Pandemonium.
|
||||
|
||||
For this tutorial, we will be using a single image to construct our character.
|
||||
Download it from :download:`gBot_pieces.png) <img/gBot_pieces.png) )` or save the
|
||||
Download it from :download:`gBot_pieces.png) (img/gBot_pieces.png) )` or save the
|
||||
image below.
|
||||
|
||||
![](img/gBot_pieces.png)
|
||||
|
||||
It is also advised to download the final character image
|
||||
:download:`gBot_complete.png) <img/gBot_complete.png) )` to have a good reference
|
||||
:download:`gBot_complete.png) (img/gBot_complete.png) )` to have a good reference
|
||||
for putting the different pieces together.
|
||||
|
||||
![](img/gBot_complete.png)
|
||||
|
@ -129,4 +129,4 @@ override.
|
||||
![](img/area2d_override.gif)
|
||||
|
||||
You can download this project here:
|
||||
:download:`using_area_2d.zip <files/using_area_2d.zip )`
|
||||
:download:`using_area_2d.zip (files/using_area_2d.zip )`
|
||||
|
@ -188,7 +188,7 @@ Examples
|
||||
--------
|
||||
|
||||
To see these examples in action, download the sample project:
|
||||
:download:`using_kinematic2d.zip <files/using_kinematic2d.zip )`.
|
||||
:download:`using_kinematic2d.zip (files/using_kinematic2d.zip )`.
|
||||
|
||||
Movement and walls
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
@ -68,7 +68,7 @@ Scene setup
|
||||
~~~~~~~~~~~
|
||||
|
||||
To have something to test, here's the scene (from the tilemap tutorial):
|
||||
:download:`kbscene.zip <files/kbscene.zip )`. We'll be creating a new scene
|
||||
:download:`kbscene.zip (files/kbscene.zip )`. We'll be creating a new scene
|
||||
for the character. Use the robot sprite and create a scene like this:
|
||||
|
||||
![](img/kbscene.png)
|
||||
|
@ -76,8 +76,8 @@ The 2D navigation meshes are defined with the following resources:
|
||||
.. seealso::
|
||||
|
||||
You can see how 2D navigation works in action using the
|
||||
`2D Navigation Polygon <https://github.com/Relintai/pandemonium_engine-demo-projects/tree/master/2d/navigation>`__
|
||||
and `Grid-based Navigation with AStarGrid2D <https://github.com/Relintai/pandemonium_engine-demo-projects/tree/master/2d/navigation_astar>`__
|
||||
`2D Navigation Polygon (https://github.com/Relintai/pandemonium_engine-demo-projects/tree/master/2d/navigation>`__
|
||||
and `Grid-based Navigation with AStarGrid2D (https://github.com/Relintai/pandemonium_engine-demo-projects/tree/master/2d/navigation_astar>`__
|
||||
demo projects.
|
||||
|
||||
Setup for 2D scene
|
||||
|
Loading…
Reference in New Issue
Block a user