Debugging ExtensionAn extension for the Stencylworks game engine that adds better functionality for debuggingMy number one complaint with Stencyl is the lack of features to allow for in game testing, so I made this extension to an in game console to your project!
Download Here:
https://github.com/ess4654/Stencyl-Debugging-Extension
Enable Debugging
(MUST BE CALLED FIRST) This block will enable/disable the debugging functionality. Debugging console can be turned on and off with the use of the key set with Debug Console Key. This block will prevent the key from opening the console.
Is Debugging
This will return whether or not the debugging console is open.
Set Console Key
This block will set the key that opens the console and toggles in game debug mode.
Set Console Text
Change the text that the console will use.
Print Console to Screen
This block must be called in Drawing function to show console contents on the screen. Note: Check Key State block does npt need to be used when this block is added to code. To use debug features without the console use the Check Key State block instead.
Console Log
Print anything in console.
Clear Console
Clears the console of any logged items.
Show Frames Per Second
Toggles the Frames Per Second output in console. Default is true.
Show Number of Actors
This block can show both the number of actors currently on screen and the number of actors in the scene in the console window.
Check Key State
This block will check the state of the debugging keys without opening the console window. If Print Console to Screen Block is used in Drawing function, this block does not need to be used to get keyboard updates.
Set Debug Key
Debugging allows for up to 10 hotkeys assigned. The state of each key can be checked using the state block and will always return false if the debugging console is closed. Note: If you require the use of more then 10 keys for debugging purposes, please message me and I can add additional keys to the extension.
Get Debug Key State
This will return the state of one of the 10 hotkeys. Useful for doing stuff in game to test while debugging console is open.
A few examples of a good use for this block are:• A button to unlock all powerups in a level
• A key to make player invincible to enemies
• Increase/Decrease time in a game with a countdown clock
• Fly through level with 8 way movement
Formatted Coordinate
Returns a nicley formatted X, Y Coordinate with a text field for naming.
Formatted Vector
Returns a nicley formatted X, Y, Z Vector with a text field for naming.
Key Value
Returns a nicley formatted Key Value pair.
Logic Condenser
Useful shortcut for setting values that is faster then an if else statement. If the boolean value is true, the first value is returned otherwise the last value will be returned.
Print List
Print each item of a list to the console with index value.
Print 2D Array
Given a valid 2D list, the contents will be printed to the console.
Last Updated April 1, 2020 v1.0-------------------------------------------------------------------------------------------------------------------------
Additional Notes: Debug Drawing will always be on if the console is open. The use of in game block can disable it.
Contact Me:
thejoblesscoder@gmail.comExtension is Open Sourced and Licensed under MIT open source standards.