Scriptorum

LD25

Another First Time I’m In Post

Long-time developer, Ludum Dare first timer. I’m trying to get back into game development after a long break, and this compo seemed like a great way to realize how out of practice I am. I’m using MOAI because that’s what I was last evaluating. If I tried Haxe/NME first, that’s probably what I’d be using now. With my perfectionism, limited experience with the framework, bad attitude, poor habits, low expectations and … uh … what was I saying? Well never mind that, I accept this challenge. With a fervor. And a hat. And inside the hat is additional fervor. With cheese. And inside the cheese is another hat, an impractically small hat, also made of cheese and probably additional fervor. I’m revealing how little I know about fervor, cheese and hats, aren’t I.

Editor: Sublime Text 2
Debugger: ZeroBraneStudio
Languages: Lua, C++
Framework: MOAI
Visuals: Photoshop, FilterForge
Audio: Audacity, VLC, Bfxr, Autotracker-py
Version Control: Copy and paste

Mac on the left, PC on the right, confused  "child of divorce / joint custody" monitor in the middle of it all.

Mac on the left, PC on the right, confused “child of divorce / joint custody” monitor in the middle of it all.

Murder Among Monks

I worked last night and came up with several ideas. Then I went to bed and tried to sleep, which failed, so I went back to work until 6AM. I’ve got the base code for Murder Among Monks together, although there’s hardly anything to see yet. This is a game where an ancient deity has risen up out of an isolated abbey and is systematically possessing and murdering the monks who live there. Already I can see I’m going to have to trim a lot from my design doc to get something complete by Sunday night.

Screen Shot 2012-12-15 at 11.41.21 AM

The other serious contender was The World Needs More Chaos, a game where you are a super villain and the best score possible came from raping the world of its resources, collapsing governments, starting riots, killing people in massive numbers, bending people to your will, getting a space ship built, blowing up the planet and escaping in time. While this seemed like fun, the actual ruleset needed a lot more fleshing out. It probably would wind up being a bigger task than the monk game.

 

Not surprising…

T-3 remains, but I’m losing steam. If I had the game framework all in place and working fine, then I might think there was a chance and I would keep going. But I’m still struggling with basic camera and animation systems. I didn’t THINK this was a complicated game when I started it, but I guess that’s often the case.

I learned a lot about MOAI, so that’s good. I can’t say I’m going to stick with this framework — the accuracy/lack of documentation was quite frustrating at times. I liked that I could drop to C++ if I needed to, and I didn’t like that I had to drop to C++ just to add arrow key support. I like how easy it is to do threads and action blocking, but dislike the lack of type safety in Lua. I would prefer a solution with better browser support, and the Chrome examples that come with MOAI are uselessly out-of-date. I clearly need to study more best practices in game development (my knowledge of the subject is rusty by 15 years), and do a better job of examining other people’s games with a developer’s eye.

I’m leaving off with a scrolling map full of procedural Abbey rooms. Although there’s some variation in the doorways I didn’t get to implement more interesting room types. There are monks who move around on their own, but without pathfinding they look silly. Monks experience hunger, fatigue, and guilt. When any value is sufficiently high enough they have a chance to seek food, a bed, or do work. Here’s a monk chowing down in the middle of nowhere with little “num num num” messages popping over his head:
Screen Shot 2012-12-16 at 5.06.17 PM

The monks have four sides to them, and that’s call. I didn’t get to animating their movement or any other actions:
Screen Shot 2012-12-16 at 3.13.05 PM

Here’s the dust monster (that’s you) in native form. The camera was not cooperating. Sometimes I could get it to smooth scroll and follow you about and sometimes not.
Screen Shot 2012-12-16 at 5.06.06 PM

In native form, you can sneak behind a monk and possess them. Well, that’s the theory, that’s where I left off. The notion was you’d have a timer before the mythical underworld sucks you back in, so you’re hopping from body to body trying to forestall that. Here’s a possessed monk:
Screen Shot 2012-12-16 at 5.08.07 PM

