I enjoyed creating and sharing mini templates for GameSalad so wanted to do the same for AGK2 (AppGameKit 2). AGK2 has its limitations (rubbish textboxes!) but it’s been able to do pretty much everything I’ve needed and I love working with it. I feel I’ve learnt quite a lot over the last year or so of using it, but there’s still some areas I’ve not really touched. 3D being one of them, so you’re unlikely to see any 3D projects on this page.
Like the GameSalad templates page, these aren’t full programs. They’re snippets that you could possibly use in your full program or game. Or at least takeaway and modify to suit your needs.
A function to check for double clicks as there’s no function to do this in AGK.
A really small and simple function to reverse a string as there’s no function to do this in AGK.
Function: WrapText(string, float, float)
This is a function that will wrap a really long string to a specified maximum width. It adds chr(10) at certain points in the string to split across multiple lines. That string can then be used with CreateText().
Multiple Functions: Reading And Saving To Text Files
A number of very short functions to save single lines to a text file and read it. Useful for storing flags and variable values for each time the app is loaded.