Phone games are for suckers

I’ve always had a notion in the back of my mind to start developing games for iOS/Android.  (Things holding me back are a lack of time and a lack of good, implement-able ideas, but that’s another story.)  Then I read stuff like “Why I’ve Said Goodbye to Mobile in Favor of PC” and “Why an Apple-featured indie dev abandoned iOS in favor of PC” and have second thoughts.  It’s a race to the bottom in terms of money – there are so many games out there for mobile, and users are reluctant to pay more than $1 (if that) unless they get roped in by the whole in-app purchases thing.  Both these devs still think the PC (via Steam) is the real place for small indies to make it, but some astute commenters on the above linked posts feel like it is moving in the same direction…

Then on the other hand, I read this: “How Hourstracker Earns Five Figures a Month.”  That app doesn’t seem like it would be too hard to code for a single developer, plus no art/sound assets needed or at least not to the extent needed for a game.  So what other needs like this are people willing to pay for?  And, which of these needs are not currently being met, at all or by a free alternative?

Air Travel Automation

Just rode the Skylink at DFW and, gazing out the window at a dozen luggage carts, meal carts, fuel trucks and the like, all scurrying to and fro from gate to gate, I see potential for significant automation.  Specifically, I was reminded of Amazon’s factory automation.  Why not automate all those airport vehicles? They would operate in a closed space so not many pedestrians or “rogue” vehicles to worry about; plus they could apply any number of signs or painted patterns to assist computer vision systems.

And we could have UAV’s flying us around in a few years too.

Machine Learning on Coursera

I just finished up the Machine Learning course on Coursera and wanted to jot down some notes.  First off, this was awesome material and great instructor (kind of the founding course of the whole MOOC idea; kind of cool).

My only real complaint is that the programming exercises were a bit too simple — everything was “fill-in-the-blank” Matlab functions.  I don’t think I wrote more than 20 lines of Matlab code for any one assignment.  While the parts I “did” were the meat of the algorithms, I think more of the work in applying this stuff to real problems is in the set-up.  But oh well.  Honestly if the exercises were really difficult I probably wouldn’t have had the time to work on them, and now I have several good examples of the “right” way to tackle certain problems with certain methods.

Oh, I guess I have a second complaint – a lot of the earlier video lectures frequently use an example problem involving detection of cancerous tumors; since I watched the lectures during my lunch break, this kind of turned my stomach. 😉

Anyway, here’s the highlights, according to me:

  • Linear regression – a “supervised” learning algorithm (most of these are), meaning that we have a set of data f(x) = y which we want to use to make predictions about new data.  Establish a linear function of features x, and test all of your training data against a set of weights, theta.  Then use the cost function J to update the weights.  Iterate.  (note that you should use fminunc or similar algorithms rather than cooking up your own gradient descent or similar!)

Lecture2 Single Linear Regression_slide40

 

  • Logistic regression – similar to linear regression, but now the output of interest y are binary 1 or 0, yes or no — the prediction function is now a sigmoid.  To do multi-classification for problems with more than 2 categories, you simply set up a different logistic classifier per category.  Then each one answers “yes, it is in this category” or “no, it is not in this category.”  Well, actually you can think of the answers as probabilities — hopefully one category has a much higher category than all the rest!

Lecture6 Logistic Regression_slide19

  • Neural Networks – oooh, buzzword-y!  Not really as complicated as it seems, however.  Similar to logistic regression, but more suited for nonlinear problems with many features and/or interactions.  You set up a network of multi-input, single-output units (“neurons”), then iterate to find the weights to apply to path.

Lecture9 Neural Network Learning_slide2

  • Support Vector Machines – also similar to logistic regression.  A “large margin” classifier, meaning the boundaries between categories are as optimal as possible.  You pick a set of landmarks, then compute how far features are from the landmarks (the “similarity”).

Lecture12 Support Vector Machines_slide22

  • K-means clustering – the one “unsupervised” learning algorithm in the bunch.  Instead of trying to build a model to predict future outputs based on training data as in the supervised learning case, now we are just trying to group data into buckets.  Randomly select K cluster centroids, find the nearest centroid for each datapoint, then reassign the centroids to the mean of all the closest datapoints.  Repeat.

Lecture13 Clustering_slide22

  • Collaborative filtering – this is like multi-variable linear regression, but we are estimating our features x along with the weights theta.  Depends on having some data to start with … eg Adam, Bob, and Charlie rate movie A and B highly while Dave, Ernie, and Fred rate A and B low but movie C high.  The system infers that A and B belong to a different group from A.  Further, when Greg rates movie A highly, the system infers than he would probably like movie B, too.

Lecture16 Recommender Systems_slide15

 

Programming exercises of note:

  • Optical character recognition.  Given an image of a number, classify it as a digit 0-9.  Done with logistic regression or neural network.
  • Netflix style movie recommender system using collaborative filtering.

Crusader Kings II – Navarra