Little blue swirlies about his head. You would then control the monk, be able to pick up items (such as knives), and then kill other monks with it. Possessing monks provides a kind of nourishment that resets your meter, and also causes it to drain slower. The ultimate goal (because you are a villain, by the way) would be to kill all the monks in the abbey. Monks were built with an alarm level that would determine how suspicious they are, which makes it harder to kill them.

I cut the idea of a snake form, but apparently that wasn’t enough to get this completed in time. Snake-thing would have been your true physical shape, birthed out of a possessed monk. As the snake, your timer would become a health meter, you could kill monks by biting them, but they could fight back. If you died as a snake you’d go back to dust form. The snake could also merge flesh with a freshly-killed monk. This is better than being stuck in dust form but it really freaks out the friars, not to mention the blood trail it leaves when you walk… No matter.

I had fun and I’m glad I did this. If I do it again, I will definitely do some warm up and get together a better personal library. Hopefully by then I’ll also be more adept at MOAI, or something else. I was on my way to trying out Haxe/NME when the contest came up. I will likely continue this game in my spare (and spread-out) time. Good luck to everyone else!

Punks, Jams and Ira Glass

Last time I entered LD #25 giving MOAI a spin and being generally out of practice with game development. I was not able to complete my (surprisingly complicated) game idea in the time provided. I chose MOAI because I’d been exploring different game platforms and that was my first stop. Since then I’ve been looking at Haxe + NME + HaxePunk. For those who wonder:

Haxe is a programming language based on Actionscript. The compiler is multiplatform and can target C++, SWF, Neko VM, PHP, Javascript and to some extent C# and Java. This means you can use the same source code to compile multiple targets and produce native (read: fast) executables. NME simplifies this build process a good deal and adds project files, asset management, and a graphical API among other things. HaxePunk is a port of FlashPunk to work with NME. It’s a game library, providing a particle emitter, sprite maps, entity management, collision detection, and animation. An alternative to HaxePunk is Flixel, or you could roll your own game library on top of Haxe/NME.

One thing I like over MOAI is the greater variety of targets. I can compile and run my game in the Neko VM using nme test myproject.nmml neko, which builds pretty fast and launches the game. Then change neko to flash to build a SWF instead. Then change it mac or windows and it begins churning out C++ and creating a native build. Or change it to ios, android, html5, linux, etc. That’s pretty nice. Caveats include you can’t build some targets from some platforms (notably IOS from Windows), and there are some gotchas where some behaviors are slightly different between platforms, but overall I’m pleased with this set up.

Although I’m late to the party I thought I’d commit to producing a game for MiniLD 39, and use it for One Game a Month. I figure I come up with a game design that I think should be completable in 2 days … then with some luck I have a chance at just finishing it in 8 days.

Editor: Sublime Text 2
Language: Haxe/NME
Framework: HaxePunk, HaxePunk-AI
Visuals: Photoshop, FilterForge
Audio: Audacity, VLC, Bfxr, Autotracker-py
Version Control: Copy and paste

By the way if you missed the keynote video by McFunkypants at One Game a Month, he ends it with this great quote from Ira Glass:

Nobody tells this to people who are beginners, I wish someone told me. All
of us who do creative work, we get into it because we have good taste. But
there is this gap. For the first couple years you make stuff, it’s just not
that good. It’s trying to be good, it has potential, but it’s not. But your
taste, the thing that got you into the game, is still killer. And your
taste is why your work disappoints you. A lot of people never get past this
phase, they quit. Most people I know who do interesting, creative work went
through years of this. We know our work doesn’t have this special thing
that we want it to have. We all go through this. And if you are just
starting out or you are still in this phase, you gotta know its normal and
the most important thing you can do is do a lot of work. Put yourself on a
deadline so that every week you will finish one [thing]. It is only by going
through a volume of work that you will close that gap, and your work will
be as good as your ambitions. And I took longer to figure out how to do
this than anyone I’ve ever met. It’s gonna take awhile. It’s normal to take
awhile. You’ve just gotta fight your way through.

Tags: MiniLD #39, OneGameAMonth

A Stick in the Mud – MiniLD #39 submission

