My second attempt at a level editor for THE OCTOBER GAME was a useful failure.
A few months after my last effort, I wanted to try a new method of app development. Previously, I tended to write code in a big burst of activity. That’s fine for very small projects but if code grew past a certain threshold it became really hard to work with. It was like driving successively larger vehicles on wet sand. A bike is no problem, a car is harder, a semi-truck becomes impossible to steer or back up. It gets more attractive to just abandon it and start over. So the new way was to build smaller, more independent bits of functionality. That way I’d have something useful whether the full project succeeded or not.
I started at the most basic level: A button that switches between states and shows images reflecting that state.
Then I grouped those multi-state buttons into a cell.
Multiple cells would be grouped into a more complex control, an AttackGroup strip.
Those would be grouped into levels. Levels would be grouped into a whole Game. Then I’d have some method of transferring the data to the actual game app. That all sounds pretty complicated, right? The big idea was to construct the smallest, simplest useful bit and re-evaluate at each stage. If it started to go wrong, or I needed to work on something else, I’d at least have the last completed part to use.
In fact, something did go wrong. As I completed the AttackGroup strip, I realized I couldn’t specify two enemies in the same lane yet going in opposite directions.
Not only was this configuration allowed by the game rules, it played a critical role in making levels more challenging. Since I was near the limit of my programming skill, I had to either stop here or devote an indeterminate amount of time to research. Then I’d have to redesign the control. Then I’d continue work until I reached my limit again.
I decided I didn’t have the skills yet so I halted the level editor project and went back to work on the main game app. Even so, I used the AttackGroup strip control many, many times to generate individual AttackGroups, which I hand-edited into game levels.
Time spent: 2 days
Lessons learned: Spend more time planning before coding, to avoid dead-ends. Budget research time for more complicated work.
Mistakes made: Got too focussed on fine details and not the big picture. Let myself get discouraged by mistakes.
To do: Improve general coding and design skills with small side projects.
In the following months, I continued developing THE OCTOBER GAME, increased performance and fixed tons of bugs. I recently reached the point where all the features in the game were in place. Except for lots of fun, playable levels. To do that, I would need an editor.
To be continued.