Jump to content
IGNORED

Those Arcade scrolling beat'em'ups that we never had on A8


José Pereira

Recommended Posts

You would only need the normal 960 bytes for an Antic 4 screen. It's only the character set memory which is doubled (2K vs 1K).

...It might work. I was able to fit my sample screen into 128 chars with some to spare.

You are right... 2k for each charset, as IRG uses two, that is 4k for charsets and double buffering screen data takes another 2x1k.

Not a problem...

 

Speed ? As each 'IRG frame' consists of two frames, what happens when sprites can not be drawn in one frame time ?

We get animation at 4 frames, that is 15fps in NTSC land... and only 12 in PAL ...

 

Hey, all this is theory, it's better to have real code and see it on tv for real ;)

Link to comment
Share on other sites

Actually, you don't need to double-buffer the screen. This means, when putting the actual characters on screen, Super IRG behaves like a normal Antic 4/5 mode, in regards to screen memory (only one character screen needed). The only allowance is for the double char set (CHBAS is changed every VBLANK).

 

If you were changing your font data on the fly, it would require twice as much processing time. If it's only the character data, then it's normal processing time.

Link to comment
Share on other sites

  • 2 weeks later...

As I mentioned, better to have concrete example before writing tutorial :)

 

Little work over weekend and I managed to convert my C64 code to A8:

 

http://www.youtube.com/watch?v=RndymXTvTL0

 

Screen is double buffered (both character set and screen).

At 25fps I got 6 fully masked sprites in 4 colors, 12x21 size (like C64).

No pre-shifted data necessary, only 63 bytes for mask and 63 bytes for data.

Each sprite requires 16 chars, so 32 left for background.

 

At 25fps it's rather slow, but at least Atari's cpu makes it faster than on C64 :)

 

Next, testing with preshifted data :)

  • Like 6
Link to comment
Share on other sites

Awesome! Does it work over a background?

Yes.

 

Every animation frame erases previous positions, copies background graphics into sprite characters and does whole "LDA back, AND mask, ORA sprite, STA screen" stuff... (shifting included).

 

Basically, you can use them as hardware sprites and don't worry much about them...

Set sprite data pointer, x,y coordinates and that's it...

 

Price you pay is in number of characters left for background (32) and relative slowness...

 

Of course, different sprite sizes are possible, so something like ten 8x16 sprites would require 90 chars -> 38 left for background.

 

Hey, it's just V 0.1 ;)

  • Like 3
Link to comment
Share on other sites

Preshifted sprites done, managed to pull one more out with time saved:

 

http://www.youtube.com/watch?v=axm33fYns1Q

 

Here is a funny experiment with 8 sprites.

As there are no characters left for background, part of sprite shows over whole scren and as every frame routine is copying background to sprite buffer, a rather flickery recursive graphics demo effect shows :)

ps. Watch your eyes ;)

 

http://www.youtube.com/watch?v=NojXuyIg4kA

 

As I like raster-color-profiling here it is:

 

post-14652-0-78666100-1361007750_thumb.png

 

So, yes - preshifted sprites do save time. But most of the time still goes on that "copy background to buffer".

Next step... Eliminate copy completly ;)

  • Like 4
Link to comment
Share on other sites

I don't know your drawing algorithm but why are you erasing sprite characters? Why are you copying background to sprite characters? Don't you do LDA background, AND mask, ORA spritedata, STA spritechar ? Your preshifted sprites are really slow, IMHO it should do 8 sprites with 50fps.

Edited by MaPa
Link to comment
Share on other sites

8 12x21 in 50 FPS is hard I guess. I am pretty sure you can't draw them in VBlank only.

 

My (pre-shifted) 9x16 sprites need around 10 144-cycles scan-lines. So 8 in the area from line 220 to 312 (PAL only) is possible. But 12x24? I'll try when it some day.

 

@Popmillo: If you are out of chars, you know what to do... ;)

Link to comment
Share on other sites

my first ASM game (2005)... laser blaster:

post-14124-0-20143200-1361060504_thumb.png

 

12 soft sprites, bitmap mode, preshifted, doublebuffered (25fps), extremely nooby-coded :)

 

- i planned some other movement of letters before - in circle, but at the end i put simple sinus wave there... so it looks like its just using HW scrolling, but in fact there is no HW scrolling.

 

M.

  • Like 1
Link to comment
Share on other sites

my first ASM game (2005)... laser blaster:

post-14124-0-20143200-1361060504_thumb.png

 

12 soft sprites, bitmap mode, preshifted, doublebuffered (25fps), extremely nooby-coded :)

 

- i planned some other movement of letters before - in circle, but at the end i put simple sinus wave there... so it looks like its just using HW scrolling, but in fact there is no HW scrolling.

 

