Thursday, June 20, 2013

Postmortem: The Legend Of Cakeulus, A school project

I'm going to talk about a game which is incomplete and which nobody will ever play. It serves, to me, as a lesson about the volume and complexity of art required in a video game, and the difficulties involved in creating it.

"it’s not hard to find the volume of some things--this branch of mathemagics is called “cakeulus” for a reason"

First things first, you might be wondering what the hell "cakeulus" is. It's a portmanteau of "cake" and "calculus," created by my high school calculus teacher for the final project of the year: finding the volume of a bunt cake using the cylindrical shell method. If you aren't terribly familiar with it, the explanation in the game script goes as such:

CAITLIN: How does it work?
WILLIAM: Have fun Jeremy.
JEREMY: You see, think of a circle, where the radius is x. That makes its circumference two-pi-x. To find the surface area of the cylinder, we multiply by the height of it--but what if the height varies?
CAITLIN: What if the height varies?--and anyway, we want the volume, not the surface area!
JEREMY: We take care of the volume in a moment, because if we integrate ALL of the surface areas--that is, two-pi-x-h-dx--we get the rotated solid, where “h” is the function we’re rotating.

This is my first semi-successful writing of any scale. The presentation revolved around me and my friends reading lines in the front of class (as we had been scrabbling to finish things the night before.) As games go, though, it was the most complete thing I have ever made. It had music, a script/complete plot and cutscenes. Though it was all hacked together at the last minute, it embodies everything that Contact: Lost isn't: a story with very little play behind it, rather than a lot of (ostensibly bad) play with a bit of story tacked on.

The story starts with four brave adventurers who must set off to kill an evil cake and save their king, but the method for killing the beings known as cakes is not simple. One must first extract the soul from the cake before destroying it, which must be done with the magic of the Staff of Cakeulus. The spell itself requires the volume of the cake, due to some natural laws relating to the magic of the game world. The original idea for the game was that of a JRPG where the characters would have spells and weapons that would ease the calculus (in order to save time) but would still have to engage in mathematics and a "classic" (final fantasy-esque) battle system. In the end, none of that was implemented. You could walk around, that was pretty much it. The game itself started with a cutscene with one of my friends reading a monologue describing the scenario. After that, you could walk over the water and buildings (the collision code stopped working--something to do with lua and global variables) in order to get to the magic shop, where we'd read something aloud (hoping the teacher would stop in the right place), and then move on to the tavern, where we'd read some more lines. Upon marching into the forest, the music stopped, and one could walk over the trees and off the screen, as I didn't have time to write limits in. The final area--the battle with the evil cake king--was spoken over the the final scene of the forest.

Amazingly, we received full marks. Nobody had ever made something interactive before (which I expected) and nobody had ever "acted" something out before (more surprising--and we were in costume too!)

Too ambitious for a project done in a week? Maybe, maybe not. Too ambitious to be done at the last minute? Yes, certainly. I sunk eight hours or so into making art and code that didn't all make it in or work. The Legend of Cakeulus is a lesson not about mathematics, but about planning and time management. And about how being stupidly overambitious can still get you marks.

My apologies, but no code or art is available. Some of the art I used is either public domain or creative commons, and there's very little code in the actual game. I didn't figure it was worth trying to release it.

Tuesday, June 18, 2013

My New Laptop

"New" should really be in inverted commas--it's from 2008.

