Today’s breakfast was minimal:
That’s orange juice with extra pulp right there. Mmm, hmm!
It’s 3AM, and I’m going to sleep.
I have a mouse cursor image, and I have a second image, and I can determine when the two are colliding. I’m getting close to a game.
I finally have graphics. These are SDL RectFills that are using random red, green, and blue attributes, and the offset matches the mouse cursor’s position:
I plan on providing a sprite and making sure that there are other sprites in the playing area. I want to detect when your mouse-following sprite hits other sprites, and you will win or lose depending on which you touched.
The part that took me so long to get here was figuring out that I was using the variables incorrectly. Maybe I need more sleep. Or caffeine.
I decided to eat a quick dinner.
That’s a vegan pizza. Now, this isn’t a fake cheese pizza, so don’t get disgusted yet. This pizza is just made with different ingredients. It’s actually quite delicious, and it only takes 10 minutes to cook.
Unfortunately, I also found out that my fridge is leaking. I’m not sure why, but it has to have been a recent development. Luckily, the World Wide Web saves me again, and I can watch How to Fix a Leaking Refrigerator which tells me it could be one of three things.
Actually, it turned out that there was a fourth thing. The bottom of my fridge was filled with water! The best explanation is that over a month or so ago, I turned the setting down to a lower intensity, and so there must have been some condensation that I never noticed. I’ll be keeping an eye on this leak.
One day down, one more to go!
I have been adding mouse support to my game. As I never implemented mouse control before, ever, why not do so in a time-based competition?
I am surprised at how complicated it can be to support mouse input in my existing input system, but one thing it did teach me is that I think my input system design needs to be reworked. For example, if my game wants to know the status of the pause key, it has to keep track of the status and ask my input system for the current status. As you press and release keys, the input system updates an array, but the game itself doesn’t know when a key’s status is updated until it asks and sees that it is different.
Here’s my actual game.cpp code:
if (!m_pauseKeyPressed && InputSystem::getInstance()->isKeyPressed("Pause"))
{
m_isPaused = !m_isPaused;
m_pauseKeyPressed = true;
if (m_isPaused)
{
m_isPaused = !m_isPaused;
}
}
else if (!InputSystem::getInstance()->isKeyPressed("Pause"))
{
m_pauseKeyPressed = false;
}
All of that code is needed just to pause and unpause the game.
A simpler way to do it is to have callbacks. When a key is pressed or released, it will call a function called OnKeyPress() or OnKeyRelease(), and those functions can do whatever they want. If the pause key is pressed, the OnKeyPress() function can call the PauseKeyPressed() function. I no longer have to keep the state of the key in both the input system and the game.
In a similar way, mouse movement and button handling would work better with callbacks. Right now, since I don’t have callbacks, I have to make the game keep the status of the mouse and check if the mouse button had been pressed or was already pressed.
But it’s Ludum Dare. If the code wasn’t hastily put together and ugly, you were doing it wrong. B-)
After a quick shower, breakfast!
A banana, some cereal with almond milk, and a peanut butter and raisin and pickle sandwich. I washed all that down with a glass of orange juice (not pictured):
Now back to the competition!
After spending the evening trying to figure out what to do, I went to sleep.
Some of my ideas:
The first one involves the Japanese art of flower arrangement, and it would seem on paper to make a good game, but I am not sure how I would go about making it in 48 hours. The last one is the idea that instead of having unlimited shots to kill Space Invaders, you get only one. You have to depend on a chain reaction explosion to kill them all, so it would be more like a puzzle game. The middle two seem the easiest to make, so I might stick with them since I need to spend a bit more time just getting my code base working than most of the other contestants.
It seems that minimalist games can sometimes be very complex things to create.
I’ll take a quick shower and have some breakfast, and then it is back into the thick of things.
My girlfriend offered to cook me dinner for LD #11, and I am really glad she did. Otherwise, I probably would have made a sandwich.
The beautiful and lovely Mandy at work:
The meal. Rice and stir fried chicken, broccoli, zucchini, carrots, garlic, and shitake mushrooms, topped with chopped spring onions and nori strips, washed down with Sapporo beer: