Warhawk DS (HK & Flash's DS Diary)

flash · 261560

Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #210 on: March 07, 2009, 11:56:18 pm
I've never written a game in my life, nor have I coded anything in assembly. Flash and I met on the GameEx forums which is a FE for retro gaming. I helped him setup RetroBytesPortal in December last year which was originally for showing photos of his impressive retro console and computer collection. It sorta turned into something more than that now since we went for forum software and added a few things. So Flash just mentioned to me one day that it would be great for me to learn asm since I was trying to get him to learn "C". One day he mentioned writing a game on the C64 so I thought of the DS straight away since it's very much like an old console/computer. So we wrote a few demos and realised "we can do this" and that's were Warhawk DS was born.

I do have some stuff I've written for the DS but nothing great. You can see some of the old stuff I've done at my drunken coders site. I also wrote a "game" called Runes for the GBA which you can read about here. It reads your fortune ;)



Offline Sokurah

  • RBP Member
  • Cray-1 Super Computer
  • *****
    • Posts: 724
    • Tardis Remakes
Reply #211 on: March 08, 2009, 12:58:15 am
Damn, that looks good. It's coming along nicely.

I'd also like a little info on how you divide the work between you and how you decided who's doing what and so on.

One day...one day - I'll make a shooter myslef.  ;D



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #212 on: March 08, 2009, 09:22:42 am
Damn, that looks good. It's coming along nicely.

I'd also like a little info on how you divide the work between you and how you decided who's doing what and so on.

One day...one day - I'll make a shooter myslef.  ;D
Luckily we work quite well as a team, so we don't really divide the work. We start work on bits and if one gets stuck on something then the other helps. It does not sound like much of a system, but it gets the job done.

HK has also been great in converting the original DS dev stuff into ASM friendly code. This has really helped us get so much done so quickly.

Now we are just spending our time adding the little things :)

Coding for the love of it!


Offline Lobo

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 3119
    • Spitoufs
Reply #213 on: March 08, 2009, 02:53:45 pm
Ahhh..good to place the name behind the work, now I remember. I saw the site before with keyboard layouts, plus seen them in DSo and other apps.  DSGoo is very cool even though I think it wouldn't work on R4 but it did on my old crappy card long time ago. That fortune telling thing, have to try that to see what stars have it in for me  :'( .

And yeah,  you guys are doing excellent work so far and the game really works and seems stable as a granite rock with Ming's portrait etched in it.  8)



Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #214 on: March 08, 2009, 08:14:34 pm
I got a PM from arcadecontrols.com about this game, since he asked which type of game I was going to wrote.

This game seen going to been awesome and nice rediction of the original warhawk. only missing is the excellents Rob Hubbard music (yes my brother have the original tape version that time).

Im looking when this game is released and hope I can get it play on a emulator  :).

The Musician for the RetroBytes Portal Projects.


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #215 on: March 08, 2009, 09:02:25 pm
The game does feature music, but it is off in the demo's until headkaze (mostly :) ) and I can find a way to move it to romdata and increase the quality.

we are using remixes of the original tune, 2 versions and a slow one for end of game!

Coding for the love of it!


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #216 on: March 08, 2009, 10:01:32 pm
I just wanted (with this new fangled Youtube plugin - ta HK) to add a couple more videos.

These just demo bits of the game! there are no final attack waves, all that stuff is just demo patterns and will continue to be for some time until the actual game logic is at a stage that we are happy with. but at the very least, it does give an inkling to the gameplay and to the graphic work from Lobo and BaDToad :)


« Last Edit: March 08, 2009, 11:04:48 pm by Flash »

Coding for the love of it!


Offline Lobo

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 3119
    • Spitoufs
Reply #217 on: March 08, 2009, 11:15:02 pm
Beautiful spaceships dancing and prancing. :P I got sidetracked today but some work has been done so soonish something wicked this way comes.

Also, spacefractal, you'll probably be able to play it at the end via No$ as it works great so far. I did tried Desmume as well but it runs at about 2fps while Ideas runs it just fine (about 60fps).



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #218 on: March 09, 2009, 05:33:08 pm
We now have multispeed full directional shot from the aliens - straight to YOU <manic laugh>

It was asked earlier (by Sokurah) how HK and I work together and how we divide work, the reply I gave had no example, so - here is a "bloody" good one!

