mirror of
https://github.com/godotengine/gdnative-demos.git
synced 2025-12-30 21:49:05 +03:00
Pong with GDNative C++
A simple Pong game, made with GDNative C++. This demo shows best practices for game development in Godot, including signals.
Language: GDNative C++
Renderer: GLES 2
Note: There is a GDScript version available here.
Note: There is a C# version available here.
Note: There is a VisualScript version available here.
Compiling
You can use SCons to compile the library:
scons platform=PLATFORM
Where PLATFORM is: windows, linux, or osx.
This creates the file libpong in the respective
subfolders in the project/gdnative directory.
Dependencies:
- You need godot-cpp, this is now a Git submodule of this repo.
clang,gcc, or any decent C compiler that's C++14 compatible.
How does it work?
The walls, paddle, and ball are all
Area2D
nodes. When the ball touches the walls or the paddles,
they emit signals and modify the ball.
