{"id":19234516,"url":"https://github.com/alemart/surgescript","last_synced_at":"2025-08-04T03:35:23.491Z","repository":{"id":14123059,"uuid":"76059025","full_name":"alemart/surgescript","owner":"alemart","description":"SurgeScript: a scripting language for games.","archived":false,"fork":false,"pushed_at":"2024-12-24T03:03:30.000Z","size":10066,"stargazers_count":62,"open_issues_count":1,"forks_count":11,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-10T02:54:30.665Z","etag":null,"topics":["game-engine","gamedev","opensurge","scripting-engine","scripting-games","scripting-language","surgescript"],"latest_commit_sha":null,"homepage":"https://docs.opensurge2d.org","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alemart.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"alemart","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2016-12-09T18:10:10.000Z","updated_at":"2025-03-31T23:31:16.000Z","dependencies_parsed_at":"2024-02-21T04:23:21.266Z","dependency_job_id":"9844d9bc-1dfc-44cc-8b5a-74013197a864","html_url":"https://github.com/alemart/surgescript","commit_stats":{"total_commits":1202,"total_committers":2,"mean_commits":601.0,"dds":0.0008319467554076532,"last_synced_commit":"355bd962bea10ea01d8927f6729504e43294399a"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/alemart/surgescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alemart%2Fsurgescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alemart%2Fsurgescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alemart%2Fsurgescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alemart%2Fsurgescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alemart","download_url":"https://codeload.github.com/alemart/surgescript/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alemart%2Fsurgescript/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268644747,"owners_count":24283362,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game-engine","gamedev","opensurge","scripting-engine","scripting-games","scripting-language","surgescript"],"created_at":"2024-11-09T16:13:56.102Z","updated_at":"2025-08-04T03:35:23.467Z","avatar_url":"https://github.com/alemart.png","language":"C","readme":"SurgeScript: a scripting language for games\n===========================================\n\n\u003cimg src=\"docs/img/surge.png\" alt=\"Surge\" align=\"right\" width=\"384\"\u003e\n\nUnleash your creativity!\n------------------------\n\nSurgeScript 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!\n\n**First time here?**\u003cbr\u003e\nGo to the [Welcome page](https://alemart.github.io/surgescript).\n\n**Where to get it?**\u003cbr\u003e\nGet it on the [Download page](https://alemart.github.io/surgescript/download).\n\n**Need help?**\u003cbr\u003e\nFeel free to [contact the developer](https://github.com/alemart).\n\nThe 15-second example\n---------------------\n\nThe following script prints a message to the screen:\n\n```cs\n// My first application\nobject \"Application\"\n{\n    state \"main\"\n    {\n        Console.print(\"Hello, world!\");\n        Application.exit();\n    }\n}\n```\n\nTo test the script, save it to *hello.ss* and run:\n\n```\nsurgescript /path/to/hello.ss\n```\n\nFAQ\n---\n\n##### What is SurgeScript?\n\nSurgeScript is a scripting language for games. It lets you unleash your creativity and build your own amazing interactive content!\n\n##### How do I learn SurgeScript?\n\nGo to the [SurgeScript Crash Course](https://alemart.github.io/surgescript/). Also take a look at the [video tutorials](https://youtube.com/alemart88) and check the [examples](examples).\n\n##### Why use SurgeScript?\n\nUnlike other programming languages, SurgeScript has been designed with the specific needs of games in mind. Its features include:\n\n- The state-machine pattern: objects are state machines, making it easy to create in-game entities\n- The composition approach: you may design complex objects and behaviors by means of composition\n- The hierarchy system: objects have a parent and may have children, in a tree-like structure\n- The game loop: it's defined implicitly\n- Automatic garbage collection, object tagging and more!\n\nSurgeScript 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.\n\nSurgeScript 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.\n\n##### Who created SurgeScript?\n\nSurgeScript has been created by [Alexandre Martins](https://github.com/alemart), a computer scientist from Brazil. He has also created the [Open Surge game engine](http://opensurge2d.org), hence the name SurgeScript.\n\n##### How do I compile SurgeScript?\n\nIf you're using [Open Surge](http://opensurge2d.org), you don't need to compile SurgeScript. It's compiled for you.\n\nIf you want to compile SurgeScript by yourself, you need a C compiler and [CMake](https://cmake.org). First of all, get the source code and extract the package. Next, compile SurgeScript as follows:\n\n```\ncd /path/to/sources\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake\n```\n\nA *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:\n\n```\nsudo make install\n```\n\nTo test a script:\n\n```\nsurgescript examples/hello.ss\n```\n\n**Note:** use *ccmake* or *cmake-gui* to play around with different options for compiling SurgeScript.\n\n**\\*nix users:** the installation directory defaults to */usr*. You may change it by calling `cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install` before `make`.\n\n##### How do I build the documentation?\n\nYou need [mkdocs](http://www.mkdocs.org). After extracting the sources, go to the project folder and run:\n\n```\nmkdocs build\n```\n\nThe documentation will be available in the *site/* subdirectory.\n\n##### How do I embed SurgeScript into my project?\n\nSurgeScript 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:\n\n1. Create a SurgeScript Virtual Machine (VM).\n2. Compile the scripts you want.\n3. Launch the VM.\n4. In your game loop, update the VM.\n5. Once you're done, release the VM.\n\nYou need to `#include \u003csurgescript.h\u003e` 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.\n\n**Tip:** to print the command-line options required to link your project with SurgeScript, run:\n\n```\npkg-config --cflags --libs surgescript\n```\n\nIf you prefer static linking, run:\n\n```\npkg-config --cflags --libs --static surgescript-static\n```\n\nThese may be combined with command substitution:\n\n```\ngcc example.c -o example $(pkg-config --cflags --libs surgescript)\n```\n","funding_links":["https://github.com/sponsors/alemart"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falemart%2Fsurgescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falemart%2Fsurgescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falemart%2Fsurgescript/lists"}