confLINKted – LD30 Postmortem

Posted by (twitter: @albertosmdev)
September 1st, 2014 1:39 pm

ld30title

The theme, Connected Worlds.
The duration, 72 hours.
The intensity, overflowing!

Developing confLINKted was a thrill ride, both for things that went really well and things that should’ve worked but slapped me in the face.

[Try and rate the game HERE! I always rate all of my rater’s games :)]

Have you ever seen a 2D character moving in a rave-like dance?
Prepare for the worst, after the jump!

Brainstorming: 15% Brain, 85% Storm

ld30_prepFor the 30th edition of Ludum Dare, I was thinking of making a little survivor game, like I did with my LD26 entry, Minimal Shifting.

But that game used 2D movement with a somewhat overhead perspective à la Zelda ALTTP, so, in order to avoid repetition, I went with a 2D platformer approach.

My idea was pretty solid “on paper“, having planned the main mechanics and figured out some obstacles to add. My mind was overflowing with ideas when I remember about my experience on 2D platformers in Unity, which was none.

Since I already established that this was a Jam Entry, I dug around for some simple 2D platformer system for Unity, and I found one by Prime31, available for free in their GitHub.

That system, while solid in practice, made me realize another flaw in the plan: I had Unity 4.3, and most 2D things in Unity only run in 4.5 with the Sprite class.

So then I thought to myself: “So, Alberto, you want to make a 2D platformer when you don’t have the specific tools you need to make them?“. I felt like somebody was sarcastically slow clapping in my brain…

So, roughly 45 minutes after that, I got Unity 4.5 and installed it. Got to test P31’s system and everything was great. They used the sprite from the main character in Spelunky so I had to get some sprites. Time to go to OpenGameArt!

This character sheet was probably my life saver, since I don’t consider myself an artist at all… So I started to use them for both characters and they turned out great (as long as they were not animated…).

Adventures with Unity2D

Aside from the inexperience on making 2D platformers in Unity, I also hadn’t tried Unity2D by itself since I was still using 4.2.
The change from 3D to 2D wasn’t that much of an issue, since most components (BoxColliders, Renderers, etc) translated well in 2D, keeping the most common features intact.

Obstacle needed to vanish as soon as they get out of the screen limits, so I arranged them to destroy themselves as soon as they collide with Obstacle Blockers located outside of the screen. The issue that emerged was that those blockers will only work with other GameObjects with both BoxColliders and RigidBodys, but those RigidBodys would depend on their mass to move, and no matter how much of mass they had, they would be pushed by the obstacles little by little, so they would eventually fall, the obstacles wouldn’t get generated, and the game would be going on with no challenge at all.

ld30esquema

I was lucky to catch this potentially game breaking little bug, but I didn’t even reach the surface of what I had to handle next.

To rave or not to rave: Platformer physics and animations

As previously mentioned, I was using Prime31’s platformer system for the game. Luckily for me, this system allowed me to manage collisions by using hitpoints like I did before on Flash, so that was an advantage. I implemented the system on my game scene to the letter without regarding the animations, since they were to be dealt with when the main game would be properly tested. So, when I get to the animations, this happens:

ld30rave

The perplexity of the situation was palpable. I mean, how the fuck was this happening? Animation glitch? Some physics voodoo?

Screen Shot 2014-09-01 at 20.49.15Well, yeah. Apparently the BoxCollider2D uses 4 points on each side to determine what specific collisions are we receiving. I think I found a bug where the player’s BoxCollider2D would be standing on one frame, and since the physics are dependent on a call from the Update() and the current Time.deltaTime, any hint of desyncronization would confuse the collider system and make it think we are actually falling, sending that message to the animation system. We are actually falling constantly, but when we are standing the velocity is almost zero so we need to specify that to the animation system so it doesn’t improvise a 2D rave. This velocity tweak saved me hours of theorizing about the nature of the problem, but it didn’t come easily.

Finishing touches

Being a fan of Soundcloud artists myself, I totally wanted to have some really talented composer to provide the theme for confLINKted! After the chaotic platformer implementation, I had to deal with the audio features on the last 6 hours of the compo, so all I could do was reach some composers whose work I already picked as a possible theme song. Unfortunately, none of them replied in time for me to put any of their songs in the game, so I went with “A Journey Awaits” by lemon42. Even though it wasn’t exactly what I had in mind, I like how the song is not just some cheap chiptune loop and periodically progresses, inviting the players to survive longer so they can enjoy more of the song.

The menus are done with NGUI and iTween, and even though NGUI already has a tweener class ready to use, it’s aeons away from the versatility that iTween has. Totally recommended! :)

TL;DR, the summary

Like any other project, confLINKted gave me headaches and reliefs. I’ll try to compress all the experience in the inevitable…

WHAT WENT RIGHT:

  • Unity’s accessible 2D engine and the things I quickly picked up from it.
  • The fact that I could design the game in a really short span of time.
  • That almost every idea I had in mind was implemented.

WHAT WENT WRONG:

  • Relying on a platforming engine I hadn’t even tried yet.
  • I went out a couple of times during the jam. That is why there are no more varied obstacles :(
  • The character animations are not entirely correct, and my velocity tweak could’ve been better.

All in all, I’m super proud of my new game. It already has a page in my portfolio (like everyone is doing, duh), and it got mentioned in the spanish gaming site AnaitGames (well, they were looking for their reader’s LD entries, but let me live the dream!). The best thing is that I still got ideas flowing about this game, so I’ll try to expand it as much as I can!


Leave a Reply

You must be logged in to post a comment.

[cache: storing page]