I’m pleased to have finished a game for mini ludum dare #39:

http://www.ludumdare.com/compo/minild-39/?action=preview&uid=17811

A Stick in the Mud

The theme was hindsight. I’m surprised more people don’t do the miniLDs. Two weeks is a luxurious deadline in comparison to the 2-day compo. I didn’t complete the compo last time so I think the mini was a good step for me.

4

This entry was posted on Tuesday, January 29th, 2013 at 2:12 pm and is filed under MiniLD #39. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Squeezed another one out the door for Feb One-Game-A-Month

Thanks Ludum Dare and 1GAM, for encouraging me to put out more games … even if they are shamefully dull and unplayable. 😉 I had been working on a game about operating an underwater base but it was taking me too long to figure out what the game is actually about. I mean, okay, yes, it’s about an underwater base, but the game I want to make which is part economic sim and part micromanaging the staff was again reaching beyond my February grasp. Instead I cranked out a quick idea I had about manipulating Conway’s Game of Life.  The game, Death to Conway, is a turn-based simulation of the Game of Life, and you’re given an opportunity to kill an extra cell in between generations. Excitement? Thrills? Who needs em! We’ve got cells, lots of terrible cells, and they must all be killed!

Play Now (in browser)

This was another HaxePunk joint. HaxePunk is sort of in flux now as the developer is making some additional changes to better support hardware acceleration on native targets, so I rolled back to HaxePunk 1.72a to build this one.

I don’t know why I have to code everything twice. I think it’s a failure to personally commit to my own requirements. I knew I wanted to have the ability to run the simulation separate from the display, but since I didn’t commit to it at the start, I  tightly coupled the simulation with the rendering system. Then of course I get the game working and realize no one is going to have an idea if they did well or not. The game showed you how many turns you took, but this doesn’t factor in how hard the level is. So then I decoupled the simulation from the rendering. Now I can quietly put it through 50 generations or so to determine how long it runs before it becomes stable, and then use this number of steps and number of remaining  live cells to come up with some estimated “par” value for the player to play against. If I had simply committed to adding this feature in at the start, I could have saved myself some rework.

Tags: #1GAM, haXe, haxepunk, nme, OneGameAMonth

Comments

01. Mar 2013 · 22:06 UTC
I believe you know quite well how to rate your own games in terms of quality and fun… which is a good thing! A friend once told me (this is my favorite quote…) : “The secret to success is to keep on going!!” I think that’s right…
04. Mar 2013 · 13:29 UTC
I like that statement, “you know quite well how to rate your own games,” that is so true. I quoted Ira Glass last month where he expresses a similar sentiment using the term “taste.” Until you build up years of experience in some specific endeavor, your work is going to be disappointing, and this because you have good taste. You know it has potential and can be better but it’s just not there yet. But because you know how to “rate your own games,” you will eventually get better.

LD26

Once more into the breach

I’m in for the compo. Too bad about the potato theme, though…

Editor: Sublime Text 2
Language: Haxe/NME
Framework: HaxePunk, HaxePunk-AI, Ash-Haxe
Visuals: Photoshop, FilterForge
Audio: Audacity, VLC, Bfxr, Autotracker-py
Version Control: Git

I’ll be using the Ash entity system. I’ve written some components, systems, and views in a prior game that I may want to pilfer leverage for the compo. You can find that base code on GitHub. Dead Grinder is not really a game at this moment, so much as it’s a pile of code that could theoretically be reassembled into something resembling a game given additional effort.

Good luck everyone!

Tags: Ash, haXe, haxepunk, nme

Comments

GreaseMonkey
26. Apr 2013 · 20:31 UTC
Some time into the compo I might release a Windows build of sackit + a converter, so you don’t have to put up with a shittily-interpolated output like VLC does.

It’s T-18h …

Code damn you! Code faster!

Shut Up, Good Enough, It’s Playable: The Mass Splitter Post-Mortem