M.

Das it use background masking? :ph34r:

 

Link to comment
Share on other sites

I don't know your drawing algorithm but why are you erasing sprite characters? Why are you copying background to sprite characters? Don't you do LDA background, AND mask, ORA spritedata, STA spritechar ? Your preshifted sprites are really slow, IMHO it should do 8 sprites with 50fps.

Sprites can go over anything in the background (other sprites, background characters) and there is no 'rule' for coordinate changes (every animation frame sprites could jump anywhere on the screen).

So, I have to erase sprite characters from its previous position (restore background chars).

Copying background to sprite buffer was easiest way to do it... Next in the plan is to try to dynamically change background address in core routine so I could skip that step completely.

 

I also wish they would work in 50fps, but with 4x4 characters size and full masking its tough...

 

It will be rather easy to skip parts of routine and test different combos (without masking, without overlapping sprite positions etc...) and see what speed we get then.

 

Do you have the source code to this? I'd love to have a look.

You should be able to look at it here (let me know if it doesn't work):

https://bitbucket.or.../src?at=default

 

Main file is 'char_sprites' + all other with that prefix (you'll notice other 'pop' files, that is because I'm testing this character sprites approach in my PoP project folder ;) ).

 

Here is the newest demo with rotating background and some front layer chars:

http://youtu.be/FFVUGGuwgC0

 

char_sprites.xex

  • Like 6
Link to comment
Share on other sites

Looking great !

 

Visually this reminds me of an old Peter Sabath demo, but it looks like he did not have/use background sprites or chars. (originally released as an intro for Abbuc mag. 20, but ended on side-B, since the intro of Gnome Design was much better):

 

http://www.youtube.com/watch?v=SUArGd1tJI8

 

Greetings, Andreas Koch.

Edited by CharlieChaplin
Link to comment
Share on other sites

 

Sprites can go over anything in the background (other sprites, background characters) and there is no 'rule' for coordinate changes (every animation frame sprites could jump anywhere on the screen).

So, I have to erase sprite characters from its previous position (restore background chars).

Copying background to sprite buffer was easiest way to do it... Next in the plan is to try to dynamically change background address in core routine so I could skip that step completely.

 

I also wish they would work in 50fps, but with 4x4 characters size and full masking its tough...

 

It will be rather easy to skip parts of routine and test different combos (without masking, without overlapping sprite positions etc...) and see what speed we get then.

 

 

You should be able to look at it here (let me know if it doesn't work):

https://bitbucket.or.../src?at=default

 

Main file is 'char_sprites' + all other with that prefix (you'll notice other 'pop' files, that is because I'm testing this character sprites approach in my PoP project folder ;) ).

 

Here is the newest demo with rotating background and some front layer chars:

http://youtu.be/FFVUGGuwgC0

 

char_sprites.xex

 

 

Looks interesting.

Is it possible to give every (at least 4 of them) "ball" a "Player Missile" Overlay? For the start a simple square?

Link to comment
Share on other sites

Looks interesting.

Is it possible to give every (at least 4 of them) "ball" a "Player Missile" Overlay? For the start a simple square?

These are 12x21 sized... With double sized Players with priority under graphics, 4 sprites could have one additional color...

So, something like 5 sprites (4 sprites with underlay + 1 'simple' (4 colors)) could probably work in 25fps.

For now, I'll try to make it as fast as I can.

Link to comment
Share on other sites

  • 2 weeks later...

Time for new improved soft sprite routine :)

 

Bigger, faster, better sprites!

 

7 x 4 color soft sprites, each 12x24 over background with front layer.

Character screen, each sprite needs 16 characters, so only 16 characters remains for background :)

Fully masked, 25 fps, each sprite can go under and over anything in background (background chars or other sprites).

No preshifted graphics needed, everything done on-the-fly.

 

http://youtu.be/TddPaY8_YKA

 

Unfortunately that's about it - only 3-4 scanlines left free !!!

 

ps. Best of all, while working on it, I got some new ideas, think it can be done better ;)

 

Edit: Forgot to add executable:

 

char_sprites.xex

Edited by popmilo
  • Like 5
Link to comment
Share on other sites

Why is preshifting no help?

I'm not saying they don't help :)

 

In previous routine (last one with 12x21 sprites) I had part of code that did "copy background to sprite buffer" before masking and drawing sprite.

That copy took more time than drawing sprites (with or without shifting).

 

This new version works without that copy part... Takes longer to prepare all the addresses and main loop is 8 cycles instead of 21.

 

It's still faster than previous version even with 24 vs 21 lines high sprites!

 

Next test: 12x24 with preshifted data and timing comparison.

 

Stay tuned ;)

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...