Crusader Kings II is pretty awesome.  I generally like Paradox titles.  History: started with Europa Universalis (yeah, the first one!) waaaayyy back; didn’t care for it terribly much at the time.  Several years later, I discovered Hearts of Iron II and was hooked.  I have some fun memories of playing Italy to a world power – puppet nations in Russia and then conquering the USA.  Then I played a bunch of  Europa Universalis III.  Something always seemed missing from EU3; and I think it might be the role-playing / human element of Crusader Kings.  Rather than playing a nation (which was an abstract concept not totally developed even during the Middle Ages), you play a member of a feudal dynasty, complete with vassals and a bevy of titles – barons, counts, dukes, and kings (now I kind of know the ordering of those!!!).  When your character dies, you take over as his heir – usually son.

But you can read more about the game elsewhere.  I want to write about my first game.

I started as lowly Navarra, on the Iberian Peninsula.  It’s not quite so lonely; the Jimena dynasty spreads across most of the Catholic areas.  My goals were the Reconquista and … that’s pretty much it.  Learn the game, I guess.  I’ve succeeded by the 1300’s or so; “Spain” is all Catholic and I’m incidentally the most powerful person in the game — you can play anybody when loading a save game and when I click on my ruler, the difficulty factor-bar-thingy doesn’t even register.  Meaning it should be easier than snot to play my nation.  Kind of means it’s not terribly fun anymore … unless I think of some crazy goal like conquering France.  Maybe.  Probably not; would rather document and move on.

Uniting Spain was not too hard.  I used elective succession to hoover up most of my dynasty’s lands – set my heir to be a neighboring king or his heir, then wait … pretty soon you have TWO kingdoms!  Kind of a special case for Spain since the Jimenas have a lot of the lands at the start of the game.  Next I picked off the Muslims one by one, usually striking when they were exhausted and depleted from other wars.  Sicily scored big in the game, gaining Africa from about Tunis over to Morrocco at about the same pace as I drove south and west from the Pyrennees to Gibraltar.

I switched my capital and demesne down to Granada (and Sevilla) because they have room for lots of holdings!  I think I had 3 castles in Granada and 4 in Sevilla; that was the bulk of my demesne and I could raise something like 15k men just from these two counties … lots of upgrades!

Cool thing that happened: I kind of haphazardly joined up the first Crusade (for Jerusalem), lost an army, and then didn’t pay much attention until several years later I was notified that we won, and since I was the largest contributor (!), I got all the spoils!  Hello, kingdom of Jerusalem!  I lost most of it back to the Muslims, but another Crusade won it back for me.  Then, much later, a third Crusade was called for Egypt and I went all in, sending over about 60k troops and winning that kingdom, too (it’s huge!).  I split it up by giving Egyptian duchies to each of my Iberian dukes … made them very happy!  Egypt was kind of a bizarro Spain, in terms of rulers…

Greatest moment though was much earlier – I had a lot of succession wars and rebellions early on.  The AI seems to know when you are weakest and strikes then!!!  Anyway, I was at like -80% warscore and was about to lose half my realm, when the Call to Arms button pops up … my 5 year wait on the HRE alliance was up; would I like to call them to battle?  Uh, ok … accepted!  I chortled as 30k German troops flooded Iberia, waxing my enemies and winning my war.  Priceless.

Couple of screenies: first is my realm (in green) in 1066.  Itty bitty!

Lowly Kingdom of Navarra, 1066
Mighty Castille-Navarra-Jerusalem Empire, 1305

And the spread of religion:

Religion, 1066 (Catholic = white)
Religion, 1305. Reconquista complete! (And then some…courtesy of Sicily)

My “score” (total of prestige and piety for all your rulers) is somewhere around 60k.  I think I got the Reconquista etc a bit earlier than 1305; it’s just by now I realize I don’t really have much else to shoot for and might be boring waiting around til 1452 (?) game end.

Some tips: diplomacy skill is very important for kings – get training by Grey Eminence if possible.  Low Crown Authority seems to work well for large empires — keeps those dukes fighting each other, and not me.  🙂

Irony: I ended up with like 8 kingdoms…but not the Kingdom of Navarra!  I lost it to a sister I married off to England at one point … she came back with a claim to the throne and the might of her son, the King of England, to enforce it!  She and her descendants kept it until I won back all Navarrese territory … but I couldn’t get the Kingdom title as my ruler was not Basque, but Castillian.  Doh!

Next time: start with a small dynasty, and try to spread it as far and wide as possible.  I think I’ll intentionally duplicate my crusade strategy and try to get the County of Jerusalem as my demesne … I believe it has room for 5 castles!!!  I have my eye on a family in Wales … stay tuned.

Glass Bead Game

Recently I read Hermann Hesse’s novel “The Glass Bead Game”.  The game is somewhat central to the storyline, but the mechanics are never fully explained.  It’s very complex though – it’s about making new connections between ideas in beautiful new ways.

I imagined what the glass bead game might look like:

