Ludum Dare 47 ran from 6PM on Friday, October 2, to 6PM on Sunday, October 4. This is the latest instantiation of one of my favorite game-making events. The traditional Ludum Dare is a 48-hour game development competition in which participants are given a theme and then must make a game from scratch—code, art, music, sound, story—within the time constraints. "From scratch" is a bit ambiguous, since one is able to use programming libraries, game engines, and fonts, but the spirit of the event is clear. There's also a "Jam" category, which allows for teams, third-party assets, and an extra 24 hours, but to me that feels like a different, concurrent event. There's nothing wrong with it of course, but Ludum Dare to me means the traditional competition (or "compo").
The theme for LD47 was "Stuck in a Loop," and my eldest son and I both created entries for the compo. Because of family obligations, we only had a little more than 24 hours to work on them. The other boys worked on related projects in Kodu and Construct while we worked on ours.
The rest of this post is about my LD47 project, Orbital Blast. Follow that link to the LD47 page, or you can also jump right to the HTML5 build (which was built, of course, through continuous integration).
The moment I read the theme announcement, I heard Devo's "Stuck in a Loop" playing in my mind. This put me in a retro mindset that got me thinking immediately about cyan and magenta. This combined with the "loop" idea of Gyruss. In fact, in 2012 for Ludum Dare 25, I made a quick entry called Reverse Gyruss, in which you play the aliens instead of the hero in a game of similar topology. I have fond memories of playing Gyruss on the C64, although it was one of many games I enjoyed; I suspect part of my reverence for the design comes from Raph Koster's including it as a notable evolution of shmup topology in Theory of Fun.
My family went on an after-dinner walk before I could sit down and start working, and we discussed some different interpretations of the theme. I think it was part of this conversation in which my wife asked me if there was something specific I wanted to learn from this jam. My first thought was that there wasn't, but on further reflection, I really did have two goals: one was to explore how object-oriented architecture manifests within Godot Engine, and the other was to implement examples of juice.
Controls
Developing the control of the games was challenging. I tested primarily with keyboard input, which I intend to be the primary input scheme. For most of the game's brief development life, I had a system where left moves the ship clockwise and right moves it counterclockwise. This works well for the ship's starting position at the bottom of the screen, but it gets awkward when maneuvering from the top. Upon further reflection, I could imagine holding a C64 joystick and pushing the stick in the direction where I wanted the ship to be, rather than the relative direction I wanted it to move. I redesigned my input handling logic to use this same approach with keyboard input. I could not puzzle out the geometric problem of determining which way around the circle to move the ship. For example, if the ship is at 9 o'clock, and you give input for 12 o'clock, how do you know which way around the circle to move? This was a case where I had to look up the formula and insert it into my solution.
Supporting touch input cost me quite a bit of attention. I started with keyboard input but, knowing how it easy it was to post an HTML5 build, I also knew that supporting touch would be convenient for players. My first approach—when the input system was based on left and right input—I tried just putting simple, handcrafted buttons on each side of the screen. Unfortunately, Godot does not make it easy to allow more than one button to be pressed at a time. Adding further complication is the problem that testing multitouch input requires me to deploy to the Web and load the game on my phone, so the cycle time is very long. After an hour or so, I decided this was not worth the effort and abandoned touch input... until later, when it had been scratching at the back of my mind and I decided to add it again. This time, I had the Gyruss-style input working for the keyboard, and it seemed natural to allow the player to touch the screen to move toward that point. Indeed, the math here was basically the same as what I already had in place, so it was just input processing. Unfortunately, this still raised the problem of not having an easy way to handle or test multitouch. A nice solution would be to look for a second finger down to fire, but I didn't have time for that, so I switched to an approach where touch (or mouse) input simply keeps the ship firing as quickly as it can.
No comments:
Post a Comment