Write and run a Gosu program
You can run a Gosu program from a command prompt. The Gosu program uses the same keywords and syntax as a Gosu class.
Before you begin
The following instructions describe running a basic Gosu program after you set up the
gosu command-prompt tool.
See also
Procedure
-
Create a file called
myprogram.gspcontaining only the following line:print("Hello World") - Open a command prompt.
- Change your working directory to the directory that contains your program.
-
Type the following command:
gosu myprogram.gspIf you have not yet added the
gosuexecutable folder to your system path, instead type the full path to thegosuexecutable.The tool runs the program.The program prints the following output:
Hello World
