Topdog

10 Mar 2012

This is my 2012 7-Day Roguelike entry.

You are Topdog, The Puppy has been kidnapped by the Fat Cat Mafioso. You travel from yard to yard, searching for the crafty Cats holding her hostage. Along the way you meet other animals, and perhaps a bone or two.

bone

Made with Python with SDL and Libtcod.

The Idea: Minimalism and fun, is the primary goal. Replayability is a given, with a low learning curve. To achive this, some classic RL mechanics are simplified, and complimentary Role Playing elements are introduced:

Timeline

How To Play

Get the source code

Python comes with most Linuxes. For Windows you have to download Python.

Playing

Use the number keypad to move around. Walk over toys to pick them up. Press 'd' to drink water when thirsty. Move to the next level/yard by moving onto a hole in the fence.

Day 1: Specification

12 Mar 2012

The game spec is going fine, I expect many changes albeit most of it is good to go.

You can read the entire spec online on github.

You can move around, and there are blocking tiles, a garden fence with holes in it. Some shrubs, trees and water too. These are placed for testing tile interaction only, their final placement will be better.

Game state machine and some helper functions are also in. Ahead of schedule is nice :-)

I also pushed the source to GitHub, see the "Source" Link in my sidebar.

Here is a shot of my desktop during development (290kb).

The game window:

game window image

Kittens and Drink

13 Mar 2012

kitten image

Colors, fonts and tasty messages.

13 Mar 2012

Added some fluff while fleshing out the classes, the commit summary speaks to us in a robot voice:

20842c9 add terminal 16x16 font (nice and large for hi res)
b41e65a spawn pools more away from fences. fiddled with colors. I should probably commit smaller changes more often.
20235e6 Allow moving through holes to other yards.
2622bee changed the screen size, changed colors. added blocking messages.
71eb42b switched to terminal font to support ascii symbols.

The new fontmap gives us nice ASCII characters like spades and wotnots, also see some colorful message highlighting:

color matching image

Started that level in the middle of the Pool, oops.

This is the first time I'm using GIT source control, my HG knowledge slots in well so using it is a breeze.

Times like these you appreciate VIM syntax highlighting :D

vi syntax image

ASCII Maps

13 Mar 2012

We can now load map templates from ASCII :-)

See my latest code commits on GitHub octocat

ascii-maps image

Python rocks for dynamic code calling, it is the the Dog's Bark ;D

We can make a dictionary of map characters, and perform a lookup against it. Matching entries are function references (gettar, getpuddle):

tile_lookup = {
            CHAR_TAR: get_tar
            ,CHAR_WATER: get_puddle
        }
            

We can easily call these functions, inline and without much flak:

if ascii_map_char in tile_lookup:
gamemap[x][y] = tile_lookup[ ascii_map_char ]()
            

Day 3: The unseen darkness and doggy toys

14 Mar 2012

This update is brought to you by Dynamically loaded maps, FOV (Field Of Vision), colorful flowers, and inventory.

You can pick up doggy toys by moving over them. Since you carry in your mouth, you drop whatever you were carrying before each time. You can carry items across levels. Dogs really do this... no really.

More tweaking to colors, for flowers bushes and trees. The heart item here is a doggy toy. All toys show as different colored hearts.

colorful screen

FOV determines what you can see via line-of-sight. Here you see where I highlighted (in pink) where the tree blocks our sight, the tiles beyond it are greyed out.

field of vision screen

Maps can now load from text files. I found an awesome ASCII Paint app to draw maps with. They are essentially text files, 36x36 characters in size. B's get converted to bricks, b's to bushes, f's to flowers, t's to trees, ~'s to water, and #'s to fences.

map image

And here is editing the map:

map editor

Don't worry he don't bite, much.

15 Mar 2012

Day 4 was in the zone, like being with Mercer, but Do Androids Dream of Electric Sheep? Sit down, have a doggy biscuit...

bone

Changes

glossary: NPC is a Non Player Character. All the other animals in game, whether they are friend or foe.

Simplified the UI, a lot! No more superfluous details on screen, those will go into their own screen. You only see what is necessary to win:

new ui image

We have interactive NPC's. Some are friendly, others hostile. They can have arbitrary amount of dialogue, run away from you, hunt you down, follow you around and give you quests.

mouse dialogue

We have NPC's that have various behavior models: skittish, neutral, friendly, hunting. They also have interaction models, hostile NPC's can take initiative and attack you first, while friendly's start a conversation or give you quests.

The Hunting movement AI is pretty crafty: It uses A* path finding to follow you. If it loses sight of you, it remembers where it saw you last, and heads there to search you out. This could be improved on by implementing scent trails (for real hunters).

Python is amazing for dynamic code structures. Up to now it was a lot of class models for Inheritance and Polymorphism. Functional languages give us Composition, something I can see will work well in business rule engines.

Enough rambling, we need a working quest engine, hint and scent trails, and like-to-have mouse support.

Last Day: Story lines and fighting monkeys

17 March 2012

There is under 10 hours left, the core mechanics of the quest engine and game interactions is as much done as I have time for. All that remains is fleshing out the story line, and coding it in. Been going for 14 hours now, taking a breaker to be fresh-brained to write creative story lines.

What the playing screen looks like now:

gameplay screen

Dialogue screens have matching pictures of the animals you talk to:

dialogue

They can chirp you before a fight:

monkey business

The stats screen shows your progress, and any quests you are busy with:

game stats screen

I won't bore you with any commit logs this time, you can read them online at your leisure.

WOOF!

Top Dog Release and cutesy animals

22 Mar 2012

It is past the comp submission date, so all changes from here on are post-challenge polish. Hey, even chickens need lipstick...

Notably:

The game menu

The game menu

A gameplay screen

A gameplay screen

An in-game dialogue

An in-game dialogue

The help screen

The help screen

Another gameplay screen

Another gameplay screen