Recovering, Day 1
It’s been a while since I made a game. I didn’t make since summer… And the December LD is coming!
So, I’m going to get back into making games. And I’m participating in MiniLD #47.
Let’s begin!
————— Relearning planning —————
Hmm… The first game I ever made? I remember my old games surprisingly well, but I can’t remember my first one. They were written with Delphi 7 and they are short. I think I remember one very old game… I don’t think it’s the oldest one, but I’ll pick it. Let’s see if I’ll find it.
I’ve changed a computer since then, but I backed up some data from it. Searching didn’t take long. So, I found a folder of my old Delphi games. Unfortunately, I didn’t find the game I was looking for. OK, I remember it quiet well.
Also, I found out that I don’t have Delphi on my computer. Well, I’ll have to use another program then.

A rough restoration of the original game.
The game is simple: you have a stickman, you move it around. You only see 4 adjanced tiles, and, well, ones you already saw. You need to reach the chest. Once you do it, you go to the next level and control another stickman. There are doors, which need to be opened with levers.
But I didn’t use an individual screen for each level. So, in the picture above, there are 3 levels. It allowed me to make a twist: communicating beween levels. So, the switch in level 3 doesn’t open the door in level 3, but it opens the door in level 2. And behind that door is the switch that opens the door in level 3.
After some time, I created a map for my future game.

A map for the game
I designed it so (I hope) characters never meet each other. (Oh, they actually do. Well, nvm.) Also, switches can’t be switched back once used. And wires are just for understanding, I won’t include them in the game.
So, the planning part is done. Then I started programming.
————— Relearning programming —————
Well, not really relearning. I’ve been programming though I haven’t been programming games. I decided to use PhYard Builder, that I usually use for games.
The first problem is: how to store the map data. I planned to make undoing for my game, so I should make the map loading flexible, but not containing too much data. Each tile has up to two values:
- Is it explored or not. Unexplored tiles are inactive and and black.
- Is it changed or not. Used for appearing/disappearing platforms and switches turned on/off.
So, basically, there are two things to store: the level itself and the state of tiles.
The second problem is switches. I usualy store the level in a string, with each char representing a tile. But switches need more information, because they need to know what tile(s) to switch. So, I decided to mark switches with letters A-Z and describe the behaviour for each one individually.
The ends of the level also need more data: the beginning of the next level. But I can just make them switches those change not the state of tile, but is it explored or not. And mark them with letters a-z.
So, I converted the level to the text form:
[stextbox id="grey"]................ .@.@...@..A.##B. .#.#.#.#.C...... .#.#.#.#..D#@a@. .b.E.c.#.d...F#. .......#.G..#H.. .@.I.J.#.#.#.K#. .#.#...#.L.M.... .###.N##........ ...........##.e. ..f..@.@####O... .....#.......... .g.###.##P.#Q.R. ...S...#...##.#. .....T###U...... ................[/stextbox]
After about four hours, I finally got to test the game. I could move the player anywhere by clicking, and I couldn’t change players. Also, switches weren’t working. Oh, I just forgot making them work.

The first play
After a lot of debugging, I managed to make it work. Unfortunately, I found out that I also have to remember player positions. So I decided to make undoing remembering the level. So, I failed at planning. I hope that won’t happen in an actual LD.
I wiped off the “changing” of tiles surprisingly easy. So, I managed to make everything excepting the undoing.

The final version of the day
Finally, I finished the undoing. The programming part is complete!!!
————— Results —————
What went good:
- I made it!
- I remembered how to program.
- I planned well. At least the level design.
What went bad:
- Time. I think it took me longer that I thought.
- Code. The thing that went the wrongest is the undoing. I didn’t do it before, but I think you remember the action, and trace them back to undo. But I remembered the whole level…(