A week has passed since LD48 and it’s a good time to take a deep breath and reflect. Rub our sore muscles. Think about what’s next. Weep uncontrollably. Whatever you need. In my case, Mass Splitter went out the door without a hitch! Well, rather, it was well under the maximum number of allowed hitches. It was within hitch tolerance. In truth, there were three hitches: I didn’t get in a main menu, I didn’t get in a tutorial or at least an instruction page, and there was only one level. But all these hitches pretty much have the same cause, that of running out of time, so how comes I haz runs out?

What Went Wrong

Architect hat mostly unworn

I spent a bunch of time trying to get some view components working with HaxePunk. HaxePunk handles origin a little differently than I would think it should work, so I spent a few hours on my View class, getting the Scale, Origin, and Position components to all work together. Great, they now work together.

I did this because my game has orbs in it, and the active orb has a tube spinning around the outside edge of it. You hold the spacebar to shrink the active orb and start growing a new orb on the other side of the tube. After I got the tube spinning at the right radius around the correct center point I then went to add the new orb. This new orb also needs to be placed at spinning radius from the center, so how do I get the true position of the edge of the tube?

Well I can’t. The tube’s actual position is derived inside the view class, so it doesn’t exist at the component level. So now I’d have to either hack into the View objects to get this information (which horrifies my MVC sensibilities), or just calculate the orbital position myself, which I did. Well gosh, that was easy. And now that I’ve done that I can position and rotate the tube using the same logic, so the tube stops scaling along with the size of the active orb, which is a better look I like anyway.

In essence, I looked at just one next thing to do, rather than the broader landscape. Without putting on the architect hat, I spent a few hours going down a rabbit hole I didn’t need or want. On the other hand, I’ve got a cooler View class now.

Failed to take the time to split up complicated classes

I didn’t universally fail this, but I could probably attribute a few hours of wasted energy because of failing to do this early or at all. In particular my firing system is doing several things rather than breaking it up into different systems. See Ash Entity System / What Went Right.

Not putting more of my personality into my game

Friends often tell me I’m funny. Even fine, up-standing strangers — if not calling me that — have in the least called me irreverent. I try not to listen to other categories of people whose job is to be offended by everything. Anyhow – you wouldn’t know these things about me from playing Mass Splitter. Sure, I don’t have to make humor a central aspect of all my games, but a) it’s clearly desirable in a competition where there’s a category for it, b) there are many kinds of humor besides pratfalls and puns that can serve a dramatic cause. Heard of irony? Sarcasm? Deprecation? Pathos? Impudent contempt? Not that Mass Splitter is a deep example of erudition (it’s not), but it’s better for one’s self esteem to believe your personality is a strength. And if it’s not … well, you should work on your personality. Are you trying to tell me I should work on my personality? Stop staring at me like that.

What Went Right

Ash Entity Framework

Richard Lord’s Ash Entity Framework is really good. It’s an entity component system. I used the Haxe port maintained by Dan Korostelev. It was really fun to learn how to use an entity system and put it into practice. For those who don’t know, apparently those folks at AAA game houses have been using these things for years. The idea is to eschew traditional static object hierarchies for a data-driven composition approach. Richard has some great articles about it on his website.

Everyone seems to approach an entity system differently; in Ash the entity is a fairly generic object. You create a new Entity instance, optionally give it a name, add components to it, and add it to the engine. Usually it’s the job of a factory to create the entities with the components you need, but that’s up to you. Components are simply data-holders that you create, with little if no logic in them. Ash components do not need to derive from any base class, any object could be a component. All the behavior for your game goes into the systems you write, derived from the System class and added to the engine instance driving your game. When you call engine.update(time), all your systems execute in the appropriate sequence. Although Ash provides a signaling capability, Richard recommends you use boolean flags or components as markers to indicate when events happen, so that a component event (such as “this changed”) is only responded to by a system when it executes. Using engine.getNodeList(MyNode) a system fetches a list of entities from the engine that are relevant to it. Nodes are classes that contain one or more components; only those entities holding the components you specify will be returned.

I enjoyed using Ash quite a bit and encourage you to look at my source on Github if you’re interested in seeing one possible way of using the library.

Think smaller

