Shop OBEX P1 Docs P2 Docs Learn Events
Defender - Page 4 — Parallax Forums

Defender

124

Comments

  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-12-08 22:28
    I chose left/right to change direction because it's a left hand operation on the orininal machine. As you say Eric also has the benefit (with combined thrust) that Hybrid users on an Atari stick can have basic control and fire. No Smartbomb or Hyperspace , but at least it's playable.

    To get better control for Hybrid, I tried really hard to get keyboard control in, but it proved impossible to fit the driver in on top of everything else. Though it remains an option if you sacrifice sound.

    I keep looking in ebay for a Master System controller, and when I get one I'll sort out the buttons for that.

    It's certainly worth having a play to see if we can get different functions out of BB and possibly AA on the Hydra.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Help to build the Propeller wiki - propeller.wikispaces.com
    Play Defender - Propeller version of the classic game
    Prop Room Robotics - my web store for Roomba spare parts in the UK
  • JT CookJT Cook Posts: 487
    edited 2007-12-08 22:55
    Another idea is to use both joysticks (for the Hybrid) where you use left and right for thrust, button for fire then use the 2nd joystick button for smart bomb, and use one of the directions for warp(or swap that with smart bomb). That way you get full control on the Hybrid with the bare min of one button Atari joytsicks.
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-12-09 12:31
    Defender WIP 0.14 Title Screen Edition
    • Added a title screen. A surprising amount of work in this. First of all it was just undoable with the existing renderers, so I've introduced a third renderer. This is a copy of the playfield renderer with bullets stripped out and tiles put in. Every everything on the title screen is a tile.
    • Changed the level end screens to use the new renderer.
    • Fixed the sound API calling bugs Eric pointed out.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Help to build the Propeller wiki - propeller.wikispaces.com
    Play Defender - Propeller version of the classic game
    Prop Room Robotics - my web store for Roomba spare parts in the UK

    Post Edited (CardboardGuru) : 12/9/2007 12:36:08 PM GMT
  • BaggersBaggers Posts: 3,019
    edited 2007-12-09 13:54
    Hi CardboardGuru,
    Plays really well, very nice n tidy port, I like the Waddicor logo too lol
    Hats of you, it looks really good.

    Eric,
    Your sounds are great, really help make it cool, well done you two, you seem to have got a good combo going.

    Edit: Can't wait to finish this paying work stuff that keeps getting in the way of my prop fun [noparse];)[/noparse]



    Post Edited (Baggers) : 12/9/2007 2:24:34 PM GMT
  • epmoyerepmoyer Posts: 314
    edited 2007-12-09 16:10
    Just brilliant Steve!

    I knew it would be tempting to animate the drawing of the logo, but I didn't think you'd have the space or the appropriate graphics engine to pull it off! It sure looks spot on; nice job!
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-12-09 16:56
    Thanks guys!

    Eric, once you'd gone down the road of alternate sound drivers which are unloaded and loaded as needed, doing the same for the graphics renderers suggested itself. There was very little I could have done with sprites for the title and attract screens, so a tile mode had to be done.

    The tiles for the two logos take up about 3KB for the pair. And even after that there's still 9KB free/stack left.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Help to build the Propeller wiki - propeller.wikispaces.com
    Play Defender - Propeller version of the classic game
    Prop Room Robotics - my web store for Roomba spare parts in the UK
  • potatoheadpotatohead Posts: 10,261
    edited 2007-12-09 20:36
    You guys rock.

    Just had a quick play, and it's got the feel and the sound. Very well done!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
  • BamseBamse Posts: 561
    edited 2007-12-20 21:57
    Woow, very impressive...

    I love the look and feel of the game, very retro...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • tarikhtarikh Posts: 10
    edited 2007-12-27 04:13
    Amazing! I would love to try this on a Propeller demo board. Do you think it's possible? Loading the necessary files into the IDE compiles, but no NTSC out [noparse]:([/noparse]

    Perhaps I just need to change the pins in "sw_df_kbtv_drv_001"? I'm blown away by the screenshots here, and would be thrilled just to see the title screen up on my little tv.
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-12-27 07:51
    Hi tarikh,

    You need to download the latest release, which is always near the end of this thread. Right now it's version 14. Then at the top of Defender_014.spin you'll find 3 blocks of constants. Comment out the first two (Hydra, Hybrid) and uncomment the last (Proto/Demoboard). Then come back here and comment on whether it worked for you or not. Enjoy!

    Hopefully I'll get a new release out in the next few days.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Help to build the Propeller wiki - propeller.wikispaces.com
    Play Defender - Propeller version of the classic game
    Prop Room Robotics - my web store for Roomba spare parts in the UK
  • ClemensClemens Posts: 236
    edited 2007-12-27 13:31
    I got video running on the demoboard after making the changes Oldbitcollector mentioned in his earlier post. But I couldn't get sound or keyboard support :-(
    I think the only thing that works with the constant blocks is changing the clock and joystick settings. wink.gif Maybe OBC can post a running Demoboard version after the final release?
    The graphics look great though.
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-12-27 13:40
    Well, you can have the keyboard working, without sound, by commenting out the following lines:

    234 sfx1.start(@sfx_command)
    240 sfx2.start(@sfx_command)

    and uncomment this line:

    312 'key.start(KEYSPIN)

    If it still doesn't work, KEYSPIN might need adjusting to whatever first pin you are using for the keyboard (as per the standard parameter to the object comboKeyboard).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Help to build the Propeller wiki - propeller.wikispaces.com
    Play Defender - Propeller version of the classic game
    Prop Room Robotics - my web store for Roomba spare parts in the UK
  • ClemensClemens Posts: 236
    edited 2007-12-27 16:27
    hm. Still no luck with that keyboard.shakehead.gif
    And the keyboard does work with the keyboarddemo from the objects library, so it's hooked up correct, I guess.
    Did anyone else here get it running on the demoboard?
  • tarikhtarikh Posts: 10
    edited 2007-12-27 23:50
    OK, I got it working! So here's the report back:

    1) Comment the Hydra defines and uncomment the Proto defines in "sw_defender_014", as per Cardboard's comments

    2) In "sw_df_tv_drv_007b", as per Oldbitcollector (?--can't remember where i got this), you need to:

    change:
    movs VCFG, #%0000_0111 ' VCFG'S = pinmask (pin31: 0000_0111 : pin24)
    movd VCFG, #3 ' VCFG'D = pingroup (grp. 3 i.e. pins 24-31)
    movi VCFG, #%0_10_111_000 ' baseband video on bottom nibble, 2-bit color, enable chroma on broadcast & baseband
    to:
    movs VCFG, #%0111_0000 ' VCFG'S = pinmask (pin31: 0000_0111 : pin24)
    movd VCFG, #1 ' VCFG'D = pingroup (grp. 3 i.e. pins 24-31)
    movi VCFG, #%0_11_111_000 ' baseband video on bottom nibble, 2-bit color, enable chroma on broadcast & baseband

    and change:
    tvport_mask long %0000_0111<<24
    to:
    tvport_mask long %0000_0111<<12

    3) I also was unable to use the keyboard as per Clemens' report back.

    4) This looks incredible, even though I can't play it! Really cool, congratulations!
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-12-28 13:52
    Defender WIP 0.15 Portability
    • Thanks for all the input on what needs changing for different platforms. I've put it all together so that hopefully now it all works on different boards just by uncommenting the right block at the start of SW_DEFENDER_015.SPIN
    • Fixed the keyboard input.
    • Added movement on the baiters.

    Only Hydra users will get sound with the set up as is. Sound or Keyboard input is a choice, you can't have both.

    KEYS Are:
    Enter to start (From Title Screen)
    A,Z - Up/Down
    Caps Lock - Reverse
    Right Shift - Thrust
    Enter - Fire

    THE VERSION I'VE SHIPPED IS SET UP FOR THE DEMOBOARD/PROTOBOARD. If you're running Hybrid or Hydra, you'll have to change which comment block is commented out before running.

    I've tested on Hybrid and Hydra and it works fine. Including keyboard. Can one of you Demo/Protoboard users give it a test on your set up? See if it works as is without you changing anything. And if you do need to change anything to make it work, let me know. Cheers!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Help to build the Propeller wiki - propeller.wikispaces.com
    Play Defender - Propeller version of the classic game
    Prop Room Robotics - my web store for Roomba spare parts in the UK
  • BaggersBaggers Posts: 3,019
    edited 2007-12-28 16:09
    Lookin good CG, oh, and don't forget to spawn mutants not landers after going to mutant space, then the next level [noparse]:D[/noparse]

    Baggers.

    how's the explosion coming? or are you making us wait til the end for that to see how much ram you have left for particles? [noparse]:D[/noparse]
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-12-28 16:14
    Hi Baggers,

    Thanks for the bug report.

    I haven't tackled either of the explosions yet (planet or ship), though I've an idea how to do each of them. The planet explosion I thought was going to be complicated at first, but now I've got a very easy way. The ship explosion is harder.

    What board did you test it on? You've got a proto or demoboard in addition to your Hybrid haven't you?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Help to build the Propeller wiki - propeller.wikispaces.com
    Play Defender - Propeller version of the classic game
    Prop Room Robotics - my web store for Roomba spare parts in the UK
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-12-28 16:18
    Here's a video of Defender in action for those of you who haven't yet tried it. Unfortunately the sound is completely out of sync - but that's an issue with youtube not doing the right thing with my video upload. I'll have to try a different codec next time.

    www.youtube.com/watch?v=z535xcDGt9Y

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Help to build the Propeller wiki - propeller.wikispaces.com
    Play Defender - Propeller version of the classic game
    Prop Room Robotics - my web store for Roomba spare parts in the UK
  • BaggersBaggers Posts: 3,019
    edited 2007-12-28 16:54
    Hi CG, no probs glad to help.

    I've got the Protoboard, and Hybrid, but I've only tested it on hybrid, as my protoboard is packed away at the mo, my desk is full [noparse]:D[/noparse]

    Baggers.
  • tarikhtarikh Posts: 10
    edited 2007-12-28 18:32
    OK, I tried 15, here's the protoboard reportback. It works!

    I had to go into sw_df_tv_drv_008 and comment lines 166-169, i also had to make the tvport_mask on line 322 read:
    tvport_mask long %0000_0111<<12

    finally, i was unable to get the keyboard working [noparse]:([/noparse] BTW what are the keys to start the game?

    Post Edited (tarikh) : 12/28/2007 9:16:06 PM GMT
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-12-28 22:59
    tarikh said...
    I had to go into sw_df_tv_drv_008 and comment lines 166-169,

    I wouldn't have thought you'd need to. It's an either/or whether those three lines are executed or the next three, due to those if_nz and if_z conditions.

    [noparse][[/noparse]quote]i also had to make the tvport_mask on line 322 read:
    tvport_mask long %0000_0111<<12

    oops, missed that. Try Defender 016 now posted over on the Propeller Board Thread.

    [noparse][[/noparse]quote]finally, i was unable to get the keyboard working [noparse]:([/noparse] BTW what are the keys to start the game?

    Again, I'm not sure why the keyboard won't work. It does on the Hybrid/Hydra, and the comboKeyboard driver is cross compatible, and the pin number is set right.
    From the title screen it's the Enter key to start the game.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Help to build the Propeller wiki - propeller.wikispaces.com
    Play Defender - Propeller version of the classic game
    Prop Room Robotics - my web store for Roomba spare parts in the UK
  • david ellwooddavid ellwood Posts: 5
    edited 2010-03-19 16:04
    Hello

    Please excuse my complete Newb status.

    I have tried programming defender 15 onto my ETT p8x32a board and all I get are 'write failure on com3' errors.
  • david ellwooddavid ellwood Posts: 5
    edited 2010-03-19 17:02
    I am guessing that the 32kb eeprom on the board is insufficient?
  • BaggersBaggers Posts: 3,019
    edited 2010-03-19 18:53
    david, the 32kb eeprom is ample, as IIRC that's all it needed, I don't know the pinouts for your ETT board, nor do I know what clock speed it runs, have you configured the source to the correct clock speed, and PLL multiplier, and also set the pin outs to their corresponding pins.

    As for your newbness, don't worry, we all had to start somewhere.

    So basically you need to know your board's layout, eg, what crystal is has connected to the propeller, and what PIN group the Composite output is on, and the joypad, and audio, then you modify the top of the source accordingly.

    if you need help post again, with your crystal and pinouts info, and we'll be able to tell you what values you need to change and where.

    Hope this helps,
    Baggers.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • david ellwooddavid ellwood Posts: 5
    edited 2010-03-19 22:29
    the board uses a 5mhz xtal.

    and the composite video output comes off P12-P15

    i have deleted the first two configs leaving just the Proto/Demoboard Defines

    which seem to be ok as far as setting the clock is concerned.

    compiling to view status seems to agree that the program requires about 75% of the 32kb eeprom space.


    I am still getting the same 'write failure on com3' errors though.
  • BaggersBaggers Posts: 3,019
    edited 2010-03-19 22:46
    Ah, right, sorry, my mix up, basically, is the eeprom in the right way around?

    btw, press F10, to compile and run ( not writing to EEPROM ) to make sure the propeller is running ok.

    as it's usually an eeprom issue, do any other programs write to eeprom ok? or is it just defender?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • david ellwooddavid ellwood Posts: 5
    edited 2010-03-20 15:28
    f10 doesn't work either (i presume this sidesteps the eeprom completely?) which suggests it may be something else.

    other programs can be loaded (i have succesfully got "test propeller eeprom" working via the parallax serial terminal program.

    comparing this board to the parallax demo board they seem very similar.

    keyboard on p26,p27 , mouse on p24,p25 , serial on p30,p31 , composite on p12-p15 , 5mhz xtal , 32kb 24lc256 eeprom.

    the only difference would appear to be the addition of a few leds on some spare output pins and a usb interface.


    So i might be looking at a faulty propeller chip?
  • BaggersBaggers Posts: 3,019
    edited 2010-03-20 20:10
    hmmmmm that is strange it being only on Defender, I'm not 100% sure tbh the prop is very robust.
    is it battery operated? if it's mains, is it getting the correct voltage? ( depending on what regulators it has on board. )

    does the test eeprom write to eeprom?

    does it work all the time?

    have you tried other apps?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • david ellwooddavid ellwood Posts: 5
    edited 2010-03-20 20:49
    it would appear that my rs232 usb adapter may be to blame. (high baud rates not supported?)

    loading propellertool 1.05.5 now seems to get past the problem whilst 1.2.7 steadfastly refuses to play ball.


    no video output at the moment but at least i can get the program onto the board.
  • BaggersBaggers Posts: 3,019
    edited 2010-03-21 19:52
    nicely done, I didn't think it'd be the propeller, they rarely go, unless you blast them with too many volts [noparse]:D[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
Sign In or Register to comment.