Tower Defence Game - Part II

Got a programming project in mind? Tell everyone about it!
User avatar
ChrisB
Posts: 26
Joined: Wed Oct 05, 2011 9:37 pm
Location: Surrey

Tower Defence Game - Part II

Postby ChrisB » Wed Feb 22, 2017 5:46 pm

So - it's been about 18 months since I touched this and have been meaning to get back to it but real life (tm) got in the way. So to carry on from the thread on retrosoftware:

http://www.retrosoftware.co.uk/forum/viewtopic.php?f=19&t=954

I've actually managed to set up a new development environment (old laptop died) and seem to be able to understand and modify my code - which is nothing short of a miracle :).

I've moved almost all game logic into assembler including loading of wave and level files (at the moment there will be 5 levels with 6 waves of up to 63 enemies each). I've also concatenated some of the disparate data files into monolithic chunks of data which should speed up loading and mean I don't hit the 32 file limit of the DFS. Looks like the requirement will be for a standard BBC with double sided disk drive.

Gameplay wise there is now a transition of waves (although not levels) and an indication of the level of your tower. I've also fixed the minor screen corruption from the bullets and display which level/wave you're starting. Also I've noticed that my superb design abilities (blind luck) mean that I can move the sprites in all 4 directions rather than just the three I had previously thought which should improve the level layout. I've also got placeholder content for intro and loader.

Things to do in no particular order:
  • Complete level logic including clearing out storage areas and allocating starting gold
  • Scoring and highscore routine - possibly with a table.
  • Sound - this might be a biggie
  • Possibly reallocating some of my code to different memory areas to be "nicer" - not sure it's necessary.
  • Level design and balance - this will be a considerable amount of work

(Admins - If this thread is in the wrong place please move it)

User avatar
tricky
Posts: 1781
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Tower Defence Game - Part II

Postby tricky » Wed Feb 22, 2017 6:26 pm

Great that your back on it, really looking forward to playing it.

User avatar
ChrisB
Posts: 26
Joined: Wed Oct 05, 2011 9:37 pm
Location: Surrey

Re: Tower Defence Game - Castle Defender

Postby ChrisB » Sun Mar 05, 2017 7:42 pm

Update time - Firstly we have a name - "Castle Defender". I was forced to commit to this because I asked Dethmunk for some graphics which he as very kindly provided - and they are most excellent. Tricky - you've finally got the shading you asked for back in June 2015.

I've now added scoring - with a highscore. I might refine this to give maximum level reached - but not sure at this stage. I have completed the wave and level logic and because it seems I have some space in the code changed the way the waves are loaded (now using file handling) meaning I can keep them as a chunk of data (split per level for convenience.) This now means we're down do a single sided disk as the requirements - it might even fit on a 40 track disk.

Because Dethmunk is so fast with his graphics it has spurred me on to finalise level design - so we now have 4 screens rather than 5. Actual wave design and balance is still to do but some experiments yielded good results. I've moved some memory around that means I'm only using a couple of lower pages &900 - &AFF - should be safe.

Also new is an instructions screen and screen decoration outside of the game itself.

Lastly I've added some sound. Still a bit to do but using the OS routines doesn't seem to be causing performance issues. It definitely feels like a game now - rather than a tech demo.

Current things to do are:
  • Finish off the sound.
  • Identify a bug that double counts some hits
  • Wave design and balance
  • Game over logic - Win vs lose - probably with a pretty graphic - I seem to have space.

It does feel like I'm on the home stretch!

User avatar
fwibbler
Posts: 180
Joined: Thu Jan 13, 2005 10:37 pm
Location: Essex
Contact:

Re: Tower Defence Game - Part II

Postby fwibbler » Sun Mar 12, 2017 4:57 pm

This is great! I'm really looking forward to this.

Are there any plans for an Electron version?
I only ask as I've just bought one and plan to get a MegaGames cartridge for it in due course...
Cheers!

User avatar
ChrisB
Posts: 26
Joined: Wed Oct 05, 2011 9:37 pm
Location: Surrey

Re: Tower Defence Game - Part II

Postby ChrisB » Sun Mar 12, 2017 5:25 pm

It's not a platform that I was ever familiar with BITD - if someone can give me a list of things I'll need to change I might be able to have a look when it's done. However I'd rather concentrate on getting a Beeb version out first.

