Graal3D Scripting Manual: Difference between revisions

From Graal Bible
No edit summary
No edit summary
Line 1: Line 1:
== Intro[edit | edit source] ==
Unity is the leading platform for building 2D, 3D, VR and augmented reality games. It offers a scripting API in C#, allowing us to interact with the unity editor and the games we want to build.
What we will focus on in this documentation is programming our gameplay (scripting the behavior of our Gameobjects, their interactions, the components attached to them...)
===== How things work in Unity:[edit | edit source] =====
In the Unity editor, we create and add Gameobjects to our scene, we then attach C# scripts to each that will all run upon starting the scene. Unity sort of runs everything for you, it reads through all the lights, cameras, meshes, behaviors… and processes it for you.
===== How things work in Graal3D:[edit | edit source] =====
Since we will be using the Graal Unity Binding, things will be a bit different.
The Graal Unity Binding is a binding between GraalScript and Unity, it is actually still in alpha, but most functionalities needed are present. The goal of this binding is to mimic the Unity C# scripting system (functions and classes). So if you are familiar with Unity and C#, everything should be easy. If not then do not worry, I will go over everything step by step and include examples done in C# and compare them to GraalScript for each topic.
The 3D Client (which you will have to download) will serve as the Unity editor, mentioned eralier, which contains the base scene where you instantiate your Gameobjects and manipulate them with your GraalScripts.
===== Required Downloads[edit | edit source] =====
Unity 2019.4.10f1: <nowiki>https://unity3d.com/get-unity/download/archive</nowiki>
The Graal3D Client: <nowiki>https://drive.google.com/drive/u/0/folders/1rpOli0fxnA-Q7-IpYg3rUFJ44M0PsSxd</nowiki>
RC: <nowiki>http://fp4.ca/windows_rc3_beta.zip</nowiki>
* [[Documentation]]
* [[Documentation]]
*[[3DTutorials|Tutorials]]
*[[3DTutorials|Tutorials]]

Revision as of 03:10, 25 May 2021

Intro[edit | edit source]

Unity is the leading platform for building 2D, 3D, VR and augmented reality games. It offers a scripting API in C#, allowing us to interact with the unity editor and the games we want to build.

What we will focus on in this documentation is programming our gameplay (scripting the behavior of our Gameobjects, their interactions, the components attached to them...)

How things work in Unity:[edit | edit source]

In the Unity editor, we create and add Gameobjects to our scene, we then attach C# scripts to each that will all run upon starting the scene. Unity sort of runs everything for you, it reads through all the lights, cameras, meshes, behaviors… and processes it for you.

How things work in Graal3D:[edit | edit source]

Since we will be using the Graal Unity Binding, things will be a bit different.

The Graal Unity Binding is a binding between GraalScript and Unity, it is actually still in alpha, but most functionalities needed are present. The goal of this binding is to mimic the Unity C# scripting system (functions and classes). So if you are familiar with Unity and C#, everything should be easy. If not then do not worry, I will go over everything step by step and include examples done in C# and compare them to GraalScript for each topic.

The 3D Client (which you will have to download) will serve as the Unity editor, mentioned eralier, which contains the base scene where you instantiate your Gameobjects and manipulate them with your GraalScripts.

Required Downloads[edit | edit source]

Unity 2019.4.10f1: https://unity3d.com/get-unity/download/archive

The Graal3D Client: https://drive.google.com/drive/u/0/folders/1rpOli0fxnA-Q7-IpYg3rUFJ44M0PsSxd

RC: http://fp4.ca/windows_rc3_beta.zip