DEMO DOWNLOAD (.ged zip file) - Game Editor version 1.4.0
BASIC INFORMATION
Draws dot matrix style fonts on canvas. You can change width, height, dot spacing, colors, letter spacing(kerning), positioning on canvas with posX / posY, etc... Lots of permutations to create custom dotMatrix Fonts.
CODE USE
1. Create a CANVAS ACTOR
2. Access game editor's script editor.
3. Copy/Paste Global Code from below into script editor (ALTERNATIVE METHOD: Copy/paste code into a simple text editor and save as a .txt file than use Script Editors FILE=>LOAD option to import this text file into gE).
4. Add this imported code as: dotMatrixMod
CALL dotMatrix() function from your CANVAS ACTOR EVENTS (usually Create Actor or Draw Actor) like this:
- Code: Select all
dotMatrix(0, "My text goes here.", 1, "FFFFFF0000000000", 10, 10, 1, 1, 0, 0);
NOTE: The getCharCode() function in Global Code is used by the dotMatrix() to extract the character codes from your text message (dotText part).
The modeASCII allows you to display individual ASCII code characters when set between 32 to 126. A value of 0 ignores modeASCII entry and displays your message in dotText part (max of 255 characters).. The dotColors part stores 2 colors (16 characters) for off/on bits of the font using hexadecimal notation (including alpha setting). Off color is effectively the background so can use as highlighting with various alpha settings. Experiment to get different effects.
The purpose for allowing individual ASCII characters is so that you can create your own functions to create curved / wavy texts or to use gE's built in getKeyState() function to type keyboard presses directly to canvas actor. You can also create animated effects by changing spacing (Xgap / Ygap), Kerning and Stretching (wide / high) in Draw Actor and Timer events. There's lots to play around with. As per usual I'm releasing this code for free, so experiment away
GLOBAL CODE too large for post. Use from zip file. Sorry for the inconvenience