I am completely new to Playdate and the Playdate SDK. Now I am trying to figure out what game would be awesome for the Playdate. I want to create a game that uses, of course, the crank! Every game needs a goal and a purpose with some aspects of strategy and action.
I already wanted to create an arcade game, so I came up with the following idea:
Your spaceship gets stranded on a hostile planet. In order to escape the planet, you need to survive various attack waves of hostile critters. The attacking critters, when killed, drop resources. After an attack wave, you have the chance to gather the resources. These resources are needed to fill up the bio tank that is necessary to safely escape the planet.
So the game concept is set, and now I need to start developing the game. I have over 30 years of experience in programming; however, my last game was quite a while ago, around 1998, in DOS, programmed in Turbo Pascal. It was a Lemmings clone that included a level editor. Anyway, my main focus in programming nowadays is developing web apps. Fortunately, Playdate has come into my path, and LUA seems like a perfect programming language to start with. It reminds me of Python and Turbo Pascal, so it shouldn't be too hard to learn.
I started to figure out the LUA structure and created several classes that would help me in developing the game. Currently, the most important class is the sprites class that uses the Playdate sprite library. The reason for a separate class is that I want to separate the game sprites into several classes/categories, such as the enemy and player classes. The sprites class that I built makes it easy to index the sprites and call them globally from the different classes.
I began creating some graphics. I used to use Photoshop most of the time for web development tasks; however, for this game, I searched for an alternative. I found Aseprite, a tool for creating pixel-perfect two-color pixel graphics. It has good reviews, and once you get the hang of it, it works great. The first sprite I created is the spaceship, I wanted it to look like an UFO. The spaceship sprite includes a cutter and the cannon. I split the spaceship into two parts: the dome and the bottom part. Between the two parts, the cannon should rotate. In a future state of the game, if I am pleased with the design, I want to add cracks to the dome when being attacked, giving the user an urge to defend his spaceship.
Figure: dome, bottom part, cutter and cannons (6 frames)
I soon noticed that putting all the parts in one sprite may be a bit too much. So I separated the sprite into different sprites. I will explain it later on. For now, let's focus on the spaceship. To rotate the cannon and the cutter, I want to use the crank. The cutter is for close combat, and the cannon is for targeting further away. There are some predefined functions for using the crank; however, they are quite rudimentary. That's why I wrote a class specifically for the controls. I will name the class "inputs" since it is responsible for handling all the inputs.
I guess the basic parts are finished, and I have something on the screen, including some controls. The use of the crank for rotation is quite satisfying. I decreased the crank a bit to get smoother control. We don't want to make it too fast for the player.
Next to-dos are adding some enemies and adjusting the graphics for the spaceship.