Journal #too many. The final countdown.
22:43
Continuing sprites.
01:25
All boni have sprites. The ice and the sea are colored too. The bullets now have trails of smoke.
02:15
There is an island and a bunker on it. How come that took me 50 minutes??
Here stops the log because I clearly had something else to do than write a log… But this is what happened:
I drew the sprites for the collectible boni, which took a while. Then I made the seal sprite. I realised it was so small that I could cheat and rotate/flip it to make 3 other directions. Then I made the sprite used for the last two direction, and the code to take care of the drawing depending on the angle.
At that point I was supposed to do the same for the bears, but I realised it would take me took long, so I delayed indefinitely. Instead I made the opening screen.
Then some sounds, really fast with sfxr. I decided not to lose too much time with that. Actually I *was* fast. In maybe 20 minutes it was done.
Came the terrifying moment of parameters tuning and play testing. I must confess I didn’t do too much of this, so there is a chance the game is too easy, or too hard.
Then I had one hour left, and thought it would be awesome to make music while checking nervously the clock and all the people on IRC saying that they were done already. It went pretty well too.
Now five minutes before deadline, it was time for packaging. Which, with Löve, is supposed to be as simple as zipping stuff up and posting it proudly on the dev blog. Heh, something *had* to go wrong. The “compiled” game didn’t run. Cause: I used Lua modules to divide the game in several files. Worked OK as long as the running directory actually contains these files. Once inside the .love file, you can access them only with Löve’s special require function. So OK, I changed that. But then something else broke. The game half worked. Some stuff was there, some was not. The biggest weirdest Heisenbug I had ever produced. After half an hour of not finding the problem I still posted the game, instructing to run it unzipped (which forces people to install Löve, which I knew for sure would discourage 90% of them).
When I still didn’t find anything, I went to bed, at about 8:30.
A good day’s sleep later, I tried again to beat the beast. And it took a while. Finally, the problem was as follows (non Lua people, you may skip). At first, I used modules to separate my app states (menu and game), so every variable created inside of them was stored in the corresponding table. When I had to switch to non module separate files, almost nothing changed: instead of being table members, all new variables were simply global. Since I did happen to have no variable collision, it didn’t change anything. Except that one variable did collide, “debug”. debug is a standard Lua table, and overloading it with my debug boolean switch did screw everything up. I suppose that Löve uses these debug functions.
So all this time I just had to rename debug to debugmode and tadaa.
Packaging followed.
Now I have to play the 122 other games.
Tags: journal
I had exactly the same issue, with minutes to go. Thanks to some helpful advice from IRC, I found that if you are using ‘require’ to link multiple .lua files, then you must use the full filename (with extension) to make it work in the .love file.
So, for example, the very first line of my main.lua file is
require ‘world’
This worked fine when running the .lua files directly from love.exe. But when I created game.zip (and renamed to game.love) it would fail with a module load error.
You need to change the line to
require ‘world.lua’
(and obviously all the other ‘require’ statements). For some reason, the zip loader doesn’t add a default extension, but the normal lua file loader does.
Might be a little late now, but still…
Unfortunately it was more complex than that… My other files were not just plain code, they had a module structure, which doesn’t work quite well with love’s require() function…
But I converted everything back to normal files, and indeed used the full name with love’s require. Then the other bug came =)
Ah, coding is fun.