English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. General (https://eab.abime.net/forumdisplay.php?f=37)
-   -   Writing a game sprite driver (https://eab.abime.net/showthread.php?t=89271)

robinsonb5 23 December 2017 14:53

That is looking really good - well done!

funK 23 December 2017 17:11

As a BombJack arcade lover (and C64/Amiga ports hater) myself, you're doing an outstanding work there, man, well done! :bowdown
Really hope you'll eventually release some kind of arcade perfect port to show how the game should have been on the Amiga back then!

mcgeezer 23 December 2017 18:52

Quote:

Originally Posted by funK (Post 1207514)
As a BombJack arcade lover (and C64/Amiga ports hater) myself, you're doing an outstanding work there, man, well done! :bowdown
Really hope you'll eventually release some kind of arcade perfect port to show how the game should have been on the Amiga back then!

Thanks for the feed back, we share the same thoughts about the bombjack ports. I reckon i’ll have a full adf available of the game finished around early feb (minus sound, unless i find a musician).

I’m thinking about including a hidden ‘beer edition’, where basically bomb jack has to collect beers instead of bombs and if he manages to collect 24 open beer bottles he gets a special bonus for supping a crate on each round. Pretty good idea i reckon.

Old_Bob 26 December 2017 16:34

What's this?!?!? Another fellow doing a Bomb Jack port?!?!?

Looking great, dude. Your February finish date should beat me by at least a couple of years, lol. I've currently got mine pencilled in for release xmas, 2030 :)

B

mcgeezer 27 December 2017 11:44

Quote:

Originally Posted by Old_Bob (Post 1207924)
What's this?!?!? Another fellow doing a Bomb Jack port?!?!?

Looking great, dude. Your February finish date should beat me by at least a couple of years, lol. I've currently got mine pencilled in for release xmas, 2030 :)

B

Thanks for the message Bob - I didn't realise others were doing ports of Bomb Jack too. For me it wasn't intentional, I just started writing a sprite driver and have ended up on a journey porting the Arcade game.

Anyhooo.... after a Boxing Day coding marathon (wife and boy away) here's another update:

Made the copper much easier to manipulate, Bomb Jack has a lot of colour cycling going on so it was needed.

Added the enemy formations table - plotted in each map are starting locations for the enemies, if Bomb Jack is in the right side of the screen enemies will appear on the left and vice versa - (good update that one)

Added the Power meter and relevant code to start the Power Ball after enough bombs have been collected.

Next up... collision detection of the Bonus multiplier and then onto scoring. Still lots to do but I'm gradually getting there. I'm starting to get a feeling that most of the technical hurdles are over with (hopefully) and for the first time I had a feeling I was actually playing the game during latter stages of debugging.

I'll up the source to the usual place soon.

https://youtu.be/Y_NmzIIxz5w

Old_Bob 27 December 2017 14:34

Quote:

Originally Posted by mcgeezer (Post 1208052)
Thanks for the message Bob - I didn't realise others were doing ports of Bomb Jack too. For me it wasn't intentional, I just started writing a sprite driver and have ended up on a journey porting the Arcade game.

No probs, dude. I started out on mine pretty much the same way. Real life got in the way during the last half of the year and, as it turns out, it was only the last week or so that I actually got around to looking over it all again.

Here's a little clip of it going in the state I last left it in...

https://youtu.be/H6kbY0dKKTE

B

mcgeezer 27 December 2017 15:07

Quote:

Originally Posted by Old_Bob (Post 1208076)
No probs, dude. I started out on mine pretty much the same way. Real life got in the way during the last half of the year and, as it turns out, it was only the last week or so that I actually got around to looking over it all again.

Here's a little clip of it going in the state I last left it in...

https://youtu.be/H6kbY0dKKTE

B


Wow - nice one mate, looks like I've reinvented half the wheel.
Is yours all in assembler on a stock A500 with 0.5MB?

It looks like you nailed the player mechanics on it pretty well which I've yet to do (leaving it till last). With all the game logic in now I'm only blitting about 22 (32 colour) sprites. With plenty of optimisation I can probably get it up to 26/27.

All my source is in the public Github so if you want to see how I'm doing stuff then feel free.

Old_Bob 27 December 2017 17:31

Quote:

Originally Posted by mcgeezer (Post 1208080)
Wow - nice one mate, looks like I've reinvented half the wheel.
Is yours all in assembler on a stock A500 with 0.5MB?

All in asm, yes. I started off with it going in 512kb but it was looking like getting absolutely everything in there might be a little bit of a squeeze, so quite early on I settled on 1mb.

My one uses the hardware sprites for the player, the bonus and power coins, as well as the extra Jack sprite. The blitter does the other enemies with the bombs being done with the CPU. I had intended to use all the 16 bobs for extra enemies. A kind of "expert mode", if you will. With maybe four birds along with 12 other baddies going on and this program was partly testing that out. Possibly others may agree with me in that it's just little too much going on in such a small play area. So, I was planning just to stick to the normal amount.

I've also decided to rewrite a good bit of it, based on some test programs I've been fiddling with over the last little while.

I guess, I should possibly reschedule the release date. Maybe xmas, 2040?! :)


B

mcgeezer 29 December 2017 00:12

Fairly good update this one.

Spent a fair amount of time cleaning up the code so it's now not all stuck in one file but dispersed into several which makes the whole thing much easier to manage now.

While I was doing that I had a brain wave on the turning the enemies into the smily face thing that Jack can then collect, what I thought would have took me a good few hours actually took me ten minutes. ;)

