Author Topic: Open Tower Defense is out!  (Read 6417 times)

0 Members and 1 Guest are viewing this topic.

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 1.122
  • Country: fr
    • urban exploration
  • Liked: 1553
  • Likes Given: 900
Open Tower Defense is out!
« on: 02:04, 28 February 21 »
Final release is out  :-*

full source code with dynamic rebuild available on Rasm-Live !!!

https://rasmlive.amstrad.info/edit/KDAEdKyEPbvQfXGij

kindah organised source code is here: https://github.com/EdouardBERGE/OpenTowerDefense



ingame keys:
T => create Tower

B => create Bash tower

H => create Hurricane tower
S => create Swarn tower
U => upgrade
D => delete
ESC => instant quit

GOTEK/HXC/FlashFloppy USERS => i encourage you to update your firmware if you wanna use the DSK version of the game, or use HFE to avoid firmware bugs
« Last Edit: 18:59, 05 June 21 by roudoudou »
use RASM, the best assembler ever made :p

I will survive

Offline Skunkfish

  • Supporter
  • 6128 Plus
  • *
  • Posts: 707
  • Country: gb
  • Editor of Colour Personal Computing
    • CPCSTORE.CO.UK - Dedicated to the Amstrad CPC
  • Liked: 522
  • Likes Given: 1410
Re: tower defense prototype
« Reply #1 on: 12:51, 28 February 21 »
Ooh, looks interesting! I really enjoyed Defence from Shining, but there's more than enough room for another CPC tower defence game in my life...
An expanding array of hardware available at www.cpcstore.co.uk (and issue 3 of CPC Fanzine!)

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 17.020
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 4090
  • Likes Given: 7400
Re: tower defense prototype
« Reply #2 on: 10:41, 01 March 21 »
Looks really really promising!

oh wait, they change routes? wtf! :D :D

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 1.122
  • Country: fr
    • urban exploration
  • Liked: 1553
  • Likes Given: 900
Re: tower defense prototype
« Reply #3 on: 19:35, 03 March 21 »