Last compo I thought I picked a small idea but apparently it wasn’t small enough because I couldn’t get it done in time. This one was doable — juuuust barely. :)  I tried to get a playable prototype as soon as possible; I would have liked to go to bed on Saturday night with it playable.  Now, that didn’t work.  Pthbth. The prototype wasn’t playable until Sunday afternoon, but imagine if I wasn’t striving for earlier! Suck-sess.

Toolkit practice

I’ve had previous practice with HaxePunk, and I started messing with Ash in a previous game I attempted to complete for the 7-day Roguelike. Even though THAT attempt was a failure, it gave me crucial practice that made this submission possible, and also gave me base code to pick at for Mass Splitter. Of course, more practice would be better, so I shouldn’t wait four months for my next game…

BFXR

This audio tool is available in several forms; the one I used is BFXR. Sooooo convenient. Sure, all your sounds do tend to sound video gamey retro screechy crunchy if you don’t post-process them, but a lot of people go for that, and damn if it isn’t quick to pump out some placeholders.  (… that wind up being the final sounds when you run out of time)

Shut up, good enough, it’s playable

Shut up, I say! It’s good enough. It’s playable. I’m just happy I got out a game. Would I have liked to get those extra things I conceived of? Of course. Over time, with practice, I’ll be able to meet the goals I think I should be capable of. (I’m a damn perfectionist. I’d be faster if I wasn’t always trying some different way of doing things.)

I finished something playable in time that some people actually liked. Next time I’ll do even better.

Tags: Ash, Ash-Haxe, entity system, haXe, haxepunk, ld48, nme

LD27

It’s time for that thing again

It’s compo time! This will be my third compo (four if you count a two-week mini-LD, which you probably don’t, you big meanie). I failed to complete my first LD comp and barely scraped together a working single level for my second LD compo. Right on. The mini-LD was alllllmost fully working, but still key things got dropped proving that I will always code up to the time allotted…

Editor: Sublime Text 2
Language: Haxe 3/OpenFL
Framework: HaxePunk, HaxePunk-AI, Ash-Haxe (ECS)
Visuals: Photoshop, FilterForge
Audio: Audacity, Bfxr, Renoise and some plugins
Version Control: Git … maybe
Base Code: GitHub (older) and zip (latest).

For base code, I’ll be borrowing as needed from my LD26 entry, which is on GitHub, or more likely I’ll be borrowing from this zip. That’s pieces of my fugly source code for reRocket — an attempt to flesh out my LD26 entry Mass Splitter into a fully playable game. I’m still working on it. Of course. The zip has most of the render/input/util frameworky entity-component-system stuff I’ll probably use and regret doing so.

I’m severely sleep deprived at the moment (thanks, insomnia! wooo! you rock!), which I hope to a’right by the time the weekend rolls around or my entry might wind up terribly silly.

Good luck everyone!

Tags: Ash, ECS, haXe, haxepunk, LD #27

10 seconds … 9 … 8 …

Alright, I gotta say it’s not my favorite theme because I think we’re going to see a hundred McPixel clones, but you could all prove me wrong, and then I’ll be all stupidy so and so for saying it. Okay, let’s do this! I’m game. Gonna find that box, think out of it, and then smash it with a wrench and set it on fire. Then gonna grab another box, say from some homeless dude, and burn that box too. I mean I’ll make sure it’s empty first, I’m no murderer. But all boxes must burn! BURN!! Sorry I burned your house, dude. :(

Tags: Ash, ECS, haXe, haxepunk, LD #27

Ok ok ok ok ok ok got it

2.5 hours later I have the idea I want. My girlfriend didn’t like this idea as much as my other one, but I think I’ve worked it out to be simpler to implement. Zoinks! Now I have to spend another hour or less documenting the list of objects I need and how they’ll interact. Then … oh I dunno .. 21 hours to build it?

Make way! I’m busy here! Why am I posting?!!?!!!111111oneone

Comments

h4tch
24. Aug 2013 · 01:35 UTC
You have two girlfriends? :)

Offspring