I was struggling with direct (vector) shot, had it part working but was losing accuracy on the diagonals - It was really driving me "NUTS". Last night, HK spent ages converting C# based maths code to ASM to allow us to use a fixed point divide routine. This got me thinking of another way to use this without worrying about angles and sin/cos... Well, it is done now :) So, "Hats off to HK" :)

for those who are interested, here is the code that uses the "divf32" function to get the job done......

Code: [Select]
@ ok, now to work out where to shoot???
@ r4/r5 = player X/Y
@ r6/r7 = Alien X/Y
@ r12 = shot speed
mov r10,r12 @ Store the X/Y speeds
mov r11,r12 @ we will need r12 later

cmp r5,r7
rsble r11,r11,#0
suble r9,r7,r5
subgt r9,r5,r7
cmp r4,r6
rsble r10,r10,#0
suble r8,r6,r4
subgt r8,r4,r6
cmp r8,r9
bmi directOddQuad
push {r0-r2}
mov r0,r8 @ divide this number
add r9,r12 @ we also need to divide by the SPEED
mov r1,r9 @ by this number
bl divf32 @ r0=result 20.12
mov r9,r0 @ move the whole to r9
mov r8,#0
pop {r0-r2}
b directDone
directOddQuad:
push {r0-r2}
mov r0,r9 @ divide this number
add r8,r12 @ we also need to divide by the SPEED
mov r1,r8 @ by this number
bl divf32 @ r0=result 20.12
mov r8,r0 @ move the whole to r9
mov r9,#0
pop {r0-r2}
b directDone

I will post a demo of .... er.... a boss using the fire pattern later :)

PS. there is a very slight speed rounding issue that I will look at later, just bloody happy to have it working :)
« Last Edit: March 09, 2009, 05:55:33 pm by Flash »

Coding for the love of it!


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #219 on: March 09, 2009, 07:34:18 pm
Ok, I was gonna release this vid using the boss from level 13, but... I decided to keep some of the later levels and bosses a bit secret (should have done so with level 14 also :( ), so I have re-used level 2 to demonstrate direct fire. It does look kind of cool. This is a demo of a single pattern that can be used on both aliens and bosses, but the boss fire code/sequence can be a lot more varied!

PS. I was not very good at avoiding it :)

« Last Edit: March 09, 2009, 07:50:12 pm by Flash »

Coding for the love of it!


Offline BaDToaD

  • Proterian
  • Dragon 32
  • *****
    • Posts: 76
Reply #220 on: March 09, 2009, 08:42:18 pm
Excelent work as always guys... It looks great :)



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #221 on: March 11, 2009, 08:41:18 pm
I just love this video posting business, so good god, i will use it :)

This is just a demo to show that I have added code to "blow up" large aliens (if I even use them?). Sadly, down to trying to cram so much in, I cannot do a single explosion for it, but have to reuse the single alien explosions. So, what I have done is try to jiggle them about a bit and also flesh out the colour for them - it works mostly? What do you think?

(ps, with an animated sprite also :) )
This is a demo of some code that I was really proud of (thanks to HK for the Div code). In fact, I was so proud of the vector code that I posted it at gbatek (not that anyone there would learn from it :) ) It uses a really quick calculation to drive a shot of any speed toward you. The shot speed is not 100% perfect, but the hit is - and this is what matters to me. The code is quick and in-game you would never worry about the slight speed inaccuracies - and puting something you never notice "right" seems a little pointless - perhaps I will though?

Also, I do wanna say that you may not see a great deal of demo code for a bit as, at the moment, I am working on tidying and developing the code that we have, so there is not a great deal to show - just neater versions of what you have already seen! It is important to try a pull the code into a cohesive whole now and again, before it gets too messy!

But, remember - I always love comments - good or bad!!!
« Last Edit: March 11, 2009, 10:53:28 pm by Flash »

Coding for the love of it!


Offline Lobo

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 3119
    • Spitoufs
Reply #222 on: March 12, 2009, 12:01:28 am
First one looks good to me, heck, explosion is explosion and is always welcome regardless of being substitute versus its own.
Second is pretty cool too, 'follow the player bullet mode (tm)', just don't overuse it, hah, don't wanna be chased like that too often.  ;D



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #223 on: March 12, 2009, 06:42:51 pm
I suppose the explosions like that are at least - retro :)

