Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
Quick Information
DinoSource - is a full-fledged, open-source, interpreted programming language developed for the Godot Engine.This language is useful for supporting modding in games, implementation in gameplay where programming is required, the syntax is easily modified, which allows you to easily create your own language syntax, or copy other popular languages, program tools where the programming language is used as a design tool.✅ GDScript → DinoSource: Registering native functions and variables to call GDScript inside DinoSource✅ DinoSource → GDScript: Calling functions and accessing DinoSource data within GDScript✅ Cross-platform: Works everywhere Godot Engine works (Windows, Linux, macOS, Web, Mobile)✅ FeaturesBasic Types and OperatorsFunctions and ScopeClasses with Constructors/DestructorsArrays and Index AccessDinoSource is written entirely in GDScript!You can learn more about the language's capabilities and syntax here - https://github.com/JekSun97/DinoSource/discussions/1
DinoSource
DinoSource - is a full-fledged, open-source, interpreted programming language developed for the Godot Engine.
This language is useful for supporting modding in games, implementation in gameplay where programming is required, the syntax is easily modified, which allows you to easily create your own language syntax, or copy other popular languages, program tools where the programming language is used as a design tool.
📋 Table of contents
- ✨ Features
- 🚀 Quick start
- 📚 Code examples
- 🔌 Integration with Godot
- 🤝 Participation in development
- 💖 Support the project
✅ Features
- Basic Types and Operators
- Functions and Scope
- Classes with Constructors/Destructors
- Arrays and Index Access
🔤 Language
| Category | Support |
|---|---|
| Comments | // one-line, /* */ multi-line |
| Data types | int, float, bool, string, var (dynamic), void |
| Constants | const type NAME = value |
| Arrays | One-dimensional [1,2,3] and multidimensional [[1,2][3,4]] |
| Operators | + - * / % (arithmetic), && || ! (logics) |
| Enum | Named constants enum Status { Idle, Running = 32, Jump = 4 } |
| Functions | With return types, parameters, recursion |
| Classes | Fields, methods, constructors ClassName(), destructors ~ClassName() |
| Conditions | if/else, switch/case/default |
| Cycles | for, while, repeat(n), jump/POINT |
| Control | return, break, continue, delete |
| Library | include Path/SourceCode |
🔧 Integration
- ✅ GDScript → DinoSource: Registering native functions and variables to call GDScript inside DinoSource
- ✅ DinoSource → GDScript: Calling functions and accessing DinoSource data within GDScript
- ✅ Cross-platform: Works everywhere Godot Engine works (Windows, Linux, macOS, Web, Mobile)
🚀 Quick start
1. Clone the repository
git clone https://github.com/JekSun97/DinoSource.git
cd DinoSource
2. Open in Godot
- Launch Godot 4.x
- Open the
IDE.tscnscene
3. Write your first script
// 🦖 Hello DinoSource!
print("Hello World!");
int x = 10;
float y = 3.14;
string msg = "DinoSource is working!";
print(msg + " x=" + str(x) + ", y=" + str(y));
4. Launch! 🎮
- Click Run in the interface
- See the console output
📚 Code examples
🔁 Cycles and conditions
for (int i = 0; i < 5; i++) {
if (i % 2 == 0) {
print("Even: " + str(i));
} else {
print("Odd: " + str(i));
}
}
🏗️ Classes with a constructor and destructor
class Player {
string name;
int health = 100;
// Constructor
void Player(string n) {
this.name = n;
print("Player " + this.name + " created!");
}
// Destructor
void ~Player() {
print("Player " + this.name + " deleted");
}
void takeDamage(int dmg) {
this.health = this.health - dmg;
if (this.health <= 0) {
print(this.name + " died!");
}
}
}
// Usage
Player hero = new Player("Artyom");
hero.takeDamage(30);
delete hero; // The destructor will be called!
📦 Arrays and functions
var array = [10, 20, "Hi!", false];
string check(var _arr) {
string _text = "\n";
for (int i = 0; i < _arr.size(); i++) {
_text = _text + "arr[" + str(i) + "] = " + str(_arr[i]) + "\n";
}
return _text;
}
print("arr: " + check(array));
📃 Here you can find a large snippet of DinoSource code for study - Test Сode.
🔌 Integration with Godot
Registering a native function (GDScript → DinoSource)
func _ready():
var interpreter = DSInterpreter.new()
# Register the "godot_log" function to be called from DinoSource
interpreter.registerNativeFunc("godot_log", _godot_log)
func _godot_log(args: Array):
if args.size() > 0:
print("[DinoSource] " + str(args[0]))
return null
// In the DinoSource code:
godot_log("Greetings from DinoSource!"); // Calls a GDScript function
Calling the DinoSource script from GDScript
# Running the code
var ast = parser.parse(lexer.LexerRun("int nmb = 16; print('Hello'); int DinoFunc(int a, int b) {return a+b;}"))
interpreter.run(ast)
# Getting a variable
var nmb = interpreter.getGlobalVar("nmb")
# Function call
interpreter.callFunc("DinoFunc", [4, 1])
🤝 Participation in development
Any contributions are welcome! 🙌
🐛 Found a bug?
- Check it out Issues
- If not, create a new one with:
- 📋 Steps to reproduce
- 💻 Godot version
- 🧪 Minimal code example
💬 Have an idea? Open Issue or Discussion!
💖 Support the project
Developing DinoSource is a hobby project, and your support is greatly appreciated! 🙏
⚠️ Use at your own risk, the language may have hidden problems that I may not have yet discovered, you can create a topic in the problems section, or contribute a fix. Here you can see a list of upcoming improvements and their priority.
The language was originally developed for a gaming project where most of the gameplay - is programming 💻.
DinoSource - is a full-fledged, open-source, interpreted programming language developed for the Godot Engine.
This language is useful for supporting modding in games, implementation in gameplay where programming is required, the syntax is easily modified, which allows you to easily create your own language syntax, or copy other popular languages, program tools where the programming language is used as a design tool.
✅ GDScript → DinoSource: Registering native functions and variables to call GDScript inside DinoSource
✅ DinoSource → GDScript: Calling functions and accessing DinoSource data within GDScript
✅ Cross-platform: Works everywhere Godot Engine works (Windows, Linux, macOS, Web, Mobile)
✅ Features
Basic Types and Operators
Functions and Scope
Classes with Constructors/Destructors
Arrays and Index Access
DinoSource is written entirely in GDScript!
You can learn more about the language's capabilities and syntax here - https://github.com/JekSun97/DinoSource/discussions/1
Reviews
Quick Information
DinoSource - is a full-fledged, open-source, interpreted programming language developed for the Godot Engine.This language is useful for supporting modding in games, implementation in gameplay where programming is required, the syntax is easily modified, which allows you to easily create your own language syntax, or copy other popular languages, program tools where the programming language is used as a design tool.✅ GDScript → DinoSource: Registering native functions and variables to call GDScript inside DinoSource✅ DinoSource → GDScript: Calling functions and accessing DinoSource data within GDScript✅ Cross-platform: Works everywhere Godot Engine works (Windows, Linux, macOS, Web, Mobile)✅ FeaturesBasic Types and OperatorsFunctions and ScopeClasses with Constructors/DestructorsArrays and Index AccessDinoSource is written entirely in GDScript!You can learn more about the language's capabilities and syntax here - https://github.com/JekSun97/DinoSource/discussions/1