From things I recall seeing I've got a custom screen mode (256x256)- is that supported ? Also right now I'm working with 3 channel sound (although I'm sure that could be cut down - it's only bleeps and whistles..). It also requires a disk system at the moment.

User avatar
ChrisB
Posts: 26
Joined: Wed Oct 05, 2011 9:37 pm
Location: Surrey

Re: Tower Defence Game - Part II

Postby ChrisB » Sun Mar 12, 2017 8:47 pm

Progress this week:

  • I've now added a Lose and Win message with a nice big piece of text - not quite as I envisaged (the bit manipulation just got the better of me) but I think effective. I've also used this for a lever transition message. It's also been my first foray into self modifying code :shock:
  • The highscore now has a percentage of the game complete and I believe that I now have all of the support code more or less complete.
  • I've fixed the double count bug
  • The sound is nearly complete (I have one "tune" left to do).
  • Dethmunk has finished the graphics off - and they are spectacular. Preview below...

I now have to get into the waves and balance work.

newscreen.png

User avatar
FourthStone
Posts: 369
Joined: Thu Nov 17, 2016 2:29 am
Location: Melbourne, Australia

Re: Tower Defence Game - Part II

Postby FourthStone » Sun Mar 12, 2017 11:09 pm

This looks amazing! Can't wait to play test it :-)

Big fan of Kingdom Rush so if you're ever at a loss for inspiration that series of games pretty much defines the tower defence genre.

"Dodge This!"

User avatar
kieranhj
Posts: 454
Joined: Sat Sep 19, 2015 10:11 pm
Location: Farnham, Surrey, UK

Re: Tower Defence Game - Part II

Postby kieranhj » Mon Mar 13, 2017 6:55 am

Seconded! Great work, this is looking really nice. Can't wait to play it. :)

User avatar
Dethmunk
Posts: 167
Joined: Fri Jul 01, 2016 12:29 pm
Location: Guildford
Contact:

Re: Tower Defence Game - Part II

Postby Dethmunk » Fri Mar 17, 2017 1:08 pm

You're welcome Chris. Enjoyed doing those graphics... Looking forward to the finished game. :D
Image

RobC
Posts: 1648
Joined: Sat Sep 01, 2007 9:41 pm

Re: Tower Defence Game - Part II

Postby RobC » Fri Mar 17, 2017 2:41 pm

What a beautiful game! Really excellent work.

User avatar
ChrisB
Posts: 26
Joined: Wed Oct 05, 2011 9:37 pm
Location: Surrey

Re: Tower Defence Game - Part II

Postby ChrisB » Sun Mar 19, 2017 11:20 pm

Having said that the game is complete I keep finding things to add/fiddle with. The major achievement this week is actually putting together the first level and waves.

Other things I've added/changed.
  • Rationalised the sound calls - I was missing a lot of interrupts when things got hectic.
  • Added a quit function.
  • Added a "speed up" function for when things are going well.
  • Tidied up some of the text effects
  • Completed last "tune"

To do in the rest of the levels and then we might be somewhere near release..... :shock:

User avatar
tricky
Posts: 1781
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Tower Defence Game - Part II

Postby tricky » Sun Mar 19, 2017 11:36 pm

Well done, keep it up.

User avatar
ChrisB
Posts: 26
Joined: Wed Oct 05, 2011 9:37 pm
Location: Surrey

Re: Tower Defence Game - Part II

Postby ChrisB » Sun Apr 02, 2017 5:47 pm

Just a quick note. Still working through levels (always knew this would be time consuming). I am about half way through level 3 (of 4). It's hard to judge the difficulty level - am I just rubbish - or is this level actually impossible ;)

User avatar
pau1ie
Posts: 252
Joined: Thu May 10, 2012 9:48 pm
Location: Bedford

Re: Tower Defence Game - Part II

Postby pau1ie » Tue Apr 04, 2017 2:11 pm

I just tried this on a real BBC Master with datacentre and it works fine, and looks amazing. The only download I could find was from August last year - is that the latest you have posted? From your comments you have done quite a lot since then.

I like it a lot!
I'm working on http://bbcmicro.co.uk

User avatar
ChrisB
Posts: 26
Joined: Wed Oct 05, 2011 9:37 pm
Location: Surrey

Re: Tower Defence Game - Part II

Postby ChrisB » Tue Apr 04, 2017 6:21 pm

Fantastic - thanks for the feedback. It looks a lot better these days.