I've also added more stuff on the colour cycling and other improvements in the engine which makes building the rounds much easier.

All very much a good learning curve this. I also added a new video codec so I can record videos longer than 30 seconds... but the quality isn't as good (rest assured the game is running at 50FPS, but the video is grabbing frames at 30FPS).

Here's the video - hope you like this update.

https://youtu.be/SZV16A-nNPw

LeCaravage 29 December 2017 21:07

Seriously good.

mcgeezer 30 December 2017 19:43

Update again...
  • Added 32x32 Sprite support - the Mummy (Metal Man Sprite) now explodes when created and when he hits the bottom platform - at that point he will transform into another enemy.
  • Done some work around the Bonus, Extra and Special tokens... the video will show them being generated from left or right with the Joystick fire button to cause an event. In Bomb Jack this is normally when the player accumulated 5000 points, but seeing as I have no scoring system in place yet I just used the fire button.

As the Mummy handler is a fair mess now I probably need to rewrite it or seriously optimise it as I'm starting to see slow down with all sprites on screen - no biggy, plenty of room for optimsation.

Next I will be doing another enemy handler... preferably an easy one!

https://youtu.be/q-z1U9oeEZo

mcgeezer 03 January 2018 00:02

If I was to call this update anything it would be "major optimisation part 1 of 2". Sorry, this update may be long... but if you're interested then keep reading i guess.

