Happy Tuesday (or Wednesday, depending on where you are) everyone! So I decided to do a quick rundown of my game and do some shameless self-plugging, and throw out the offer to sit down and play your games! So firstly, plug: http://ludumdare.com/compo/ludum-dare-31/?action=preview&uid=28862
Secondly, post a comment on this post with a link to your game, and I’ll give it a play/comment as soon as I have time. I hope to see some good ones!
So… muh game!
Star Traders. I had been sick all week leading up to Ludum Dare. I had gotten in no practice, aside from some horrifying attempt at procedurally generating 2D tile terrain while doped-out on cold meds. It wasn’t pretty. And I was (and still am) a little sick during the entirety of the jam. My friend, Artuir, offered to do music and was kind of excited about the idea. He’d done music for game jams before, but for reasons unbeknownst to me, was excited for this one. So I said, “Sure! Why not?” And now, Ludum Traders has some really good music! But, back to the breakdown…
I was brainstorming after the theme release. I knew it would be tile-based, but I really had no idea what. I went back and forth between a few ideas, but finally stuck on the idea of a trade tycoon or construction tycoon type of game. After boiling it down for about 3 hours, I decided on a trade game, and had no idea what setting to put it in. So, I picked space because… spaaaaaaaaace!
I got started on map and entity and tickrate and graphics and whatnot, Artuir got started on music and had something excellent by mid-day Saturday. Once he had put the music out, it was time to work on pathfinding for the trade ships. I knew I’d be using A*, but knew more about Dijkstra’s and had actually implemented it before. I wrote up Dijkstras for first implementation and kept going. But once I started getting to where it was time to actually get ships to have path queues… there was a problem… Dijkstra’s greedy slowness was causing about a 25ms pause every time a ship calculated its path. No good. So, I started down a path of rewriting the pathfinding for A*… which turned into 9 hours of having no idea why it wasn’t working. After those 9 hours, I said “fuck this, now I’m behind…” and reverted back to my Dijkstra’s implementation, and continued working on the game with the pauses. Once I got the most basic parts of the game done, and with about 6 hours left on the 48 hour clock (I was trying to follow it, despite planning to submit for the jam), I decided it was time to revisit pathfinding again. I started at about 1300hrs at rewriting for A*. This was the result after the first hour:

I was quite confused, and very, very frustrated. I rewrote it and optimized it and changed from floats to ints and from ints to decimals and doubles… I couldn’t figure out where my math was wrong. Then, in one last highly frustrated and desperate moment, I converted the ENTIRE algorithm to doubles and found my mistake… a cast from double to int in my heuristics function I didn’t even realize I’d made. Fixing that gave me working, fast, accurate pathfinding. I had completed something I had never done before! I implemented A* pathfinding in a game that wasn’t built from a tutorial! I was so ecstatic I hopped up with my arms in the air, ran downstairs and hugged my kid and kissed my wife before coming back upstairs to finish. Looking at the total time I spent on pathfinding… It came out to about 15 hours. Absolutely too much time on one thing for a speed-based competition, but now I know it, and I’ll never have that particular problem again.
However, having spent that much time on it, meant that I had to shave needed features to get it in on-time. Random events (like pirates destroying your ships), another pass on getting the goods pricing algorithm right, the ability to buy out the stars and own them as a possible winning condition… things that would have made the game challenging and fun, ultimately got cut to finish on-time. With work looming the next day, I didn’t have much time between bedtime Sunday and submission time Monday to work on it. I polished up what I had, tested it as best I could, had Artuir test it as much as he could, and fixed the bugs we found, before submitting about an hour before the jam deadline. So there were a lot of lessons learned, and quite a few personal achievements earned, but it came at a bit of a cost.
What went right:
- Stuck to a to-do list and accomplished all but two things on it before the deadline!
- Implemented working pathfinding for the first time
- Didn’t wait until the last hour to think about sound and music
- Didn’t over-scope in terms of feature count for once
- Had time to bug-crush (a little) before the deadline
What went wrong:
- Spent entirely too much time on one thing, to the detriment of the game
- Didn’t have an outlined plan for implementing certain features
- Started programming while sick
- Did not get enough practice in
- Did not finish all features due to a bad decision
What I learned:
- Don’t take on new, poorly-understood tasks during a timed competition
- Stick to slightly simpler, less complex ideas if they need complex implementaiton
- If you have a working algorithm but it’s slow, work around it rather that write something that takes too long but is fast
- Have your workspace ready 24 hours in advance, rather than start preparing it 1 hour in advance
- Consider the resolution requirements during design, and operate around it accordingly
I had an absolute blast. I’m hoping I’m not busy during the next one, as I really want to start participating more often.
I hope everyone had a great time, and good luck during the voting round!