ES & Complexity

Previously, I’ve posted a meta-formula on complexity in video games designed to determine how long a game takes to make.  The idea was nice, but the premise was flawed.

Why, you say?

Because each element in a game has to communicate with other elements.  Using standard Object Oriented Programming (OOP), the reigning paradigm of computer science, that means each element has to be wired to many other elements in ways that are increasingly arcane and convoluted.

The result?  Well, suppose that e = the number of elements in a game, and c = the average complexity of those elements.  One would predict, given my former formula, that the total (t) amount of complexity of a project (and thus the time spent in it) could be expressed as:

t = ec

But Starfighter X has taught me that because of the way elements have to be wired together, the actual formula is closer to:

t = ec^(1+(w/e))

Where w is the average number of elements to which a given element must be wired.

Enter Entity Systems

There is an alternative paradim to OOP that is potentially, in many ways, superior for game development, called Entity Systems (ES).  The advantage of ES is that it removes the wiring.  The result (in theory) is that the total complexity is now closer to:

t = ec + c

And thus linear instead of exponential.

I go more into how this works on Seed of Awesome, for the code-minded.

Why You Care

Starfighter X has proven a bitch to finalize.  I thought two or three lines of code would do it.  Instead, each new element I have needed to add has taken a day.  Which means, as the only day I have open is Monday, Mondays have become ‘Finish Starfighter X Day’.

In addition, the game needs an extra level of polish before I can release it without embarrassment.

Since mi padre has given me an App-Hub subscription for my birthday, I would like to have Starfighter X up for peer-review by his birthday.  And it is possible that, because ES is linear and OOP is exponential, it would actually be faster to build an ES and copy-paste the functions from OOP Starfighter X into it, then add in the missing elements, than to simply add in the missing elements.

Today’s project is simply that:  in the couple of hours I have before bed, transfer as much Starfighter X into an ES as possible.  If this process indicates that my theory is right, then on Monday I shall continue.  If not, I shall go back to grinding away at it.

NaNo Post Mortem

The schedule my NaNo theory was predicated upon wasn’t implemented until December.  Go figure.

My sleep schedule prevented me from capitalizing on Wednesdays and Thursdays the way the theory claimed.

Mondays were eaten alive by planning sessions for my pet Sword-lover’s bachelor party (he’s not marrying a sword, though…)

In the last couple of weeks, I did the math and discovered I could not finish NaNo.  The question, at that point, became what should I do?  I never formally answered it, but did spend the rest of the time tinkering with the plot and trying to defuse fights between three of my friends.