Yes - that is the last download there will be another one "soon".

User avatar
ChrisB
Posts: 26
Joined: Wed Oct 05, 2011 9:37 pm
Location: Surrey

Re: Tower Defence Game - Part II

Postby ChrisB » Sun Apr 09, 2017 5:36 pm

Having said it was "complete" I've been doing more code this week... :?

When lots of sounds were playing my interrupts were being missed on the vsync causing the screen to flash. I've therefore re-jigged the interrupt code to use a second timer to fire at the end of the screen to reset the palette. This seems to have fixed the problem and the play-field is now rock solid. It might not be the "best" way to do this but it seems to work.

However in doing so I blew my budget for the code at &0900 - &0AFF. Because &B00 seems to cause the emulators in "Master" mode problems I have split the code into two versions - one for the B/B+ and one for the master. They are identical except the master has a block of code at &0E00 to &11FF rather then the BBC B at &0900 to &0CFF. My main code references the "low" code so I have a B and Master version of that. I've added this to the loader the automatically get the right version for the machine you're on.

And finally - since I "gained" two pages I've added a "flash" to the sprites for when they are hit which makes it more obvious what is going on.

I'm also progressing with the levels/waves and am about half way through the final level 4. After that will be a tweaking/rebalancing exercise - but I hope that will be a minor effort.

User avatar
Arcadian
Posts: 2720
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: Tower Defence Game - Part II

Postby Arcadian » Sun Apr 09, 2017 5:43 pm

Really looking forward to seeing the final version of this - is there any chance you could post a little video of the latest build whilst we await the completed release? :)
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk

Image
ABug Leicestershire (17-19 November 2017)

User avatar
ChrisB
Posts: 26
Joined: Wed Oct 05, 2011 9:37 pm
Location: Surrey

Re: Tower Defence Game - Part II

Postby ChrisB » Sun Apr 09, 2017 10:03 pm

Hmm. Seems Beebem under Windows 10 doesn't play nice with video export :(
If you can point me at a good way to capture the video I'll see what I can do...

User avatar
lurkio
Posts: 1048
Joined: Tue Apr 09, 2013 11:30 pm
Location: Doomawangara
Contact:

Re: Tower Defence Game - Part II

Postby lurkio » Sun Apr 09, 2017 10:16 pm

ChrisB wrote:Hmm. Seems Beebem under Windows 10 doesn't play nice with video export :(
If you can point me at a good way to capture the video I'll see what I can do...

Quick and dirty way: film your computer screen with a smartphone!

:?:

User avatar
ChrisB
Posts: 26
Joined: Wed Oct 05, 2011 9:37 pm
Location: Surrey

Re: Tower Defence Game - Part II

Postby ChrisB » Mon Apr 10, 2017 6:10 pm

Ok - Recorded using a screen recorder so not the best quality but here's the first two waves played with deliberate mistakes :D

https://youtu.be/uvvMuyl4jWs

Balance is still being tweaked but I would expect that the first level (five waves) should be reasonably easy to beat.

User avatar
tricky
Posts: 1781
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Tower Defence Game - Part II

Postby tricky » Tue Apr 11, 2017 6:40 am

Looking great.

User avatar
sirmorris
Posts: 701
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: Tower Defence Game - Part II

Postby sirmorris » Tue Apr 11, 2017 6:55 am

Awesome! One of my favourite genres. Great work there.

User avatar
ChrisB
Posts: 26
Joined: Wed Oct 05, 2011 9:37 pm
Location: Surrey

Re: Tower Defence Game - Part II

Postby ChrisB » Fri Apr 14, 2017 2:49 pm

Update time - After some playtesting I discovered it was possible to "spam" a level with a single or few high level towers. Consequently I've re-jigged the costs considerably. As a side to this I've ended up basically doubling all the gold values since larger number are always better :wink:

I've also reduce the score digits by one since I don't think it's possible to get scores that big (will wait to be proved wrong).

I've also finished off the remaining waves which means the game is complete. It looks like it might be time for a release.... :!: [-o<

User avatar
oss003
Posts: 2496
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: Tower Defence Game - Part II

Postby oss003 » Fri Apr 14, 2017 3:21 pm

Great job, nice game .... =D> =D> =D>
Keep up the good work!

Greetings
Kees


Return to “projects”

Who is online

Users browsing this forum: Rich Talbot-Watkins and 1 guest