The bullets that follow you will be used, but not at perhaps that speed, and certainly not at that rate of fire - still it is fun :)

I am still adding bits here and there, today has been time to play with the boss code and add some stuff in there and also to modify the meteors and the hunters so that higher levels change them :)

Still gotta spend some time to think what else to add to the bosses?? hmmmmmm

Also, following feedback, the ship is now faster as is the rate of fire. When you have a powerup, the ship is much faster and the fire is a continuous stream of bullets! The power shot (hold fire) is also faster and does a bit more damage.
« Last Edit: March 12, 2009, 06:47:39 pm by Flash »

Coding for the love of it!


Offline BaDToaD

  • Proterian
  • Dragon 32
  • *****
    • Posts: 76
Reply #224 on: March 12, 2009, 06:48:59 pm
Sorry I've not been about much guys but I've had loads of work commitments and pressure the last few days so I'm being a grumpy old git and have no creative energy for graphics :(

Hope to get back into the swing of things tomorrow evening after I get a big meeting out of the way at work :)



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #225 on: March 12, 2009, 07:02:02 pm
I dont know, you can feed me the shit, but I bet you cannot make me eat it :)

No worries mate, I have plenty to get on with...

If you get a chance to look at the videos posted and give me comments on them, then that would be ample at the moment!


Coding for the love of it!


Offline Lobo

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 3119
    • Spitoufs
Reply #226 on: March 12, 2009, 09:22:22 pm
...the ship is now faster as is the rate of fire. When you have a powerup, the ship is much faster and the fire is a continuous stream of bullets! The power shot (hold fire) is also faster and does a bit more damage.

Yessss! Can't wait to try that out  ;).

As for the bosses, my main thing would be to make them move and shoot at different rates and speeds as you reach new levels. Start with a simple boss lazily moving left and right with just a few single bullets then increase all of this per level. Yeah, talking about difficulty but it will ensure that anyone out there, regardless of *skills* will be pushed forward and have a first few levels done without worrying about bosses too much (at first). After that, you know, gradually make them move faster, even maybe a bit downward and up, make them dance in their area, stop then move fast to the side then slowly move to the left increasing the fire rate and so on and so forth. Basically-details that makes them unpredictable and different from each other  ;D.



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #227 on: March 12, 2009, 09:43:00 pm
Bosses have the ability to fire nothing or madly - through a unlimited palette of patterns - it is all down to getting the right balance. and also the movement and speed can be set on a per level basis - I just have not made any "demo" use of the code as yet!
The faster movement on the player is a benefit, i must admit... After watching the videos of the original C64 version of the game, I do agree that it needed a bit more "oomph"

It is really gonna be hard to balance the levels out, that is gonna be the bit that can make or break it. I have worked hard with the code to get it to a stage where it can now do pretty much all you want, but making use of them tools is gonna be tricky. HK and I are gonna have to work together soon on a attack wave editor (w.a.n.k :) ) then perhaps I can start creating REAL attack waves. This will come :)

At the moment it is all about adding things (the actual game code could be classed as finished really), I want to add more fire patterns and also perhaps a few modifications to the attack wave code (like offsets) and more to the bosses (like, tracking, lurching, Y movement, etc), god! so much is done and yet there is always so much to do :( (LOL)
« Last Edit: March 12, 2009, 09:45:49 pm by Flash »

Coding for the love of it!


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #228 on: March 12, 2009, 10:43:16 pm
Just been amusing my self with the youtube demigraphics, so, here is where the hits have come from on the videos so far

LMFAO!! :)

(I giggle, but this is exactly what is shows)
« Last Edit: March 12, 2009, 10:45:22 pm by Flash »

Coding for the love of it!


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #229 on: March 13, 2009, 09:33:08 am
I thought it was time for another video ;)

This is just a "show" for the faster movement and fire code. Also, this uses level 14, so the Hunters are a bit "Aggressive".
Again, this is only test patterns and not indicative of the final game play.


Coding for the love of it!


Offline Lobo

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 3119
    • Spitoufs
Reply #230 on: March 13, 2009, 03:10:28 pm
Oh, yeah! Very tight and the speed is just right. Love 'em 'donuts' circling around like that, very nice! 8)



Offline Tempest

  • Jupiter Ace
  • *
    • Posts: 31