In January, I begin work on Seed 2: Starfighter XR, unless the company chooses differently.  That gives me the following projects and potential projects:

  • Finish polishing Starfighter X.  Sounds, music, swappable controllers on the menus (already done) that lock in when you start a game (not done — only controller one has control); and prophesy art.
  • A family Christmas newsletter, with some wedding-related stuff, to send out.
  • Prepare a lecture/thingy discussing my discoveries via reading and Starfighter X, for the company.
  • Possibly get started on Starfighter XR (have a playable demo of some of the features.

Of late, at work, I’ve hit a breakthrough when doodling/writing on the topic of Spaz the Dragon, our Sonic the Hedgehog spoof for planned videogame cartoon Gritty Reboot.  (A machinima using a homebrew engine in which spoofs of popular videogame characters get stuck in a reality show).  And I really, really want to try and build Spaz as a game, or at least get some features implemented.

Problems include:  XR is more doable.  Spaz will take at least a year to make, probably closer to two.  Platformers are overrepresented on the Indie Market, and we need to differentiate ourselves.  Etc.  Also, making a spoof of what is probably the most distinctive yet under-cloned platformer in existence will be difficult from a legal standpoint — specifically, it will be hard work to ensure that it is spoofy enough to qualify as Fair Use.  Not in Gritty Reboot — the nature of the story ensure that we are good to go there — but in the standalone games, yes.

 

The big, important deals for the company go back to basic Econ, 101:  the law of supply and demand.  In order to make it as a company, we need to create games that are in demand.  Frankly, I think the best option for us is to work on making mobile RPGs — phone games with the depth of story and gameplay of, say, Chrono Trigger.  It’s a hugely underrepresented genre with, I think, an eager market.  Starfighter XR, on the other hand, has the advantages of I know I can do it, and it will be interesting enough in and of itself to make it worthwhile at least as a portfolio piece.  If we can get it into Dream/Build/Play, and do well, it can lay a foundation for the company.

sigh…

Spaz is pretty much a guaranteed no-go.

Seed Post-Mortum Part 1: Repristination

The motivations and pressures underlying the Seed project (and thus, Starfighter X) remain.  But I am floundering again.  I have some possible insight into this.

I’ve been reading a book lately called The Way We’re Working Isn’t Working, by authors who claim an impressive track record with regard to increasing performance in various workplaces.  Their claims have some confluence with experiences I had during the creation of Starfighter X.

The founding idea of the book is that the modern workplace is designed around the concept of maintaining a constant level of output over time, and hitting it harder, faster, and longer, whereas in their studied opinion, humans are designed for a more rythmic approach:  to spend about ninety minutes taking it to the limit, and then an hour or so recovering completely.  These pulses from opposite states of maximum intensity to maximum rest, in their lights, should be applied physically, in work, in play, spiritually, and so forth.

With Starfighter X, I began work on the project after roughly three days of brainstorming, documenting, and researching, which in turn followed a six-day camping trip.  The camping trip followed a pattern similar to the optimal pattern recommended in TWWWIW: naps whenever I felt like it, a predominance of social distance combined with periods of more intense social interaction, frequent mild exercise punctuated by the naps and intense fencing sessions lasting upwards of a half-hour, time with my wife…

Coming off the trip, I was in far better physical and emotional shape than usual, and in the following weeks, I continued a slowly unraveling habit of exercise (first once a day, then twice a week, then once a week, then once every other week), and I threw myself headfirst, full-speed into my work and accomplished as I have accomplished only twice in my life:  When I made ‘Dozer, and when I wrote my novel.

Now that I think of it, when I wrote my novel, I was home from my first year out of town at school.  I had spent two weeks touring with a choir, a day or two sleeping on a friend’s floor, and up to a week at home before getting my old job at the theater back for the summer.  I spent most of my week biking too and from work from an uncle’s house, returning to the farm for the three-day weekends that the theater afforded (in return for 11-hour shifts).  So exercise and a preceding rejuvenation were factors there as well.

There were other factors I wish to consider before I make my next plan of action, of course, but as a starting point, let us consider incorporating rejuvenating periods into my life-cycle.  It has some Biblical precedent — Jesus took breaks in the wilderness (though they weren’t necessarily vacationsthere was fasting involved), and the Bible mandates a weekly break — and if it is true that rejuvenating periods are necessary to achievement, at least for me, then even if continuous work is in-and-of-itself the nobler path, I owe it to my (potentially burgeoning) family to at least examine the functional path and discover whether the exchange is worthwhile.  That is, I should weigh the possible nobility of diligence as expressed through continuous work against the known nobility of provision.

There are other factors — sleep and exercise come to mind, but for the sake of this post, let us consider repristination alone.

Perhaps it is sufficient, on the larger scale, to set aside, say, a three-day, no-contact, change-of-scenery weekend per month, and a larger rejuvenation period on, say, a tri-monthly basis.  My employer, which for the sake of discussion we shall call Le Zarci, furnishes me with ten days of paid vacation (fifteen days starting next year if I’m not mistaken.  Le Zarci is unfairly maligned).  Three or four are needed for the annual camping trip, leaving me six to play with.

Let’s say I just take the extra day per month without pay.  I think I can eat the cost at present.  I will consider the camping trip as a rejuv.  That gives me three remaining quarters to play with.  Taking a pay-free day every month gives me a five-day quarterly break.

‘Cept I doubt that last quarter (Containing October/November/December) is liable to see a five-day approved.  But we’ll save the spare time, maybe make a larger break later.  A refocusing in January or February, maybe for my birthday.

The purpose of these rejuvenation is not slackage, but to refocus, to gather my energy.  If I get wheels, I suspect micro-camping trips to be common.

Anyhow, I’ll talk it over with my wife, and we’ll see how it goes.

Next Part 2:  Sleep, and then Exercise.

Mech Game redux.

This is a brainstorm.

I have stuck a link collection to the top of my blog because I find it simultaneously inspiring and sobering with regard to game development.

It also makes me think of a couple of the intrinsic problems with the mech game.

First is that I want to be a successful developer.  By successful, I mean able to feed, cloth, and shelter my family using revenue generated from my games.  I would also prefer that my games be fun.

In the first Zeboyd link, Robert Boyd says

Focus on what the big publishers are missing

“Since we can’t compete directly against huge companies since they have far more resources than we have, figure out what they’re not doing that’s within our reach,” states the Zeboyd designer.

This came down to a few different pillars of focus for the Zeboyd team. “In our case, that meant a focus on comedy (despite the success of the Portal series, there are far too few funny games being released these days), fast-pacing (most RPGs are huge epics that take a long time to get to the “good parts”), and accessibility without sacrificing depth (again, most RPGs these days have a very high learning curve but if you look at most classic 16-bit RPGs, they were very easy to get into).”

Now, there is, in fact, not a huge number of mech games of any sort being released.  There is Airmech, which does everything our game would do and more… but never mind that.  The thing is, our game, at this point, is a twin stick shooter, like Zombies.  Unlike Zombies, it is meant to be competetive rather than cooperative.  And that brings me to my next bit.

How is the game even a game?

Consider:  I have a twin-stick shooter with multiple weapons.  Against hordes of undead, that makes sense.  I could have a spread shot that will take out multiple zombies at once, or a laser that mows down a line, or all sorts of things.  But in a multiplayer competitive game, the weapons have to balance with one-another, and the only real gameplay mode (especially if you have slow, hulking tanks we’ve planned) is to lumber along while keeping your weapon aimed at your foe.

So far, the game doesn’t rise to the level of Rock-Paper-Scissors.  It is barely a game.

Another factor is the principle brought up in the Mechanics as Metaphor videos.  Let me put it thus:

  • Journey is a journey, very much in the form of a five-act play, with a pair of dark moments leading to increasingly glorious climaxes.  The mechanic is the character’s mobility, which increases in good moments and decreases in bad.  You feel the progress of your journey in how high you can jump, how fast you can run, how long you can fly.  In the good moments, you are surfing down a wave of sand, in the bad you are dodging from cover to cover, fighting strong winds, and trudging ever more slowly and painfully through the snow.
  • Halo is a fight against impossible odds.  The desperation is reflected in mode that shows up in the last couple of games:  firefight mode, where you survive waves of enemies.  It is also reflected in your need in all the games to defend the marines you have with your character.  Finally, it is reflected by the core mechanic of battlefield supply:  you advance by taking your enemies weapons and using them.  You move from place of momentary respite to swarms of moving foes.
  • Bioshock is about choice and will.  The story revolves around whether your character is free to do as he wishes (and thus, the two games alternatively explore extreme capitalism and extreme communism), the weapons and powers are customizable, and the plot changes based on whether you choose to act in your own interest, or make sacrifices for the sake of others.  Fable also does this, but very ham-handedly.
  • Sonic CD and Sonic 1, 2, 3&Knuckles are about motion and speed.  You try to find the quickest of multiple paths, effectively playing a pinball.  Sonic Adventure and SA2 also captured this fairly well.  Others have not.
  • Metroid is about exploration.  Your character is lost and alone, sneaking through the forgotten caverns surrounding an enemy base.
  • The Dishwasher games are about violence.  You have pointy things, you use them to smash stuff in clever and explosive ways.  The movement system, which uses teleportation, is designed to get out of the way of the violence, allowing you to simply smash things.
  • Rain Slick Precipice of Darkness III takes the classic story-telling genre, the JRPG, and uses it to tell jokes.  The classes and combat are also jokes (with classes like Dinomancer that allow you to turn into dinosaurs), and the combat system is built to force you to move fast, allowing you to get to the story sooner.  Also, it’s easy to get into, but geared around allowing you to use your special powers instead of forcing you to ration them like a traditional JRPG, which means instead of hitting monsters with your fists all the time, you spend turns summoning swarms of rats to make your enemies into hobos.
  • Portal takes a non-standard mechanic (making portals) and sets it in a psychotic testing facility run by a deranged robot (complete with messages in blood by a former tester, hidden behind panels).

In each of these games, the story, mechanics, and art crystallizes in a single theme.  AAA games can get away with diluting their themes, like most shooters, most platformers, and so on, but an indie game, to succeed, really needs this kind of thematic purity, especially at the level you see in Journey, Bioshock, Portal, and the Dishwasher.

So the questions before me (well, before us, really), are:

  • How can we make this more of a game and less of a stick-aiming exercise?
  • What should the theme and feel of the game be?  Can the answer to that question be used to answer the previous one?
  • How can we offer the players meaningful choices?
  • How can I accomplish these things with my current skill set (preferably in a couple of weeks.  As if.)?

Starfighter X is not a great example of answering these questions, but it does have a few points in its favor.  Its feel is retro, and so has a text and cube-based interface, movement and shooting that is slow (as opposed to most shooters today, which are frenetic), and a decision-making process that involves weighing time and accuracy bonuses against your need to heal up from attacks and your enemies’ ability to also heal.  Like Space Invaders, the drama comes not from your attempts to find the safe spot in a screen full of pullets, but your decision of when to skip out and take a potshot.

Well, more or less.  Starfighter X is not anywhere near as polished.

Greg’s original concept was that we should just throw this game together in a week or two, get everyone behind a project.  But now that I know a single screen worth of gameplay is going to eat a couple of months (if I get a function character on screen today, I can expect to finish around Halloween at best, Thanksgiving if I’m able to keep things tight).  So where is the juncture of viability as a company project and suitability for the skills and talents of the participants?  To quote Derek Yu, from Finishing a Game:

I’ve found that there are three types of games that pique my interest: games I want to make, games I want to have made, and games I’m good at making.

Games I want to make are games where the process itself seems really fun. Maybe the mechanic seems really fun to experiment with, or maybe there’s a character I really want to animate.

Games I want to have made are games where I’m more interested in the result than in getting there. Maybe it’s a “no-limits” concept (“OMG, GTA meets Final Fantasy meets Starcraft meets…”) or just a really neat idea that’s not necessarily any fun to implement.

Games I’m good at making are games that are suited to my personality and which I have experience in making. Perhaps there’s a certain genre that you naturally gravitate towards and which you understand the rhythm and flow of very well.

In my opinion, the ideas with the most potential (to be finished, at least) fall into all three categories and also satisfy the requirement “I have the time and resources to actually make this”.

My big question, then, is this:  How can I force the mech game into these criteria, preferably while also making it a game with a crystal-clear feel?

I think one option is to have a single-player mode that pits the player not against mecha, but against creatures of some sort.  This sort of justifies the stick-shooter approach.  [chuckle] Of course, with the result that the initially desired multiplayer might seem tacked-on rather than central.

Another thing is that if the mech is slow, the weapons systems should also be slow, to make maneuvering into position a possibility.  Also, having hit locations that make maneuvering meaningful is also a strong possibility.

Nnng.  I kind of want to go back to the game with the psychotic interviewer dropping you on a flying island full of monsters…

Slow moving tanky things reminds me of pirates and ships and broadsides and stuff — naval warfare.  Robot-smashing, on the other hand, has always gone well with cowboys to me.  On the other other hand, Battletech works well with its hexes and stuff (mechs walking on a giant hex-map?  Could be done.  Battletech isn’t the only hexmap war game).

Stuck

This ‘Just make the mech game’ business is stopping at the starting line.  I try, and try, and it’s not going.  Brain cudgel…

There is nothing that is less complex that I desire to make.  I got through Starfighter X, which has

  • Vague AI
  • Flexible singleton-based particle system
  • Shooting and getting shot.

Mech Game simplified has:

  • Less vague AI.
  • Singleton based particle system.
  • Shooting and getting shot.
  • Background graphics.
  • Choosing between different weapons.

I’m choking at step one.  I have built a good structure made out of re-organized scraps of Starfighter X.  Now I just need to push forward.  Step one:  put mech on screen.  Step two:  make mech able to move.  Shouldn’t be hard.  Did it in two minutes with Starfighter X, and I lost a week gleefully coding shaders.

Maybe it’s the fact that this is [redacted]’s project more than it is mine.  I dunno.  But, remember the last post?  Feelings?  Yeah.  Now I’m stuck on feelings.

But game-making is an intrinsically artistic pursuit.  If there is no vision, there is no starting point.  But Starfighter X wasn’t exactly visionary (except for the vision of just finishing a damned game).  Argh.

Hm.

If I see this game, which I do not love, through, I will finish the games I do love.  If I do not see this game, which is so simple, through, how can I finish the more complicated games I do love?

Back to work.

 

Edit:  this is bull.  I’m doing a twinstick.  If I want to headbang through a follow cam instead of a universal 3rd person view, I can do that later.  I need a quick victory pronto.

Making a Mech Game

I can do something now.  I will do something now.  And then I will be done with this mess.

8/7

  • Made a copy of my Pendra project.
  • Renamed it.
  • Built a hierarchy of gamestates:  an overall state for the game in motion, and individual states for each of four players.
  • Taught player states to stay in their own viewport (something that can’t be tested just yet, but… eh.)