Taking GoHome to the next level ;)

Loved coding this little game - like a lot of guys on the thread here I enjoyed creating a program that works from scratch. The temptation to tweak is always there though (even though its a quick primer on coding techniques), so here are a couple of bits I added to the game:

  • Random starting co-ordinates: after a bit of googling I found the random.range function which allows you to create random positions within a range for both home and player locations (initialised within the start function)
  • Player move score: a simple incrementing count that records the number of moves a player made.
  • Navigational efficiency rating: because we have random start co-ordinates, the players distance to home will vary. the final score should take that into account, so the efficiency rating is initial distance based on vector magnitude divided by the moves taken

code file here: https://drive.google.com/file/d/0B4E_3HpZgGqzYVU5R3BEcXRKd2s/view?usp=sharing

Some future ideas:

  • Escape the wolf bot: use random numbers and path intelligence to spawn an enemy entity that homes in on you. can you get home before it gets you? :wink:
  • Moving castle: every x moves (which could represent 1 day in game time), home moves. (Think Krull!) can you get there before it shifts again …

I know that the above isn’t really helping us move towards VR, so time to crack on with the next section.

Privacy & Terms