Author Topic: Township - Development Thread  (Read 19865 times)

Son of the King

  • Technikos
    Technical Officer
  • Posts: 3240
  • Karma: 29
  • Awards Awarded for outstanding services to Exilian!
    • View Profile
    • SotK
    • Awards
Township - Development Thread
« on: August 18, 2010, 12:13:16 AM »
Township



Township is a Castle Defence style game with an RTS twist. Starting out life with one villager lost in the wild, you must help him build a village to defend himself from the monsters which stalk the land. As the monsters become more powerful and more common, your small township will need to both have a good income of resources and enough soldiers ready to die for it that it doesn't fall the moment it is discovered. How long can you hold out?

The current version is 0.2, and is available here, along with install instructions and info about how to use it (interaction such as building is all keyboard based in 0.2).

« Last Edit: January 25, 2012, 04:10:45 PM by Son of the King »

Jubal

  • Megadux
    Executive Officer
  • Posts: 22466
  • Karma: 102
  • Awards Awarded for oustanding services to Exilian!
    • View Profile
    • Awards
Re: Township - Development Thread
« Reply #1 on: August 21, 2010, 11:40:36 AM »
That looks fun - I'd love a look when it's useable!
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Son of the King

  • Technikos
    Technical Officer
  • Posts: 3240
  • Karma: 29
  • Awards Awarded for outstanding services to Exilian!
    • View Profile
    • SotK
    • Awards
Re: Township - Development Thread
« Reply #2 on: December 03, 2010, 04:38:34 AM »


Look and see my coursework/soon to not be coursework! Moar tomorrow.
« Last Edit: December 03, 2010, 04:58:17 AM by Son of the King »

Jubal

  • Megadux
    Executive Officer
  • Posts: 22466
  • Karma: 102
  • Awards Awarded for oustanding services to Exilian!
    • View Profile
    • Awards
Re: Township - Development Thread
« Reply #3 on: December 04, 2010, 02:06:53 PM »
Ooooh, I can haz playtest?  :D
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Son of the King

  • Technikos
    Technical Officer
  • Posts: 3240
  • Karma: 29
  • Awards Awarded for outstanding services to Exilian!
    • View Profile
    • SotK
    • Awards
Re: Township - Development Thread
« Reply #4 on: December 04, 2010, 05:23:24 PM »
Once it is actually playable properly as a game (not just a basic shell which is what it is at the moment) for example enemies actually spawning, then of course :) .



As you can see the 'tutorial' is currently just an empty window. Also construction of buildings and training units is keyboard controlled, rather than with a UI window. Enemies do currently spawn, but only 10, and only at the start. Also resources are only semi-implemented (and not displayed anywhere). This is a shortened version of what I want to have changed before I sleep today (except the tutorial, that is less urgent). the bit about it actually being playable as a game wants to be addressed as soon as possible, what with the deadline for the coursework in the next week. However, given that the task was simply to create and application that exhibits dynamic graphics, it currently fits the bill (albeit with about a minute of playability, and the same outcome from every game...), so its not like I will fail if its not playable by then.

I had an amusing moment on Wednesday, when talking to someone on my course about what they were planning on making for the coursework and they replied with exactly the same description I had used to describe mine to my younger brother, minus the setting. That is a cross between an RTS and a Tower Defense game, mainly because I started working 2 and a half weeks before the deadline and didn't even want to think about trying to code a working RTS AI in that time, so settled for building up a base and defending against waves of enemies.


Son of the King

  • Technikos
    Technical Officer
  • Posts: 3240
  • Karma: 29
  • Awards Awarded for outstanding services to Exilian!
    • View Profile
    • SotK
    • Awards
Re: Township - Development Thread
« Reply #5 on: December 07, 2010, 12:19:52 AM »


Fixing a really strange bug that appeared last night, where the game wasn't adding resources correctly, so nothing could be done after the initial resources were used up. I changed gathering speed to test it and made a point of proving it was working today with plenty of villagers.

The deadline for it to be demonstrated is tomorrow in the morning sometime. Hopefully that goes well with no massive bugs deciding to appear for no apparent reason. Its not as balanced as I would like yet (creeps smash through walls too quickly) but its not too bad for about a week's work. Time for a few last proper playtests before bed to ensure there are no massive errors that I have missed...

Son of the King

  • Technikos
    Technical Officer
  • Posts: 3240
  • Karma: 29
  • Awards Awarded for outstanding services to Exilian!
    • View Profile
    • SotK
    • Awards
Re: Township - Development Thread
« Reply #6 on: December 07, 2010, 12:55:12 AM »
Massive bug update:

The nice memory leak which I noticed last night still exists... And I have no clue how to fix it. It seems that when a sprite is 'killed', it is remaining in memory somewhere, since each wave makes the game get slower. A nice Google search suggests that this problem isn't exactly rare...

Other than that it seems to work well!

By the way Jubal, if all goes well (that is if I have time) I'll upload it somewhere tomorrow for you to test if you like?
« Last Edit: December 07, 2010, 12:58:02 AM by Son of the King »