The game is called Offspring. All I’ve got to show for five hours is an idea document, a description of screens and required assets, and this rules.xml file. I have a pretty good notion of the kinds of interactions I want to happen in this game, but I know the actual rules will need lots of tweaking. So my hope here is by putting all my rules and triggers inside an xml file I can spend Saturday putting in the framework and art, and tweak the hell out of all the rules on Sunday. This is a bit of a game of exploration, especially for the first time player, until you discover all the rules — well, presuming I finish in time. :)

Screen Shot 2013-08-24 at 2.07.03 AM

The XML file driving a rules based system

Tags: Ash, entity system, haXe, haxepunk, LD #27

Comments

BinaryBot
24. Aug 2013 · 04:39 UTC
+1 – Sublime text rocks!

Offspring continues! Beautifully square tile graphics!

Hey, I’ve got a map! It’s got water, and land, and is mostly covered by lava. Operation “Get a Map With Water and Land and Mostly Covered By Lava” is complete! Now it’s time to move onto Operation “Game Must Actually Do Something.”

Hooah! T-32h, people!

Screen Shot 2013-08-24 at 12.44.25 PM

Offspring’s application of theme considered harmful

In Offspring you’re playing father time, or more specifically, father minute. You have six children, each spanning ten seconds. Although the text at times makes it seem like you’re the children and not the father, but uh ah don’t worry about that right now. Look behind you, a bear. Anyhow you can use any one of the six children to make “massive change” in any space of the map, and this change will only take 10 seconds of real time because, you know, you’re time itself and that’s how long everything takes for you.

The game is a sort of planetary evolution simulator. You’re trying to as quickly as possible bring about intelligent life on the planet and get them to launch something into space. You can use one of the six children to, for example, force meteors to crash into the planet so that minerals land upon the ocean surface, or force cells to evolve into algae. It takes about 20+ steps to turn a space of molten lava into something like a spacecraft launching facility, and many changes will only happen due to neighboring spaces. For example, if there is too much lava next to water it will turn into steam, or vice versa.

Your journey is timed, so you’re goal is to reach space as fast as you can. First time out, though, it should feel more like exploration, as you discover the ruleset through trial and error. This all sounds like an interesting idea to me, but we’re approaching the halfway mark! I still have to complete the rules xml file and draw another 17 objects or so, and then after that there’s music, sfx, fx, and remaining bits of polish. So what am I doing still talking to you? What the hell, man?

Tags: Ash, entity system, haXe, haxepunk, LD #27

One benefit of insomnia

An obvious benefit of insomnia is it keeps you working on Ludum Dare well into the night/morning/next day. I think I’ve got the kinks knocked out of my rule system, and I’ve got my static object art done. Next step is to flesh out all of the rules in the XML file (which will probably necessitate further changes to the rule system, gak).

Screen Shot 2013-08-25 at 2.04.57 AM

T-6 Should probably add some sound or some shit

Spending too much time stomping bugs. The last two aren’t even my own bugs. First I was having trouble launching this game in a web browser. It was giving me a security error, telling me my page was trying to communicate with this internet-enabled location: (the same page). The cause turns out to be simple trace() calls. I think Haxe/Flash is trying to write logs to the javascript console  when in a web browser. I don’t know how any of that crap works. The best fix was just to kill all traces in the project file:

<haxeflag name=”–no-traces”/>

The second issue was another Flash issue. The game looks right on the Mac target, but the Flash target isn’t rendering HaxePunk Tilemaps properly.  The problem only comes up when I change a space of the tilemap to a tile that has alpha in it. The resulting screen shows that the canvas is not being erased before rendering the tile, so the alphas just all pile on each other. Since this works properly and expected on the CPP targets I think it’s probably a software rendering issue in HaxePunk. The hack workaround in my GridView:

if(g.eraseBeforeUpdate)
tileMap.clearRect(x, y);
tileMap.setTile(x, y, g.get(x, y));

Offspring is playable now, and you can win although the path there is inscrutable and unapologetically vague. But it IS playable, and I can certainly post spoilers to the entry page. I’m going to spend a couple hours on sound, then I’ll revisit the rules XML. Thrillz! Anyhow here’s a snap shot of a game in progress:

Screen Shot 2013-08-25 at 3.40.04 PM

This shows the game about halfway done. I hit the planet with meteors to leave mineral dust all over, which feeds algae and leads to the formation basic cells. Algae has produced several plants on land, and the seeds from those plants evolved into trees. This isn’t exactly super-scientific folks. You can see by the grove of trees a naked caveman evolved from an herbivore. He’s just one click away from human-dom. The reptiles below are also one step away from becoming carnivores, and then they’ll become humans if they could just get some meat! Later, the nearby trees will help the humans build dwellings, form cities, and eventually launch a spaceship. Into SPACE!

Seriously, you’ll find this game confusing.

Offspring Post-Mortem: So You Want to Make a God Game?

Offspring is a game about guiding a new planet. It starts out inhospitable to life, but through your mad clicking you’ll make it habitable, create life, evolve that life into sentient humans, and encourage those humans into starting the space program. I admit proudly that this game has been called overwhelming, tedious, and complicated!  However it’s also been called interesting, a lot of fun, and a great idea! So I got that going for me.

17811-shot3    17811-shot1  17811-shot0-1  17811-shot2

What Went Right

Reusing a (Semi) Tested Framework

I built a framework using Haxe (language), OpenFL (graphics API), HaxePunk (game API) and Haxe-Ash (entity component framework), and used this framework during the LD26. Since then I’ve used it to make two other games, expanding it along the way. Being familiar and comfortable with your tools is so important. I felt much more comfortable with the time limit this time, and although I did code right up to the wire, the finished product was more fleshed out and polished in a few areas.

Built a Rules Parser/Evaluator

I built a rules parser. I started by defining two types of rules, what happens when you click on a thing, and what happens when certain neighboring conditions are met. I then drew up an XML structure like this:

<object type="steam" audio="steam.wav">
 <click result="clear" message="Cooling some water"/>
 <trigger neighbor="lava" min="0" max="2" result="clear" message="Some steam cools into water"/>
 </object>

The object tag defines an object, which has a corresponding image in the sprite file. When any such object is created in the world, the associated audio file is played.  When an object is clicked upon, a message is given, and usually the object is transformed into something else. And at regular intervals the trigger lines are evaluated. The neighbor attribute defines what neighbor is required for the trigger to go off, in this case lava. The min/max default to 1-8 (orthogonal and diagonal neighbors are checked), but in this case anything up to two lava neighbors will trigger the result. It’s also possible to put a chance=”###” attribute on there,  which applies a randomness to the trigger, once all the other conditions are met.

Although I can now certainly think of numerous ways this format could be improved, coming up with the format quickly and committing to it meant I got a rules parser working quickly and (eventually) correctly. It also meant I could add new objects and rules to the xml file at any time to get new behavior, which was very helpful in testing.

The idea

I freely admit the idea of this game — the promise of it — is better than what I built. :) Correctly balanced, with proper achievements and discovery aids, this could be an awesomely fun game for fans of exploration and god games. Forget the fact that the game I built itself lacks these things (balance, proper achievements, discovery aids, etc), I can see a future game in here. And this game — with all its flaws — came out way better than my expectations for a 48 hour time limit. It’s still fun to play! Sure, it can be inscrutable at times and press your patience, but this is just as much a game for Ludum Dare as it is a possible prototype for a future (and better) game.

What Went Meh

The Theme

I got mixed reviews on the association of the 10 Seconds theme. I felt that everyone and their mother would be making McPixel and WarioWare clones, and everyone else would be implementing 10 second game timers, so I wanted to do something where the connection was more abstract. I figured here you are, Father Time, and you give birth to some time children, each of these ten seconds in duration. Then you send the time children out to the world, and they cause eons of change, growth, and evolution but take in real time 10 seconds. Sounded good to me, I started working on a god game.

One reviewer said the theme was “loosely fit.” I don’t know if I agree with that, but it’s definitely abstract. I mean, if we have to implement a 10 second time-pressure mechanic, then that’s not a theme, that’s a mechanic. I voted down any “theme” that sounded more like a mechanic, including this one, but hey it’s all good. If you don’t work out of your comfort zone you don’t improve.