I rewrote most of the graphic engine, huge optimisations, refresh is heavily faster (it's was already fast  :P )
The findpath is clever. The shortest path is the goal of the ennemies but it's unpredictable when there is more than one optimal path

There is also new towers so now we have
- simple touret (single hit)
- bash tower (simultaneous hits)
- frost tower (slow down ennemies)
- swarn tower (hit only flying ennemies)



use RASM, the best assembler ever made :p

I will survive

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 17.020
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 4090
  • Likes Given: 7400
Re: tower defense prototype
« Reply #4 on: 10:03, 04 March 21 »
Looks great. I love the HUD font, too!

perhaps the background tile could be simplified a bit, I think it's going to drive some people with astigmatism crazy :D

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 1.122
  • Country: fr
    • urban exploration
  • Liked: 1553
  • Likes Given: 900
Re: tower defense [first public beta!]
« Reply #5 on: 14:54, 05 March 21 »

First public beta released in the very first message of this topic, enjoy!
Need 128K and all gate array banking schemes
6 channels music on playcity / 3 channels music not in this release
Recommended emulator => CPCEC from CNG http://cngsoft.no-ip.org/cpcec.htm (enable playcity in F10 menu)
use RASM, the best assembler ever made :p

I will survive

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.404
  • Country: fr
  • Liked: 1331
  • Likes Given: 195
Re: New tower defense [first public beta!]
« Reply #6 on: 16:32, 05 March 21 »
Mmmh, did you try this on a real CPC?
I played a bit without the Playcity and it seems very cool.
However, I then plugged my PlayCity and the CPC crashes after the "gate array" test (vertical bars filling the screen). I tested my AT2 Teaser which uses the 9 channels of the PlayCity and it works fine.

Now I don't think the PlayCity can make a CPC crash when badly accessed to, so maybe something else?
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 1.122
  • Country: fr
    • urban exploration
  • Liked: 1553
  • Likes Given: 900
Re: New tower defense [first public beta!]
« Reply #7 on: 16:51, 05 March 21 »
I tested it on a real CPC without playcity as i do not own one of this!
The detection code used from basic is
Code: [Select]
org #8000
    di
    xor a
    ld hl,(#66) : ld (sav66+1),hl
    ld hl,(#68) : ld (sav68+1),hl

    ld hl,#01F6    ; or 1
    ld (#66),hl
    ld hl,#45ed ; (inverted) opcodes for retn
    ld (#68),hl

    ; If a Playcity is present, the code generates a NMI then stops the counter.
    ld bc,#F881             ; 3 NOPs CTC channel 1
    ld hl,%00010111*256 + 2 ; 3 NOPs A NMI every 8 NOPs
    out (c),h               ; 4 NOPs
    out (c),l               ; 4 NOPs
    ; not too fast...
    ld d,5 : dec d : jr nz,$-1
    inc hl                  ; 2 NOPs L=3 => Stop CTC channel
    ld d,5 : dec d : jr nz,$-1
    out (c),l
    ld (#FFFF),a
    sav66 ld hl,0 : ld (#66),hl
    sav68 ld hl,0 : ld (#68),hl
    ei
    ret
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 1.122
  • Country: fr
    • urban exploration
  • Liked: 1553
  • Likes Given: 900
Re: New tower defense [first public beta!]
« Reply #8 on: 17:02, 05 March 21 »
Mmmh, did you try this on a real CPC?
I played a bit without the Playcity and it seems very cool.
However, I then plugged my PlayCity and the CPC crashes after the "gate array" test (vertical bars filling the screen). I tested my AT2 Teaser which uses the 9 channels of the PlayCity and it works fine.

Now I don't think the PlayCity can make a CPC crash when badly accessed to, so maybe something else?
ok i see, it's possible the test push and push and push NMI too fast, i will change the rate( and maybe read documentation :D )
use RASM, the best assembler ever made :p

I will survive

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.404
  • Country: fr
  • Liked: 1331
  • Likes Given: 195
Re: New tower defense [first public beta!]
« Reply #9 on: 17:14, 05 March 21 »
The code I used is, I guess, from Syx:

Code: [Select]
;Checks for the PlayCity and displays a message if not present.

CTC_TIM1            EQU #F881       ; Channel 1 (I: Cursor CRTC | O: NMI)
CTC_START_TIMER256  EQU %00110111
CTC_STOP_CHANNEL    EQU %00000011

;Checks whether the PlayCity is here.
;OUT: Carry=PlayCity present.
CheckPlayCity:
ld   A,#C3                  ; JP $xxxx
LD   HL,nmi_interrupt
LD   (#0066),A
LD   (#0067),HL

; Initialize playcity variable to 0
    XOR  A
    LD   (playcity),A

    ; Wait VBlank
    LD   B,$F5
.wait_vbl
    IN   A,(C)
    RRA
    JR   NC,.wait_vbl
   
    ; Initialize CTC timer 1 (NMI generator)
    LD   HL,32                  ; 32 scanlines
    LD   BC,CTC_TIM1
    LD   A,CTC_START_TIMER256
    OUT  (C),A                  ; Enable Timer
    OUT  (C),L                  ; Set new time constant

    ; Extra delay
    LD   IX,33 * 4 - 1          ; Wait 33 scanlines
    CALL wait_scanlines_ix
   
    LD   A,(playcity)
    OR   A
    JR   NZ,playcity_detected
 
    ret
   
playcity_detected
scf
ret


nmi_interrupt
    PUSH BC
    PUSH AF

    ; Change playcity variable
    LD   A,$FF
    LD   (playcity),A

    ; Disable CTC timer 1 (NMI generator)
    LD   BC,CTC_TIM1
    LD   A,CTC_STOP_CHANNEL
    OUT  (C),A                  ; Disable Timer

    POP  AF
    POP  BC
    EI
    RETN


wait_scanlines_ix
    DEFS 5,0                                ; (5)

.loop_wait_scanlines_ix                     
    DEFS 6                                  ; (6)
    DEC  IX                                 ; (3)
    LD   A,IXH                              ; (2)
    OR   IXL                                ; (2)
    JR   NZ,.loop_wait_scanlines_ix         ; (2/3)
                                            ; Total loop --> 16 * (IX - 1) + 15
    RET                                     ; (3)
                                            ; Total Routine --> 64 * SCANLINES
; ---------------------------------------------------------------------------
playcity
    DEFS 1
   
   

As for the game, it's really cool. I managed to get to level 53 in Easy.
The Medium is much harder, you die right from the start if you don't use the right combination. Maybe a little too hard?
As for Hard, mmhhh, I couldn't survive the first wave :). Is it possible? With only one tower?

- Ah, AZERTY "M" key isn't well mapped, you must type ",".
- Is it normal that Space bar freezes the game? Is it a pause? Seems like cheating :).
- Do you think a "accelerate" game key could be done? When the wave is sure to be destroyed, it would be nice to go faster to the next wave.
- The background tile is maybe too hard on the eyes. Maybe a possibility to change it on the fly or at the beginning?
- A "suicide" option (with validation...) could be handy.

Great stuff, well done!
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 1.122
  • Country: fr
    • urban exploration
  • Liked: 1553
  • Likes Given: 900
Re: New tower defense [first public beta!]
« Reply #10 on: 17:43, 05 March 21 »
The code I used is, I guess, from Syx:
As i wanted something simple and AMSDOS compliant, i will forget the detection and the user will choose No music, 3 channel or Playcity

As for the game, it's really cool. I managed to get to level 53 in Easy.
The Medium is much harder, you die right from the start if you don't use the right combination. Maybe a little too hard?As for Hard, mmhhh, I couldn't survive the first wave :) . Is it possible? With only one tower?
If you cannot pass the first wave in hard level, maybe the medium difficulty is perfect  ;D
Just put a tower anywhere between the 2 arrows
- Ah, AZERTY "M" key isn't well mapped, you must type ",".
Amstrad is british, what is Azerty anyway?
- Is it normal that Space bar freezes the game? Is it a pause? Seems like cheating :) .
- Do you think a "accelerate" game key could be done? When the wave is sure to be destroyed, it would be nice to go faster to the next wave.
- The background tile is maybe too hard on the eyes. Maybe a possibility to change it on the fly or at the beginning?
- A "suicide" option (with validation...) could be handy.

Great stuff, well done!
I'm waiting key release to avoid side effect (tooooo many ennemies freed at a time, you will lose for sure) => i may auto-release the key

Sometimes you (we) want to accelerate when there is many things on screen, that's not really possible as the CPU is full
When there is almost nothing on screen, just press spacebar to release ennemies so the answer is no

For suicide, i guess delete some towers is enough but hey, it's possible to manage ESC key ;)

Thank you!
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 1.122
  • Country: fr
    • urban exploration
  • Liked: 1553
  • Likes Given: 900
Re: New tower defense [first public beta!]
« Reply #11 on: 18:05, 05 March 21 »
new beta in the first post
- space auto release- ESC to quit ingame- no moar Playcity detection + No music mode
use RASM, the best assembler ever made :p

I will survive

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.404
  • Country: fr
  • Liked: 1331
  • Likes Given: 195
Re: New tower defense [first public beta!]
« Reply #12 on: 20:51, 05 March 21 »
If you cannot pass the first wave in hard level, maybe the medium difficulty is perfect  ;D

AH! I knew I wasn't crazy. When playing Hard the first time, the wave can be killed with one tower. But if you played any game before, the monsters are tough! It seems starting a new game doesn't reset the monster hit point. I suspect a bug!

The Playcity now works, very nice tune (although maybe a bit short). I'm having quite a lot of fun on the Hard level.

Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.404
  • Country: fr
  • Liked: 1331
  • Likes Given: 195
Re: New tower defense [first public beta!]
« Reply #13 on: 20:52, 05 March 21 »
Oh, do you intend on adding sound effects on the 3rd PSG of the play city? Could be a nice touch.
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.404
  • Country: fr
  • Liked: 1331
  • Likes Given: 195
Re: New tower defense [first public beta!]
« Reply #14 on: 21:16, 05 March 21 »
Wave 39 on Hard! Not so bad :).
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 1.122
  • Country: fr
    • urban exploration
  • Liked: 1553
  • Likes Given: 900
Re: New tower defense [first public beta!]
« Reply #15 on: 21:28, 05 March 21 »
Oh, do you intend on adding sound effects on the 3rd PSG of the play city? Could be a nice touch.
No sound FX because the game has maaaaaaaaaaaaaaaaaaaaaaaaaaannnny hits quickly
Maybe some Bip when you lose a life?
use RASM, the best assembler ever made :p

I will survive

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.404
  • Country: fr
  • Liked: 1331
  • Likes Given: 195
Re: New tower defense [first public beta!]
« Reply #16 on: 21:50, 05 March 21 »
Maybe not shots, but enemy appearing/destroyed, lose life, tile built/removed/upgraded. Add a key to toggle the SFX if the player thinks they're getting annoying. Keep the sfx low volume and it should be great.
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 1.122
  • Country: fr
    • urban exploration
  • Liked: 1553
  • Likes Given: 900
Re: New tower defense [first public beta!]
« Reply #17 on: 22:03, 05 March 21 »
Maybe not shots, but enemy appearing/destroyed, lose life, tile built/removed/upgraded. Add a key to toggle the SFX if the player thinks they're getting annoying. Keep the sfx low volume and it should be great.
good suggestion. That said, i will need SFX and i'm absolutely not expert for that. You have a few minutes for me?  ;D

use RASM, the best assembler ever made :p

I will survive

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.404
  • Country: fr
  • Liked: 1331
  • Likes Given: 195
Re: New tower defense [first public beta!]
« Reply #18 on: 22:05, 05 March 21 »
The musician did a great job, why not ask him to do the SFX too?
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 1.122
  • Country: fr
    • urban exploration
  • Liked: 1553
  • Likes Given: 900
Re: New tower defense [first public beta!]
« Reply #19 on: 22:07, 05 March 21 »
The musician did a great job, why not ask him to do the SFX too?
because that's a completely different job. That's why i made wav2ay tool !
btw: ennemies energy reset will be fixed soon
« Last Edit: 22:11, 05 March 21 by roudoudou »
use RASM, the best assembler ever made :p

I will survive

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.404
  • Country: fr
  • Liked: 1331
  • Likes Given: 195
Re: New tower defense [first public beta!]
« Reply #20 on: 22:11, 05 March 21 »
My suggestion is that he learns how to do it :). He can at least try! Wav2ay is not always the right tool. It can be working for samples, but for short electronic sounds, nothing beats a human to create the SFXs. Come back to me if it doesn't work out.
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 1.122
  • Country: fr
    • urban exploration
  • Liked: 1553
  • Likes Given: 900
Re: New tower defense [public BETA 003]
« Reply #21 on: 00:45, 06 March 21 »
new beta with the important bugfix of ennemy life reset between parties  :picard:
use RASM, the best assembler ever made :p

I will survive

Offline Axelay

  • 6128 Plus
  • ******
  • Posts: 595
  • Country: au
  • Liked: 394
  • Likes Given: 89
Re: New tower defense [public BETA 003]
« Reply #22 on: 07:25, 06 March 21 »
Just gave version 3 a go, nice!  :)


I do like the odd strategy game so this is good to see.  It looks promising though at the moment the game doesn't seem to hold much challenge once you 'work it out' so I hope the extra ideas you talked about adding will help with that.


Out of curiosity, in what way is the game scaling beyond wave 100?


It would be interesting to know a little more about the effects of the upgrades.  The range increases are obvious, but some upgrades don't increase the range and I cant tell if they're firing faster or doing more damage, or just a way of making you pay more to get to the next range increase.


If you'll forgive a couple of small 'requests', I know it's already been mentioned, but I have been finding the ground tile a little distracting, so it would be nice if it could be a little less 'prominent' in some way.


Also, I sometimes found it a bit fiddly to position the cursor because the repeat rate from the first press is high - I often ended up moving two tiles instead of one.  Any chance of a slightly longer delay on the first repeat, or an option to adjust it?

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 1.122
  • Country: fr
    • urban exploration
  • Liked: 1553
  • Likes Given: 900
Re: New tower defense [public BETA 003]
« Reply #23 on: 08:45, 06 March 21 »
Just gave version 3 a go, nice!  :)


I do like the odd strategy game so this is good to see.  It looks promising though at the moment the game doesn't seem to hold much challenge once you 'work it out' so I hope the extra ideas you talked about adding will help with that.


Out of curiosity, in what way is the game scaling beyond wave 100?


It would be interesting to know a little more about the effects of the upgrades.  The range increases are obvious, but some upgrades don't increase the range and I cant tell if they're firing faster or doing more damage, or just a way of making you pay more to get to the next range increase.


If you'll forgive a couple of small 'requests', I know it's already been mentioned, but I have been finding the ground tile a little distracting, so it would be nice if it could be a little less 'prominent' in some way.


Also, I sometimes found it a bit fiddly to position the cursor because the repeat rate from the first press is high - I often ended up moving two tiles instead of one.  Any chance of a slightly longer delay on the first repeat, or an option to adjust it?
thanks
about the cursor it could be nice to use SHIFT+cursor for fast move and cursor for one move
about upgrades and so, there will be a documentation but i'm not specific now because i'm fine tuning difficulty of the game
hard mode is a bit too easy (for confirmed players)
beyond wave 100, ennemy life keeps growing up, in easy mode it's almost impossible to reach wave 250 (it's 16 bits so...)



use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 1.122
  • Country: fr
    • urban exploration
  • Liked: 1553
  • Likes Given: 900
Re: New tower defense [public BETA 003]
« Reply #24 on: 13:11, 06 March 21 »
new tower in progress  ;D

use RASM, the best assembler ever made :p

I will survive