Reply #231 on: March 14, 2009, 09:45:08 am
Looking good guys! My favorite is the direct fire demo. I don't think I've ever seen anything like that. There certainly isn't anything like that in Tempest!  :D



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #232 on: March 16, 2009, 06:25:12 pm
Just a thought, but if anyone wants to see what is going on with the code,

Check here:-

http://code.google.com/feeds/p/warhawk-ds/svnchanges/basic

This will show you the latest updates, comments, and also enable you to look through the source code.

Coding for the love of it!


Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #233 on: March 16, 2009, 09:36:00 pm
The raster effect does not look good with the green sky (the right side) in the background which is show a bit whird, but when these is gone, it elsewice a great effect....

The Musician for the RetroBytes Portal Projects.


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #234 on: March 16, 2009, 09:50:29 pm
I have fixed this in the latest demo.... Though we have not released it yet! Still working on all the boss code... HURRAH.. Will release a new demo soon to compliment the videos.
Or perhaps a new video - who knows? :)

But the raster effect looks more natural. It will be worked on, all the same... There is more to do on all aspects.


Coding for the love of it!


Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #235 on: March 17, 2009, 12:59:34 am
Yes the raster effect is very different to the last demo released as I implemented proper interrupts along with a whole new fx system :)

BTW there is still a bug in the raster effect I need to fix which is because it's now using a HBLANK interrupt the top line is screwed up so on line 191 I need to change it to offset line 0.



Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #236 on: March 17, 2009, 01:01:28 am
Just a thought, but if anyone wants to see what is going on with the code,

Check here:-

http://code.google.com/feeds/p/warhawk-ds/svnchanges/basic

This will show you the latest updates, comments, and also enable you to look through the source code.

I gotta remember to put in comments when I do an update! Doh!

Just a bit more info on what I'm working on at the moment. I have been investigating file systems so we can break through the 4MB memory limitaion of the Nintendo DS. I wrote demos for gbfs, fatlib and we have settled on EFS (embedded file system). Not only does this allow us to make the binary as big as we like by attaching files to the end of the ROM, but we can also keep them inside a single .nds file (unlike using fatlib which uses an external file system) or gbfs which maintains the 4 MB limit.

What I'm working on now is writing a ring buffer and implementing timers (which need the new interrupt system) and so we can stream music from the ROM to a buffer in the ARM9 and send it over to the ARM7. I'm hoping it's not going to be too difficult to do. The main problem is we won't be able to use the hardware IMA-ADPCM decoder because it doesn't allow streaming. So I also need to write a software IMA-ADPCM decoder (which doesn't look too difficult) but I might end up using one that someone on gbadev.org has already written. But I could just translate some rather simple "C" code myself.

The music is very important in this game which is why we want to break the 4MB limit so we can have high quality music streaming while you play :)
« Last Edit: March 17, 2009, 01:09:40 am by headkaze »



Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #237 on: March 17, 2009, 06:30:26 am
as I known ADPCM is just a 4 bit system and is not really compressed, it just less dynamic sound. You might use a another ADPCM format for easier decodning?

By now I have (as I wrote in the other thread). These two tunes finally use about 2.5mb in size for both in 22khz IM-ADPCM (mono) which sound acceptable (converted from Audacity).

I can send these converted wav for testing?

The Musician for the RetroBytes Portal Projects.


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #238 on: March 17, 2009, 07:17:56 am
Yes the raster effect is very different to the last demo released as I implemented proper interrupts along with a whole new fx system :)

BTW there is still a bug in the raster effect I need to fix which is because it's now using a HBLANK interrupt the top line is screwed up so on line 191 I need to change it to offset line 0.
I also modified the "cloud" on the background so it does not have that hard edge and moved it into the screen a bit more. So now with your new sine code and the modified starback.png. it does look a lot nicer :) (except the top line that I had not noticed - Doh!)

Coding for the love of it!


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #239 on: March 17, 2009, 11:00:37 am
I have decided it is time to add "pulse" fire (or "burst") to the standard aliens shot code, this will enable us to fire a burst of shots of a variable lengh and spacing.

It is gonna be tricky to integrate with the current alien shot code, but I think it will be worth it in the end and add more to the game (without going too "bullet time")

I will post a video when done, whenever that will be :)
« Last Edit: March 17, 2009, 11:01:48 am by Flash »

Coding for the love of it!