There are thirteen columns on the board, with each column representing a musical note, C to C.  The beads not yet in play are off to the right.  The different colors and different symbols give the bead different play mechanics.  Maybe a bead with the symbol for “War” destroys one adjacent bead of the player’s choice when placed on a black square, for instance.  There could also be different interactions depending on the proximity of different beads – there could be an effect when “Mathematics” is placed beside “Astronomy.”

The bead color may indicate the length of a note that will be placed on the musical staff on the bottom.  An orange bead placed in the “F” column could cause a half-note “F” to appear on the staff, for instance.  Basically the players are creating a song together.  They alternate placing beads on the board, and there are multiple boards (that’s the tabs along the top – there’s three now but could be many, many more) going on in the same game.  Each board has its own independent musical voice – the final result is the song created from the combination of each board’s music staff.

Most people would come up with garbage in such a game – it would be a painful sequence of noise, not music, that would come out of most games.  But in “The Glass Bead Game,” the game is incredibly complex and only mastered after years of study and effort, so I think this would be in keeping with the theme.

Obviously I don’t have all the details worked out yet, and doubt I ever will.  But its been a fun thought / game design experiment.

glassbeadgame.ppt

“Minecraft” Game Design Analysis

I’ve been playing a bit of Minecraft lately.  I remember playing it a long, long time ago at some early Alpha stage and thinking it was some kind of block building game with really crappy graphics.  Not too interesting.  However, the developers kept adding features and now it has become an addictive, amazing phenomenon…with really crappy graphics.  Somehow that doesn’t seem to matter much.

So why is Minecraft so successful?  It has evolved into much more than just a building game.

I think part of the answer is that it incorporates several different game styles.  In the book “Challenges for Game Designers” they call these the “game core.”  Here’s a list (comprehensive, I think, if my notes are correct) of different game cores, and how they are incorporated into Minecraft (specifically the Survival mode):

  • Territorial Acquisition – as the player explores and builds, he claims a bit of the world and makes it safe to live in and carry out other activities.
  • Spatial Reasoning (a la Tetris) – you need a good sense of geometry to build giant structures out of blocks that don’t all look like cubes.  Some people even draft out their creations first in CAD programs.
  • Survival (FPS) – when night falls, the monsters come out.  You need a shelter, or some really great combat skills and a lot of arrows, to survive until dawn.
  • Destruction – to create in Minecraft, first you need to destroy.  The whole world is made up of blocks that can virtually all be collected and placed elsewhere.  Sometimes players like to destroy their creations just for fun (or those of others on multi-player servers – this is called “griefing.”)
  • Building – the main core of Minecraft, if we can call it that.  Giant statues, working CPU’s, digital displays, railroads … lots of creativity out there.
  • Collection – players collect different types of blocks and items.  There are also special, hard-to-obtain items like music CDs that are part of a set.
  • Chase / Evade – kind of similar to Survival.  If you are without shelter and night falls, you had better start evading all those mobs!
These last three may or may not be present, depending on how you look at it:
  • Prediction (a la Rock, Paper, Scissors) – this one is a little bit of a stretch, but predicting where specific minerals can be found deep in the earth could fall under this category.
  • Trading – not a part of the single player game; might be present in multi-player.  Not sure as I haven’t ventured there yet.
  • Race to the End – not really present in the game, unless players want to race themselves.  I have tried to see how far away from my home base I could explore into the unknown in a day’s time…guess that is kind of a race.
So Minecraft contains 7 out of 10 (and maybe all 10) game cores!  I guess it has something for everyone.
The other great thing about Minecraft is its infinite nature.  The game world creates itself as the player explores.  There is no practical end.  Very cool from an indie programming point of view — the developer has spent a lot of time making a really good procedurally generated content system.

The End of America?

6 Dec 2010 – U Wisconsin history professor Alfred W. McCoy presents 4 scenarios whereby the US loses to China by 2025.

22 Jan 2010 – STRATFOR (?) predicts Chinese economic collapse in 2010 and continued US dominance throughout the decade.

29 Dec 2008 – Russian diplomatic scholar Igor Panarin predicted that by 2011 the US would dissolve ala his native Soviet Union.  Apparently he came up with the date in 1998 and stood behind it at least into early 2009.

This is an interesting chart.  Igor’s on there.  Two on there aren’t really scholars so I wouldn’t count them: Moriarty sells gold, and Celente, founder of The Trends Research Institute… well here’s what he has to say (from his website): Gerald Celente, a Close Combat practitioner and black belt trainer, well understands the importance of proacting rather than reacting: “The first rule of Close Combat is to attack the attacker. Action is faster than reaction. The same holds true for the future. You know the future is coming … attack it before it attacks you.” Um, ok….

We Call It Sombrero

He didn’t see the “Bridge of Death” last time.  He didn’t know you had to go around the back.  The front side only gets you about 80%.  Even so, he thought it was pretty difficult.  His legs were perforated by some nasty cholla.  He could have fallen free climbing the Cliff of Death.  He probably should not have gone hiking alone.

Yet he survived.  The view, the solitude, the wind – they were marvelous.

Now, he has found a map.  Next time, he will conquer the peak!