A brand new game
for Windows, HTML5, iPhone, Android TV and more,
1st February, 2018
I started work on the "Enter Your Name" screen, yesterday, but ended up doing something vaguely, but not entirely related!
In order that I can send usernames safely over the net, I opted to limit names to certain characters. In the Monkey 2017 framework, I let players use letters, numbers, and a variety of symbols.
This time, I'll be limiting things a little more.
Uppercase letters, Lowercase letters, Numbers, Space and Hyphen -
Not even a dot!
Well, if you tot them all up, 26 + 26 + 10 + 2, you get a nice round 64 characters.
And that got me thinking about binary and numbers, and other stuff.
At that point, I switched from the name entry screen, to working with the maths of numbers, and data manipulation, and all sorts of lovely number stuff!
By the end of the day, I'd got a nice pair of commands in the Framework.
"Char64x4" and "Int64x4", which takea a 4-character string and converts it into a 24-bit integer, and vice versa.
I could easily have made it a 5-character to 30-bit thing, but I felt that 4's felt better. (I might add in a 5-character version, later)
Now I can use the functionality for all manner of numerical things.
Imagine popping in a 4-letter word to generate a random seed to make a random level for a game.
Or password generation with 24-bits of information stored in 4 little letters.
Or what if you upload a level to the server and get a nice simple code to share with friends?
It's all doable with the work I did yesterday, and since the characters are numbers, letters and -, those codes will be shareable online without too much of an issue.
.. Or at least, that's the plan.
Let's see if I ever actually use it!
Today I guess I need to finish off the actual "Enter Your Name" screen!