▶
The Speedrush Modding API
Well, you've come to the right place! Here, I'll be documenting the Speedrush Lua API, as well as the mod system itself. Prequisites: - Knowledge of the Lua programming language (Read the Docs Here) - Knowledge of your operating systems file browser - A text or code editor of any sorts (Though, I do recommend Visual Studio Code)
playerCount - This variable indicates how many players are online on the said server. playersDead - This variable how many players are on the "Game Over" screen on the said server. gameVersion - This variable indicates the version of the game. serverPing - This variable indicates the ping of the said server. serverPort - This variable indicates the port number of the said server isClient - This variable indicates if the script is acting as a client or server. scriptPath - This variable indicates the location to the current script, minus the script file name. speedrush - This variable is important; it contains utility functions shared by Speedrush, you can learn more about it below.
speedrush.resetGlobals() - This function will reset all Speedrush provided variables to their default values. speedrush.system.getCWD() - This function will return the current working directory of Speedrush's Unity Player. speedrush.system.getAssembly(name) - This function will return the name of the C# assembly containing the type specified in 'name' speedrush.system.getDeltaTime() - This function will return the Unity 'deltaTime'. speedrush.system.getDeltaTime() - This function will return the Unity 'time'. speedrush.system.serverPrint(message) - This function will log the message specified in 'message' to all of the platers connected to the said server. speedrush.discord.setPresence(presence) - (This function will only work if the user has the Discord chat app installed and running!) This function will set the user's Discord chat app presence to the string specified in 'presence'. speedrush.util.getCSharpProperty(type, property) - This function will return the value of the 'Type's property specified in 'property', if it exists. If not, this function will return 'nil'. speedrush.util.callCSharpMethod(method) - Immediately calls the method with the name specified in 'method', if it exists. speedrush.graphics.newSprite(tag, fileLocation, x, y, width, height) - Creates a new sprite on the screen if 'fileLocation' exists in the mod folder path. The sprite will only be created if the file specified in 'fileLocation' contains valid image data. 'x' and 'y' specify the location of the sprite, and width and height do exactly what their names imply they do. 'tag' is used for tracking modifying the sprite. speedrush.graphics.setSpritePosition(tag, x, y) - Changes the sprite specified in 'tag's position to 'x' and 'y'. If you have not called speedrush.graphics.newSprite or the tag does not exist, this function will not do anything. speedrush.graphics.setSpriteSize(tag, width, height) - Changes the sprite specified in 'tag's width and height to 'width' and 'height'. If you have not called speedrush.graphics.newSprite or the tag does not exist, this function will not do anything. speedrush.graphics.destroySprite(tag) - Destroys the sprite specified in 'tag'. If you have not called speedrush.graphics.newSprite or the tag does not exist, this function will not do anything.
Callbacks are functions that you need to define in your scripts, however they will be called automatically by Speedrush when the described event is triggered. onEnable(firstTimeEnabled) - Called when the said mod is enabled, 'firstTimeEnabled' will be 'true' if the said mod was just added. onDisable() - Called when the said mod is disabled. onPlayerJoin() - Called when a player joins the said server. onUpdate() - Called every frame of the game. onMove(direction) - Called when a player moves in any direction, possible values of 'direction' are "LEFT" or "RIGHT". onDash(flipped) - Called when a player dashes, if the player is facing left, then 'flipped' will be 'true', otherwise it will be false. onExit() - Called when a player exits the said server. onAnimationPlay(index) - Called when a player's sprite animation changes states. The parameter 'index' (Number) indicates the animation that will be played (0 = Run, 1 = Jump, 2 = Dash, 3 = Idle) onFlip(flip) - Called when a player's sprite flips. if the will be flipped left, then 'flip' will be 'true', otherwise it will be false.
Speedrush mods are very easy to package, all you have to do is put all of your script files, images, etc into a folder with a data file. This data file should simply be named 'mod' and have the file extension '.json'. Here is an example of a good mod folder structure: . script.lua ignore/ script.lua image.png mod.json Keep in mind: - Speedrush will only run scripts with the file extension: '.lua' (Notice how Speedrush doesn't attempt to run the 'image.png' file) - Speedrush will only run scripts in the root mod directory folder (Notice how I titled the nested folder in the file structure example: 'ignore') - Although Speedrush cannot run scripts in nested folders directly, they can still be required by other Lua scripts. - Speedrush will report script errors to you (If there is any) in the control panel window (Accessed by pressing the 'Up' Arrow Key) - Speedrush will block you from installing two mods with the same name. Here is a template 'mod.json' file: { "name": "Template", "description": "Template\nMod", "version": 1.0 } These are the only JSON fields needed for a full mod data file, so edit them to your liking.
You are free to distribute, sell, or share your Speedrush mod in any way. However, I do have some tips: - Compress your folder to a .zip, .rar, .7z, etc., as most mod sharing sites do not allow a raw folder to be uploaded. - Add a readme file to introduce your mod in detail or provide an installation/usage tutorial. - Follow the Semantic Versioning rules when updating your mod and/or data file's version field. If you've followed all of these steps correctly, you should be able to start modding Speedrush like no tomorrow!
[ 2023-03-19 14:16:18 CET ] [ Original post ]
Want to make a mod for Speedrush?
Well, you've come to the right place! Here, I'll be documenting the Speedrush Lua API, as well as the mod system itself. Prequisites: - Knowledge of the Lua programming language (Read the Docs Here) - Knowledge of your operating systems file browser - A text or code editor of any sorts (Though, I do recommend Visual Studio Code)
Scripting API
Variables
playerCount - This variable indicates how many players are online on the said server. playersDead - This variable how many players are on the "Game Over" screen on the said server. gameVersion - This variable indicates the version of the game. serverPing - This variable indicates the ping of the said server. serverPort - This variable indicates the port number of the said server isClient - This variable indicates if the script is acting as a client or server. scriptPath - This variable indicates the location to the current script, minus the script file name. speedrush - This variable is important; it contains utility functions shared by Speedrush, you can learn more about it below.
Functions
speedrush.resetGlobals() - This function will reset all Speedrush provided variables to their default values. speedrush.system.getCWD() - This function will return the current working directory of Speedrush's Unity Player. speedrush.system.getAssembly(name) - This function will return the name of the C# assembly containing the type specified in 'name' speedrush.system.getDeltaTime() - This function will return the Unity 'deltaTime'. speedrush.system.getDeltaTime() - This function will return the Unity 'time'. speedrush.system.serverPrint(message) - This function will log the message specified in 'message' to all of the platers connected to the said server. speedrush.discord.setPresence(presence) - (This function will only work if the user has the Discord chat app installed and running!) This function will set the user's Discord chat app presence to the string specified in 'presence'. speedrush.util.getCSharpProperty(type, property) - This function will return the value of the 'Type's property specified in 'property', if it exists. If not, this function will return 'nil'. speedrush.util.callCSharpMethod(method) - Immediately calls the method with the name specified in 'method', if it exists. speedrush.graphics.newSprite(tag, fileLocation, x, y, width, height) - Creates a new sprite on the screen if 'fileLocation' exists in the mod folder path. The sprite will only be created if the file specified in 'fileLocation' contains valid image data. 'x' and 'y' specify the location of the sprite, and width and height do exactly what their names imply they do. 'tag' is used for tracking modifying the sprite. speedrush.graphics.setSpritePosition(tag, x, y) - Changes the sprite specified in 'tag's position to 'x' and 'y'. If you have not called speedrush.graphics.newSprite or the tag does not exist, this function will not do anything. speedrush.graphics.setSpriteSize(tag, width, height) - Changes the sprite specified in 'tag's width and height to 'width' and 'height'. If you have not called speedrush.graphics.newSprite or the tag does not exist, this function will not do anything. speedrush.graphics.destroySprite(tag) - Destroys the sprite specified in 'tag'. If you have not called speedrush.graphics.newSprite or the tag does not exist, this function will not do anything.
Callbacks
Callbacks are functions that you need to define in your scripts, however they will be called automatically by Speedrush when the described event is triggered. onEnable(firstTimeEnabled) - Called when the said mod is enabled, 'firstTimeEnabled' will be 'true' if the said mod was just added. onDisable() - Called when the said mod is disabled. onPlayerJoin() - Called when a player joins the said server. onUpdate() - Called every frame of the game. onMove(direction) - Called when a player moves in any direction, possible values of 'direction' are "LEFT" or "RIGHT". onDash(flipped) - Called when a player dashes, if the player is facing left, then 'flipped' will be 'true', otherwise it will be false. onExit() - Called when a player exits the said server. onAnimationPlay(index) - Called when a player's sprite animation changes states. The parameter 'index' (Number) indicates the animation that will be played (0 = Run, 1 = Jump, 2 = Dash, 3 = Idle) onFlip(flip) - Called when a player's sprite flips. if the will be flipped left, then 'flip' will be 'true', otherwise it will be false.
Packaging your Mod
Speedrush mods are very easy to package, all you have to do is put all of your script files, images, etc into a folder with a data file. This data file should simply be named 'mod' and have the file extension '.json'. Here is an example of a good mod folder structure: . script.lua ignore/ script.lua image.png mod.json Keep in mind: - Speedrush will only run scripts with the file extension: '.lua' (Notice how Speedrush doesn't attempt to run the 'image.png' file) - Speedrush will only run scripts in the root mod directory folder (Notice how I titled the nested folder in the file structure example: 'ignore') - Although Speedrush cannot run scripts in nested folders directly, they can still be required by other Lua scripts. - Speedrush will report script errors to you (If there is any) in the control panel window (Accessed by pressing the 'Up' Arrow Key) - Speedrush will block you from installing two mods with the same name. Here is a template 'mod.json' file: { "name": "Template", "description": "Template\nMod", "version": 1.0 } These are the only JSON fields needed for a full mod data file, so edit them to your liking.
Distributing your Mod
You are free to distribute, sell, or share your Speedrush mod in any way. However, I do have some tips: - Compress your folder to a .zip, .rar, .7z, etc., as most mod sharing sites do not allow a raw folder to be uploaded. - Add a readme file to introduce your mod in detail or provide an installation/usage tutorial. - Follow the Semantic Versioning rules when updating your mod and/or data file's version field. If you've followed all of these steps correctly, you should be able to start modding Speedrush like no tomorrow!
Happy Modding!
[ 2023-03-19 14:16:18 CET ] [ Original post ]
Speedrush
Steve Studios
Developer
Steve Studios
Publisher
2023-03-06
Release
Game News Posts:
17
🎹🖱️Keyboard + Mouse
No user reviews
(0 reviews)
Public Linux Depots:
- [120.98 M]
Welcome to Speedrush!
Speedrush is an endless challenging platformer which can be played alone, or with other users. It is the perfect game to use to chill out with friends, to challenge yourself, or to practice your platforming skills.
Mechanics
Spike - Instantly kills you when you land on top of one!
Acid block - Instantly kills you when you either land on top of one, or simply touch the acidic top of the block!
Glue Block - Stops your movement while you are grounded!
Controls
Dash - Acquire a small boost of speed for a short period of time, can only be used once while airborne (Grounding will allow you to use it again).
Run - Move across the map at normal speed on the X axis!
Jump - Jump over obstacles and blocks!
FAQ:
How do I join a friend's server?
Your friend must first be hosting a server, which can easily be done by checking the "Host" checkbox when joining in multiplayer mode, if so, ask them for their P u b l i c IP address, as this is a requirement to connect to the server. Ask your friend to port forward their router if they are comfortable doing so, and ask them to send you the port they chose.
If all these steps are completed, you can open up speedrush, select multiplayer after hitting the play button on the title screen, and enter the info you have obtained into the "Server Address" text box in the following format
{Server Address}:{Server port}
Why do the animations look wobbly?
This is intentional, as the animations are frame by framed.
What engine was used to make the game?
Unity.
Speedrush is an endless challenging platformer which can be played alone, or with other users. It is the perfect game to use to chill out with friends, to challenge yourself, or to practice your platforming skills.
Mechanics
Spike - Instantly kills you when you land on top of one!
Acid block - Instantly kills you when you either land on top of one, or simply touch the acidic top of the block!
Glue Block - Stops your movement while you are grounded!
Controls
Dash - Acquire a small boost of speed for a short period of time, can only be used once while airborne (Grounding will allow you to use it again).
Run - Move across the map at normal speed on the X axis!
Jump - Jump over obstacles and blocks!
FAQ:
How do I join a friend's server?
Your friend must first be hosting a server, which can easily be done by checking the "Host" checkbox when joining in multiplayer mode, if so, ask them for their P u b l i c IP address, as this is a requirement to connect to the server. Ask your friend to port forward their router if they are comfortable doing so, and ask them to send you the port they chose.
If all these steps are completed, you can open up speedrush, select multiplayer after hitting the play button on the title screen, and enter the info you have obtained into the "Server Address" text box in the following format
{Server Address}:{Server port}
Why do the animations look wobbly?
This is intentional, as the animations are frame by framed.
What engine was used to make the game?
Unity.
MINIMAL SETUP
- OS: Any
- Processor: 2.5+ GHz Intel Core i3 ProcessorMemory: 4 GB RAM
- Memory: 4 GB RAM
- Graphics: GTX 660 or Equivalent
- Storage: 64 GB available space
- OS: Any
- Processor: Somewhat Recent Generation of Intel i5Memory: 8 GB RAM
- Memory: 8 GB RAM
- Graphics: GTX 1660 SUPER or EquivalentNetwork: Broadband Internet connection
- Storage: 128 GB available space
GAMEBILLET
[ 6061 ]
GAMERSGATE
[ 1312 ]
FANATICAL BUNDLES
HUMBLE BUNDLES
by buying games/dlcs from affiliate links you are supporting tuxDB