I'm truly amazed with this thing, though. It's around five years old, and still feels solidly constructed, runs well, and feels modern. I have long suspected that Apple has the best build quality around, but as this is the first Mac I've owned since a 90's PowerPC (technically my parents') I haven't been able to verify that claim with my own experience--until now. It's one of those "Unibody" Macbooks, that are very similar to the Macbook Pros of the same period.

I'm still having trouble getting over how well it works after all this time. My brother's Toshiba laptop went after less than two years, and my mother's Dell after three or four. This Macbook is still going strong after five.

I probably can't write shock and awe to really convey how amazed I am.

Of course, it has issues. The charging slot is broken to some extent--the MagSafe charger has to be held in the right place for the laptop to charge. There's some damage to the corner where it was dropped. The DVD drive whines and scrapes on accepting disks. The battery charge drops quickly when streaming video. Yet, hardly any of these are noticeable; simple workarounds (like hooking the charge cable under the wireless mouse dongle) make them almost disappear. The latest version of OSX runs as if it was native to the laptop (unlike XP SP2...) and I'm still admiring some of the choices made in regards to fullscreen windows and workspaces, which makes up for some of the lackluster experience of using the window manager. The multi-fingered gestures are nice, when you're willing and able to use a trackpad, but otherwise they can be annoying. Finder's limited abilities are only partially made up by having a somewhat watered down bash shell available. But all in all, I'm quibbling over almost insignificant details: even a flawed laptop is better than no laptop.

Want to hear a funny story? OSX thought it could hide things from a system administrator. I broke out sudo and chown. I wonder if Finder feels violated now.

Want to hear another funny story? For the same model of mouse in Office Depot, the colorful ones are cheaper than the plain ones. I may never understand.

Anyway, these are my first thoughts on having a laptop, and using a Macintosh. I've bought 8gb of RAM and a new hard drive to upgrade it, which will hopefully prolong its life beyond the expected time, but it's doing pretty well as it is.

Thus spake the master programmer:

"After three days without programming, life becomes meaningless."

In the effort to finish school and sort out university, programming--and from that, writing in general--has been difficult for me to approach. I find that high amounts of stress inhibit the creative functions, and only recently have things been easing up. I have ideas for posts lined up, and time to write them all of a sudden. There's a postmortem on a game I wrote for a math project, and some thoughts on the nature of acting and the uncanny valley. My biweekly D&D exploits might yield some words too, as well as some musings on JRPG stories and systems. The recent purchase of a 2008 Unibody Macbook also has me writing letters to mac-using "friends" about operating system and window manager design.

But in the meantime, just keep yourself out of the clutches of the massive global conspiracy, okay?

Monday, May 13, 2013

Back, Finally

Sorting my room out took longer than expected, and I just rebuilt my rig. Between AP Testing, Cardcaptor Sakura (awesome anime, by the way--I'll have more to say about her and other magical girls in the future.), and honour band concerts, I haven't been able to put the time in sorting papers, organizing books and vacuuming that I've wanted.

Expect posts in my downtime between AP Tests this week--only the two physics tests, and then AP Propaganda and Lies AP US Government and Microeconomics.

Thursday, May 2, 2013

There Won't Be Anything Until Sunday.

At soonest. I'm busy tomorrow and Saturday at SWRTEC, the South West Regional Tuba and Euphonium Conference. I'll be sure to put a post together about it and my ambitions as a musician, but that's not happening until Sunday. Also upcoming: pen and paper RPG stuff, more postmortem to LD26, updates on affable and Contact: Lost, and maybe more things too. Plus plenty more fanservice next time!

Wednesday, May 1, 2013

I Finished A Ludum Dare Game

I'm too proud of myself.

In all fairness, this is my fourth try and it's not easy to learn the skills required to code a simple program, let alone write something approaching a full game.

But anyway, I'm calling it Contact: Lost (links and instructions at the bottom of the page.

It's a long and boring top down shooter, with some resource management time-wasting, but, to me, it serves as a testament to my abilities, which, up until now, have remained un-proved.

To start, minimalism kicked my ass as a "theme" -- if you can even call it that. I don't. It's not a theme as such, rather a design directive: it tells you how you should build your game, instead of what your game should be about/should represent. With that in mind, I ignored it, and pulled out an old favourite of mine: top down action shooter, and went about constructing the game.

Possibly the first thing you'll notice is the last thing I added: the giant text wall hanging over the ocean. I figured that the game needed to have something with it telling players what to do and how to play the game, but I had little time left. Sometime last night I ended up writing a huge tutorial for it (you can find it on the github repo). The game itself remains as inscrutable as ever. My hope was that players would put two and two together based off of the names of things: fabricators use schematics to make new items or machines. My mistake was in assuming that everything would be read and understood. That's a lot to ask of people, and text doesn't map on to pictures very well (a lot of people ask "what are those yellow  things" when talking about the capsules)

Eventually, if you keep playing long enough, you'll get into the machines. I didn't have time to work all of them in as I was going to add a power and liquid system too, which is what the boiler, turbine, solar panel, and nuclear reactor machines were originally for. The pump and aqueduct were there to make it possible to get water from the edges of the map to your miners (which would have required water) in the desert. Transporters and storage cells would have acted in tandem to allow for automated mining systems. Monsters would have attacked your systems, so you needed to place them on concrete (so they couldn't mine out of the ground near your machines) and build walls and turrets around them, killing any that get near. You would have needed the resources from these in order to upgrade yourself well enough to survive the temple and to build the machines needed to take off from the alien planet. For the Ludum Dare game, I had you build a teleporter, and a whole bunch of other machines too, in order to finish.

Ludum Dare page: http://www.ludumdare.com/compo/ludum-dare-26/?action=preview&uid=8500

Github: https://github.com/WilliamBundy/contact-lost-ld26

My project right now is refactoring and extending the hacked together LD game into a more professional (and better performing--some people only get 10 fps!) possibly marketable game. (I'll need to look into ways to sell open source code. Probably a modified version of the GPL, i.e.: "you have all of these rights BUT only if you bought a licence--and you can't give it to people if they haven't bought a licence", or maybe just writing my own.)