After a few attempts at immitating the Sphere (The metallic round enemy) I finally settled on something workable. The problem as such isn't that it's hard to put on screen, it was just hard (for me because I'm really shit at maths) because I know for a fact there'll be some algorithm that easily makes the Spheres wave left and right... I ended up settling on a small sine wave that if Jack is to the left of it, will continue its sine to the right and then go after him to the left and vice-versa. I haven't replicated this in the Black Orb though yet as there's a few other things I need to do.

Hours after that and a few wine and dines with the wife to say sorry for neglecting her, I started a major code optimisation.

The driver wouldn't actually run full speed with more than 8 enemies on screen. As a reminder my target technical achievement is this:
  1. 1 Jack
  2. 1 Power Ball
  3. 1 ESB token (Extra, Bonus, Special)
  4. 1 lit bomb
  5. 10 enemies
  6. Full collision handling.
  7. Upper and Lower panel updating.
  8. +All scoring.
  9. +Sound FX/Music

After optimisation through using macros and weeding out stupid mistakes (lsl #1, lsl #2 etc to adds), I've managed to get up to and including item 8 on the list - the video below has 11 enemies going at 50 frames. When bombs are collected you'll see a bit of a slow down.

In the code, there is still lots of improvements to be made.

I actually had a look at the restore bomb routine and I added a comment saying 'use the blitter for this' and in there is a whole host of 68000 cycles used to copy the background from the triple buffer using move.b all over - :nuts

Also in there is still a whole host of lsl #4, lsl #5. lsl #6... all of which can be made into fast tables. These things are being called probably 40/50 times per frame so I expect a decent gain from optimizing in part 2 tomorrow. Just as well really as I'll need that for the last two items on the list.

Still plenty to do but I feel the last day has seen it really come on and I've learned loads about building an actual game too!

Here's the video update.

https://youtu.be/Ja10qzQx9FE

mcgeezer 04 January 2018 00:55

Have added more collision handling today.

When Jack collects the Powerball thing and the enemies turn into little smily faces then Jack is able to destroy them.

This was actually harder than it looks to implement because under normal circumstances when Jack is avoiding the enemies you just have to touch any of them to have him bite the dust, this can easily be controlled by just checking different collision screens using the blitter - if any are touching then Jack is dead. The problem comes when Jack needs to kill particular enemies when they are vulnerable so in this instance it needs a bit more thinking.

To achieve what I wanted I just plot a black square 16 pixel surround where Jack is, check if an enemy is within that range, if it is... plot Jack in the centre of the square and then plot the enemy - if it overlaps with the blitter that enemy is toast!

Later I'll had the splash animation etc which kills the enemy - just no time tonight...will probs happen at the weekend now.

You'll notice there's a few bugs to do with the Sphere when it reaches the top of the screen, I've had nothing but trouble with them to be fair so I'm going to debug those after I've put more levels in the game and got the difficulty sorted - I'm leaving them as tweaks which will be sorted last is what I'm saying.

here's the video update - if you're reading/watching then enjoy.

https://youtu.be/vrbvMkMDtBw

LeCaravage 04 January 2018 21:12

Quote:

Originally Posted by mcgeezer (Post 1209655)
here's the video update - if you're reading/watching then enjoy.

That's a piece of luck, that's exactly what I'm doing :D

mcgeezer 05 January 2018 22:01

Quote:

Originally Posted by LeCaravage (Post 1209849)
That's a piece of luck, that's exactly what I'm doing :D

Ahhh good man!


Yesterday I had a day off from coding as I wasn't feeling too well - probably too much beer the night before.

Today and feeling better I thought I'd add in a few extra rounds of the game so put in rounds 2-5 extra to cover each scene location. Running through the different scenes it picked out quite a few bugs.... most notably with the Mummy not exploding... not even sure why that is at this point (probably something not being re-initialised). All in all though this is a decent update and shows the game coming along nicely - so much so that I'm fairly confident now I'll be able to do a release of the game providing I can source good music (from the Arcade if I can) and Sound FX.

Enjoy.

https://youtu.be/Kcj-WIidcXU

Shatterhand 05 January 2018 22:24

I am pretty sure if you ask for help you'll have people doing a mod for you with a perfect rendition of the arcade music using just 3 channels, while leaving 1 free for the sfx.

Like I said in the other thread, outstanding work, mate! Looks very good!

dlfrsilver 05 January 2018 22:50

ask to saimon69, considering how advanced your version is, he will possibly help you :)

mcgeezer 06 January 2018 19:16

Quote:

Originally Posted by Shatterhand (Post 1210088)
I am pretty sure if you ask for help you'll have people doing a mod for you with a perfect rendition of the arcade music using just 3 channels, while leaving 1 free for the sfx.

Like I said in the other thread, outstanding work, mate! Looks very good!

Quote:

Originally Posted by dlfrsilver (Post 1210092)
ask to saimon69, considering how advanced your version is, he will possibly help you :)

Thanks for the feedback guys.

At the right time I'll post a request for music/sfx if I can't manage it.

mcgeezer 09 January 2018 23:13

Another update here after a couple of days off from coding - my head was starting to hurt a little with all the debugging, not good when you're navigating MonAm in your sleep!

This update is all about bug fixes really and stabilizing the code. Pretty much all bugs came down to things not being re-initialized at various points, it's just time consuming to track them down.

One big thing I have included which took no time at was a packer, I've used the RNC Pro Pack which has dramiatically reduced storage/memory consumption from something like 220Kb to 75Kb. This actually free's up a lot of memory as originally I was going to hold each scene in ram where now I can just unpack each scene to the screen buffers - chip ram saving will be about 160Kb.

Other improvements I have put in are the sprite routines when collecting the ESB and I've put in the destroy enemy animations.

There's still a nasty bug (which you'll see in the video) which only seems to materialise on scene 4, I suspect it is to do with the ESB token not being handled somewhere, I have recorded 4 game run throughs to see if I can track it down.

Also some kind souls have come forward and offered their time to work on the music and sfx - the game will be great when finished with these included!

After I get to the bottom of this crappy bug, it will be onto the scoring... maybe tricky but probably nothing I can't get to the bottom of.

Here's the video update - https://youtu.be/TAu3Byyn3fI

Enjoy.

kamelito 10 January 2018 21:27

Awesome just add Jean Michel Jare Magnetic Fields part 2 and it will be fantastic.


All times are GMT +2. The time now is 10:00.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.09767 seconds with 11 queries