The Triggering Implementation

The TriggerSystem is responsible for evaluating all triggers. I arbitrarily decided on the following implementation:

1. Read all triggers from all objects and store them in defined order in an array.

2. Every update loop, maintain an accumulator so that it only ran once every 50ms.

3. Execute the current trigger.

4. If the trigger passed the condition, execute the result and keep this the current trigger.

5. Otherwise skip to the next trigger, looping back to the top of the trigger list if needed.

I was concerned about bottlenecking the game so I put in this throttling mechanism that I don’t even know was necessary. It worked more or less, so I can’t complain about that. But it had some consequences.

First, the amount of time in between a trigger executing after its last failed trigger was variable. Different terrain conditions could lead to a trigger running repeatedly while the other triggers stall. This problem was made more acute with the introduction of the chance attribute. How do I put this — I’m a programmer not a mathematician, so I may be using this term wrong, but the standard deviation felt like it was pretty high.

Second, the randomization element was not scaled to time. If a trigger missed it’s 5% chance, it would execute again the next time the trigger came around, which was — when? It depended on the other triggers, whether they triggered or not, leading to an extra degree of uncertainty as to when that rodent was going to finally eat that damn plant. Plus any time I added a new trigger to check, all trigger rates went down because another trigger meant more time until the next eval. Now that I’m thinking about it, I guess I could have stored the last check time of each trigger, and then the chance variable could have some specific per second kind of meaning, like 5% chance of triggering any given second. Ah well.

What Went Wrong

The Rule Set Needed an Overhaul

I did lots of minor rule tweaking, but I never got around to an overhaul of the rules. Essentially whatever “promotion path” I came up at the onset of design is the path that stuck. Rodents and Humans multiplied on their own and all other creatures did not. Humans, trees, herbivores, carnivores, and meteorites decayed and died if clicked on, where others promoted or did nothing. Algae required minerals or would starve and rodents could be eaten by reptiles, but almost everything else survived statically.

The inconsistencies of design contributed a good deal to the frustration of the players. The goal was for them to explore the ruleset by trying different things, but they were not consistently rewarded, and oftentimes punished, so the joy of exploration is dimished. I had two hours left at the end of the day and opted to work on other things, like implementing a “child timespan” control and testing.

I don’t disagree with that decision — I was afraid if I started rewriting the ruleset at that juncture I would have too many errors crop up without enough time to fix them. But I should have started that rewrite on Saturday night instead of putting it off. If I did so, I probably would have adopted some patterns:

• Clicking always promotes and never kills.

• All things have kill conditions. So if  a promotion is too soon you can de-volve to some degree, making it so the user is not punished heavily for trying.

• All lifeforms have favorable conditions for multiplying.

Minor Shit

Everything else that went wrong was minor shit not worth bitching about. Overall, I’m happy with what I built.

Some Water Evaporates Into Steam

For those who’d like to try the game, here’s the entry page:

http://www.ludumdare.com/compo/ludum-dare-27/?action=preview&uid=17811

Be forewarned, you will probably need to read the spoilers and have some patience, or just have lots of patience. :)

For those who want to look at the source or modify the rules set and compile it yourself, it’s all available on GitHub here:

https://github.com/scriptorum/LD27

 

Tags: Ash, entity system, haXe, haxepunk, LD #27, postmortem

LD28

Ludum Dare 28 Entry Announcement – now with 10% more fanfare

Due to the holiday season, I’m not sure if I’ll be able to commit to the entire 48 hours, but I’m in baby, I’m in. Compo.

Editor: Sublime Text 2
Language: Haxe 3/OpenFL
Frameworks: HaxePunk and Ash-Haxe (ECS)
Base code: Flaxen
Visuals: Photoshop, FilterForge
Audio: Audacity, Bfxr, Renoise and some plugins
Version Control: GitHub

Good luck everyone!

Yay. [Disclaimer: 10% more yay than traditional yay.]

Tags: Ash, compo, Flaxen, haXe, haxepunk, LD28