Jubal

  • Megadux
    Executive Officer
  • Posts: 22466
  • Karma: 102
  • Awards Awarded for oustanding services to Exilian!
    • View Profile
    • Awards
Re: Township - Development Thread
« Reply #7 on: December 07, 2010, 07:07:23 PM »
Yeah, sure! :)
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Son of the King

  • Technikos
    Technical Officer
  • Posts: 3240
  • Karma: 29
  • Awards Awarded for outstanding services to Exilian!
    • View Profile
    • SotK
    • Awards
Re: Township - Development Thread
« Reply #8 on: January 16, 2011, 07:12:09 AM »
A long time too late, but here it is. Still needs actual ui implementing for building, and pathfinding can be laggy and buggy over longer paths. There is something of an installation guide on the webpage below, along with a download link. Also creep movement leaves a lot to be desired since I changed it, it seems they aren't choosing target tiles correctly.

http://sotk.co.uk/township.html (best viewed in Chrome)

Also,

FOR BUILDINGS:

To build, select a villager then press

f = campfire (used for recruiting villagers)
w = wall (defensive structure)
p = farm plot (used to gather food)
h = house (used to provide space for 5 soldiers)
a = armoury (right click with a villager selected to arm/disarm)

To gather resources, left click a villager(s) and right click a farm plot, tree or stone outcrop to gather.

Armed villagers are stronger than unarmed villagers. Unarmed villagers will be slaughtered by creeps.

I'll update the .zip when I have fixed some of the pretty big problems, for example the creep movement.

Each house you build allows you to have 5 extra soldiers/armed villagers.

You begin with a limit of 5 armed villagers.

Ignore score. It has a mind of its own right now.

Oh and shift+left click to select multiple units.

Good luck getting it to work. The creep movement is really dodgy, as the pathfinding of your units can be sometimes. Villagers currently start scattered around the map. If they are under the ui, you can select them through it, or drag the ui out of the way like you would drag a program window.

If anyone fancies drawing a better house I would not complain ;) .

Jubal

  • Megadux
    Executive Officer
  • Posts: 22466
  • Karma: 102
  • Awards Awarded for oustanding services to Exilian!
    • View Profile
    • Awards
Re: Township - Development Thread
« Reply #9 on: January 16, 2011, 10:46:12 AM »
Imma thinking this should be moved into games since it is one.

Just updating my Python installation and getting pygame, then I'll take a look.
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Jubal

  • Megadux
    Executive Officer
  • Posts: 22466
  • Karma: 102
  • Awards Awarded for oustanding services to Exilian!
    • View Profile
    • Awards
Re: Township - Development Thread
« Reply #10 on: January 16, 2011, 11:07:24 AM »
Ok, I can't work out how to train new villagers...

The building and resource gathering all works great, so that's good. Are you going to keep the enemies as red creeps, or are you going to make them something more obvious?

Apart from that, once the pathfinding's a bit better it'll be awesome.
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Jubal

  • Megadux
    Executive Officer
  • Posts: 22466
  • Karma: 102
  • Awards Awarded for oustanding services to Exilian!
    • View Profile
    • Awards
Re: Township - Development Thread
« Reply #11 on: January 16, 2011, 11:22:31 AM »
OK, worked out how to train villagers; now I'm doing well enough to outnumber the creeps two to one,  :P
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Silver Wolf

  • Megas Domestikos
    Voting Member
  • Posts: 4579
  • Karma: 40
    • View Profile
    • Awards
Re: Township - Development Thread
« Reply #12 on: January 16, 2011, 03:41:07 PM »
How do I start the game ?
"Less of a young professional - more of an ancient amateur. But frankly, I'm an absolute dream."

Jubal

  • Megadux
    Executive Officer
  • Posts: 22466
  • Karma: 102
  • Awards Awarded for oustanding services to Exilian!
    • View Profile
    • Awards
Re: Township - Development Thread
« Reply #13 on: January 16, 2011, 04:25:50 PM »
It's dgp.py.  :)
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Son of the King

  • Technikos
    Technical Officer
  • Posts: 3240
  • Karma: 29
  • Awards Awarded for outstanding services to Exilian!
    • View Profile
    • SotK
    • Awards
Re: Township - Development Thread
« Reply #14 on: January 16, 2011, 04:57:20 PM »
Thanks for the feedback :) . I will probably change the creeps into something more obvious at some point (my eventual aim is to make a fully RTS game). There are also some green creeps that spawn which are a bad design choice due to them being almost invisible.

As for the pathfinding, that was me experimenting yesterday trying to reduce its lagginess that made it become buggy. I don't even know why... It was working fine before that, just took a time to calculate.

Today's jobs are to try and fix pathfinding somewhat, and if I get it working a little less laggy and buggy then I will try and change it from Dijkstra's algorithm to A* (A* is a better/faster algorithm).


Sorry about forgetting to mention how to train villagers. For future reference, press t with a fire selected.