Crates.io | spwn |
lib.rs | spwn |
version | 0.0.6 |
source | src |
created_at | 2021-08-21 18:50:44.627949 |
updated_at | 2021-08-21 18:50:44.627949 |
description | A language for Geometry Dash triggers |
homepage | https://spu7nix.net/spwn/ |
repository | https://github.com/Spu7Nix/SPWN-language/ |
max_upload_size | |
id | 440420 |
size | 889,586 |
A language for Geometry Dash triggers. An easy way to create levels using code.
SPWN is a programming language that compiles to Geometry Dash levels. What that means is that you can create levels by using not only the visual representation in the GD-editor, but using a "verbal" and abstracted representation as well. This is especially useful for using GD triggers, which (if you want to make complicated stuff) are not really suited for the graphical workflow of the in-game editor.
You can either use the installers for your operating system, or build SPWN from source. Please note that building from source will give you access to newer features and bug fixes, but may be unstable.
sudo dpkg -i spwn_0.0.6-0_amd64.deb
pacman -U spwn-0.0.6_amd64.pkg.tar.zst
yay -S spwn-bin
cargo build --release
target/release
Alright, enough talk, how do we actually use SPWN?
SPWN code can be programmed in any code editor, but the ones that have had SPWN extensions or plugins written for them are Visual Studio Code, Sublime Text and Vim.
Navigate to VSCode SPWN language support and hit install. In VSCode, hit enable and then create a new file with the extension .spwn
select language mode
, then select SPWN.Open Sublime Text and open the Command Palette... by selecting Command Palette from the Tools pull-down menu. In the menu that opens type install which will result in the Install Package Control option being presented. Hit Enter or left click the entry to install Package Control. Open the Command Palette again, and type 'install'. When Package Control: Install Package
is highlighted press 'Enter' then type 'SPWN Language' and press 'Enter' when SPWN Language
is highlighted.
Go to spwn().vim! and follow to instructions on that page.
For any other editor with syntax highlighting, most C type syntax highlighting schemes work fine.
Head to the docs to create a simple program, such as the one below
test = 5g
-> test.move(5, 100, 0.25)
test.move(10, -10, 2)
Save the file, then open a terminal and type in spwn build YOURFILENAME.spwn
. Make sure to have GD closed during this process. After running this command, open GD, and the levels content will be modified. Head over to the docs to learn how to program in SPWN.
Note: SPWN generates triggers near the top of your level, so you might not see any difference.
Here is a list of SPWN command line subcommands and flags. This information can be found by typing spwn help
in the command line as well.
build [script file], b [script file]
Runs/builds a given file
doc [library path]
Generates documentation for a SPWN library, in the form of a markdown file
version, -v, --version
Gets the version of spwn
--console-output, -c
Makes the script print the created level into the console instead of
writing it to your save file
--no-level, -l
Only compiles the script, no level creation at all
--no-optimize, -o
Removes post-optimization of triggers, making the output more readable,
while also using a lot more objects and groups
--level-name [name], -n [name]
Targets a specific level
--live-editor, -e
Instead of writing the level to the save file, the script will use a
live editor library if it's installed (Currently works only for MacOS)
--save-file [file], -s [file]
Chooses a specific save file to write to
--include-path [folder], -i [folder]
Adds a search path to look for libraries
spwn build addition.spwn --level-name add
Build a file called addition.spwn and write it to the level named add.
spwn build subtraction.spwn --no-level
Build a file called subtraction.spwn but don't write to a level.
spwn build AI.spwn -c
Build a file called AI.spwn and output the level string to the console.
as
operator for automatically changing typeimplement live editor features for windows
make it work on linux
nested comments
get and edit obj and trigger properties