All Projects → alemart → surgescript

alemart / surgescript

Licence: Apache-2.0 license
SurgeScript: a scripting language for games.

Programming Languages

c
50402 projects - #5 most used programming language
CMake
9771 projects
shell
77523 projects

Projects that are alternatives of or similar to surgescript

sgscript
SGScript Scripting Engine
Stars: ✭ 60 (+46.34%)
Mutual labels:  scripting-games, scripting-engine
playthos
2D Game Engine written in Go.
Stars: ✭ 39 (-4.88%)
Mutual labels:  gamedev
Awesome Gbdev
Contribute
Stars: ✭ 3,016 (+7256.1%)
Mutual labels:  gamedev
o3tanks
A command-line interface tool to build and run O3DE (Open 3D Engine) in containers
Stars: ✭ 19 (-53.66%)
Mutual labels:  gamedev
CopperLang
The Copper interpreted programming language / embeddable interpreter / virtual machine
Stars: ✭ 27 (-34.15%)
Mutual labels:  scripting-engine
first-person-controller-for-unity
A First-Person Controller for Unity.
Stars: ✭ 18 (-56.1%)
Mutual labels:  gamedev
Gdevelop
🎮 GDevelop is an open-source, cross-platform game engine designed to be used by everyone.
Stars: ✭ 3,221 (+7756.1%)
Mutual labels:  gamedev
newport
Modular game engine built in Rust
Stars: ✭ 4 (-90.24%)
Mutual labels:  gamedev
themachinery-books
This repository contains the source of "The Machinery book " and some other books.
Stars: ✭ 20 (-51.22%)
Mutual labels:  gamedev
Unity-Visual-Behavior-Tree
Reactive Visual Scripting Behavior Tree Tool for Unity 2018.x+
Stars: ✭ 36 (-12.2%)
Mutual labels:  gamedev
wfc
Go port of the Wave Function Collapse algorithm
Stars: ✭ 47 (+14.63%)
Mutual labels:  gamedev
BowlerStudio
A Full-Stack Robotics Development Environment
Stars: ✭ 95 (+131.71%)
Mutual labels:  scripting-engine
awesome-n64-development
A curated list of Nintendo 64 development resources including toolchains, documentation, emulators, example code, and more
Stars: ✭ 210 (+412.2%)
Mutual labels:  gamedev
WPF-Blockly
A WPF based visual programming editor and execution engine, which support all the code syntax (including module and object oriented programming), and even you can define your own syntax.
Stars: ✭ 236 (+475.61%)
Mutual labels:  scripting-engine
octoawesome
This is the code repository for the OctoAwesome project - a collection of daily, 20 minute long game development tutorial videos, iterating over the same piece of code
Stars: ✭ 104 (+153.66%)
Mutual labels:  gamedev
Dome
A lightweight game development environment where games can be written in Wren
Stars: ✭ 251 (+512.2%)
Mutual labels:  gamedev
ecs
A dependency free, lightweight, fast Entity-Component System (ECS) implementation in Swift
Stars: ✭ 79 (+92.68%)
Mutual labels:  gamedev
limitless-engine
OpenGL C++ Graphics Engine
Stars: ✭ 95 (+131.71%)
Mutual labels:  gamedev
Mengine
Mengine is an multiple platforms engine for creating and running graphical games
Stars: ✭ 21 (-48.78%)
Mutual labels:  gamedev
sdlada
Ada 2012 bindings to SDL 2
Stars: ✭ 85 (+107.32%)
Mutual labels:  gamedev

SurgeScript: a scripting language for games

Surge

Unleash your creativity!

SurgeScript is a scripting language for games. Use it to unleash your creativity and build your own amazing interactive content! It's such a joy to use SurgeScript! You will love it!

First time here?
Go to the Welcome page.

Where to get it?
Get it on the Download page.

Need help?
Feel free to contact the developer.

The 15-second example

The following script prints a message to the screen:

// My first application
object "Application"
{
    state "main"
    {
        Console.print("Hello, world!");
        Application.exit();
    }
}

To test the script, save it to hello.ss and run:

surgescript /path/to/hello.ss

FAQ

What is SurgeScript?

SurgeScript is a scripting language for games. It lets you unleash your creativity and build your own amazing interactive content!

How do I learn SurgeScript?

Go to the SurgeScript Crash Course. Also take a look at the video tutorials and check the examples.

Why use SurgeScript?

Unlike other programming languages, SurgeScript has been designed with the specific needs of games in mind. Its features include:

  • The state-machine pattern: objects are state machines, making it easy to create in-game entities
  • The composition approach: you may design complex objects and behaviors by means of composition
  • The hierarchy system: objects have a parent and may have children, in a tree-like structure
  • The game loop: it's defined implicitly
  • Automatic garbage collection, object tagging and more!

SurgeScript is meant to be used in games and in interactive applications. It's easy to integrate it into existing code, it's easy to extend, it features a C-like syntax, and it's free and open-source software.

SurgeScript has been designed based on the experience of its developer dealing with game engines, applications related to computer graphics and so on. Some of the best practices have been incorporated into the language itself, making things really easy for developers and modders.

Who created SurgeScript?

SurgeScript has been created by Alexandre Martins, a computer scientist from Brazil. He has also created the Open Surge game engine, hence the name SurgeScript.

How do I compile SurgeScript?

If you're using Open Surge, you don't need to compile SurgeScript. It's compiled for you.

If you want to compile SurgeScript by yourself, you need a C compiler and CMake. First of all, get the source code and extract the package. Next, compile SurgeScript as follows:

cd /path/to/sources
mkdir build && cd build
cmake ..
make

A surgescript executable will be available in the project folder. Additionally, SurgeScript will also be compiled as a library (libsurgescript). To perform a system-wide installation, run:

sudo make install

To test a script:

surgescript examples/hello.ss

Note: use ccmake or cmake-gui to play around with different options for compiling SurgeScript.

*nix users: the installation directory defaults to /usr. You may change it by calling cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install before make.

How do I build the documentation?

You need mkdocs. After extracting the sources, go to the project folder and run:

mkdocs build

The documentation will be available in the site/ subdirectory.

How do I embed SurgeScript into my project?

SurgeScript is available as a library. If you're a C/C++ developer, you may embed SurgeScript into your project by studying file src/main.c. The steps are as follows:

  1. Create a SurgeScript Virtual Machine (VM).
  2. Compile the scripts you want.
  3. Launch the VM.
  4. In your game loop, update the VM.
  5. Once you're done, release the VM.

You need to #include <surgescript.h> in your code and link your project with -lsurgescript. Additionally, you may call C/C++ code from SurgeScript via binding. Explore src/surgescript/runtime/sslib/ for more information.

Tip: to print the command-line options required to link your project with SurgeScript, run:

pkg-config --cflags --libs surgescript

If you prefer static linking, run:

pkg-config --cflags --libs --static surgescript-static

These may be combined with command substitution:

gcc example.c -o example $(pkg-config --cflags --libs surgescript)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].