Allocating large arrays in .NET
I experienced a strange memory issue with Lemma this week. Memory usage skyrocketed each time I loaded a level; it never dropped back down.
Now granted, I am definitely the garbage collector's worst nightmare. (I'll just say this: closures. Closures everywhere.) But at this point I am setting fields to null all over the place and manually calling GC.Collect() after unloading a level, all to no avail.
Enter the .NET Large Object Heap. See, the .NET garbage collector actually compacts the regular .NET heap by relocating small objects to fill the fragments. For exceptionally large objects, it's simply too expensive to relocate them, so the runtime allocates them on the Large Object Heap, which is not compacted.
Slowmo! Stamina! Sprint! Socialism! What?
Stamina and Sprint
I finally realized that speed is perhaps the most important resource in a Parkour game. Up until now, Lemma hasn't really understood the concept of "faster" and "slower"; you were always going the same speed. Acceleration from a dead stop was almost instantaneous and the Parkour moves didn't change your speed (with the exception of wall-running).
With this in mind, I decreased the acceleration a lot and made all the moves preserve your momentum. To make a longer jump, you'll need a running start. I also put in some simple combos. For example, doing a roll immediately followed by a jump lets you jump a lot farther.
Scary Monsters and Nice Clouds
Nice Clouds
I got sick of my old pixelated skybox powered by Google Images and decided to make a real one. I used Spacescape to generate a sufficiently trippy outer space skybox, chopped up some cloud photos in Gimp, fought with my code for a couple hours, and wha-la:
Scary Monsters
What's that glowy green thing you say? It's the new monster I just added, creatively named "the vine". See that string of dark blocks coming out of it? It snakes its way to you and basically tries to constrict you to death. Here's another screenshot of its handiwork after running for a minute or two.
Now with 100% more frame buffer distortion!
Flying in the face of midterms and other IRL issues, Lemma boldly marches on!
Spawn Point Graphics
I realized you need a way to know where you'll respawn if you die, so I added some spawn point graphics. Got the idea from Borderlands. Actually can we talk about Borderlands? Man, every time I play a good game I have to resist the urge to start incorporating its ideas into my projects. If I ever announce that Lemma will feature randomly generated weapons, just slap me until I snap out of it please.
Story Design and Loading/Saving
I now have the complete backstory and in-game story options written out!
After the initial tutorial, you'll get to a central area of the island which connects to four other areas. At that point, you'll be able to leave the island whenever you want, or you can visit one or more of the four adjacent areas before leaving. In each area you'll have to make a yes/no decision. You'll get a different ending depending on which decisions you make and at what point you exit the island. Your choices also affect how many parkour abilities you unlock. There are 5 major possible outcomes, and each outcome has a number of variations, for a total of 15.
Lemma Release 2
Here's an extremely cut-down demo! No tutorial, no story, no explanation, just showing off new moves, new enemies, and the new weapon.
Download it here for free. Please let me know what you think!
Super-Awesome Change List
- Totally new block dissolve effects and sounds. Preeeettty
- A new move that builds a platform of blocks and jumps you to the end of it.
- The kick is gone; instead you can now roll at any time, which not only prevents you from receiving fall damage, but also blasts through any breakable blocks in front of you and if you're in mid-air, tries to build a platform beneath you.
- New aiming system that lets you know if you're able to jump to the target or not.
- A new type of exploding block.
- A "tower" enemy that falls on you if you get too close.
- Brand-new pistol, complete with reload animation, iron sight functionality, and magazine pick-ups.
- When you die, you now drop the pistol and phone, so you have to go pick them up again.
- You can now change the mouse sensitivity and key bindings.
- The MSI installer was replaced by a simple Zip archive with a separate executable that makes sure everything is installed. Now it will be easier for me to push out more frequent updates.
- More tweaks than I have time to list, including animation improvements, lots of new and improved sounds, performance optimizations, and bug fixes.
Stuff To Look Forward To
Brace yourselves
Everyone pretend this blog didn't die for six months, okay? Okay. Here's a brain-dump of random things I've learned while not blogging.
- Distributed programming is tough but really, really fun.
- gevent, Couchbase, Fabric, and pyzmq are awesome.
- Django's admin interface can be twisted fairly easily into a CMS for a dynamic website.
- Bed bugs + week-long power outage + another week with still-broken A/C = fun summer.
- Leaky washing machine + computer in basement directly beneath = new computer.
- A bike is the best thing ever when you're in college.
- Spotify is the best thing ever regardless of time or space.
- Batman was eh.
- Bourne was great.
- Game of Thrones, holy crap! Both the books and TV show. Amazing.
- Buy a Mosin-Nagant. Best $100 you'll ever spend.
- Girls, how do they work?
- Writing HTML5 games is a thing which I can do.
- Don't submit your cover design contest entry a month early, they might totally forget you.
- Tribes is fun and free.
- Battlefield 3 added Counterstrike's gun-game mode. Best ever.
- In December, Lord willing I'll be graduated, living in a new apartment, working full-time for an iPhone game studio. Holy crap.
Life's been busy, but this last semester is pretty easy, so I've had lots of time to work on Lemma. No time to talk about it now, but keep an eye out for a juicy trailer / alpha download soon. For now, I'll just tease you with this!
Finals week
Sorry, no news to report on Lemma this week. School is keeping me busy. But I thought I'd share some of the projects I'm working on for school, since they're kind of cool and actually somewhat related to Lemma. First up: a 3D rapid prototype of the original toon-style Parkour Ninja!
Here's the model rendered in Cinema 4D:
And here it is printed out in 3D:
Alpha feedback
Thanks so much to everyone who made the alpha a great success! I'm blown away that people were able to look past the bugs and crashes and clunky controls and somehow get a positive experience out of it! It gives me hope and motivation to press on.
I got a ton of very useful feedback. Here's a quick summary of what I learned:
- The atmosphere and tone is cool and unique.
- The text-message-driven story works pretty well.
- Everyone immediately says "Mirror's Edge + Minecraft"... but then realize they're okay with that! :)
- The physics is kinda buggy.
- Mouse inversion, gamma settings, and vsync toggling are a must.
- The controls are unnecessarily complex. Too many keys.
- Buggy physics. Player gets stuck in the environment a lot. Large objects occasionally start floating around on their own. Swimming doesn't really work at all.
- Combat is weak. You left-click once and hope that kills the enemy before it kills you.
- It's rather disconcerting being able to look down your own nose. Also, everyone thinks the player model is a female when in fact it's a male with big pecs. Yikes.
- Oh yes, there's lots of physics bugs.
- The tutorials are sometimes easy to miss, and the game expects you to have a move fully mastered immediately after learning it.
- Handling publicity and responding to feedback is a lot more work than I originally thought! And hosting large downloads on "pay for what you use" web hosts is a baaad idea. Good problems to have though. :)
I've already set to work fixing a lot of these issues, especially with the controls and physics. My number one priority is getting the player animation and movement perfect, which is a pretty long way from where we are now.







