The world is mobile first. The true power of computers and the internet may be in the hands of personal computers, but the broadest market for publishing has recently become the mobile experience.
From Mary Meeker’s Annual Internet Trends Report. For the first time with Bond Capital in 2019.
Platform of Choice
Corona SDK (https://coronalabs.com/), written in Lua (https://www.lua.org/).
Lua is very similar to Python in the way it is written. Not strongly typed, syntax is concise. Everything is a table, which is kinda cool (and not similar to Python).
You can make simple games like this pretty easily:
Here’s a code snippet (sorry for the screenshot, Markdown doesn’t handle formatting Lua as well as Python) that I think demonstrated a tricky bit of trigonometry and ultimately memory management when drawing the bullets fired by tapping on the screen.
What’s interesting about this code is how the animation is defined using the transition.to() function of the Corona SDK. A transition moves an object from a starting point to an end point over a set period of time. Where the object should be placed on screen is calculated by the function, saving the developer the effort of manually drawing each frame of an object’s movement. If you want all bullets that miss targets to fly off screen before disappearing, but you are determing where to aim the gun based on a tap that can only generated within the bounds of the screen (otherwise the player wouldn’t be touching the screen), then you are forced to calculate an end point for the transition that is off the map along the same trajectory. Similarly, you must also determine how long it should take the bullet to travel to that end point, which should be longer than the time it would take for the bullet to fly to the point where the screen was tapped to fire the bullet.
- Target Shooter (discussed above)
- Fly Game (Flappy Bird clone) Used Sprite Objects in the Corona SDK to animate my flying guy to flap every time the screen was tapped. He also animates while idling at the beginning of the game.
- Cow Pile Utilized the Box2D physics engine to make a game akin to Cow Clicker as a final project for a mobile development class at Sierra College.