English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 06 July 2020, 10:24   #161
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,409
Quote:
Originally Posted by mcgeezer View Post
Would you get any gains by multiplexing the background layer with sprites (similar to Risky Woods?) I know RW points to the same graphics data per sprite but due to only needing 4 colours does it not make it possible?

Pretty sure you covered this in one of your cool videos about a free-form sprite layer.
I did cover a free-form sprite layer, yes
And you're right that it could display a background like the one Xenon 2 does.

However, there's an issue with that particular approach which might make it a bit less useful here: it is really DMA heavy. You're looking at over 8400 copper moves (plus some 200 copper waits) per frame*, plus the cost of updating the graphics in the layer. This really limits the number of bobs you can still display (my example managed only 9 bobs@32x32 pixels per frame).

The idea I posted above will also have a fairly high DMA cost (an extra bitplane and a full mask of a bitplane every two to four frames or so), but the advantage it has is that you still have the hardware sprites left to offset this a bit. I haven't done any calculations, but my gut feeling is that it'll end up being more efficient than my sprite layer.

*) I did later have an e-mail exchange with someone and it does appear the effect can be done somewhat more efficiently. Even so, it's still going to be a lot.
roondar is offline  
Old 06 July 2020, 10:37   #162
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
@mcgeezer

You can, but you'll bite out a lot of dma slots
sandruzzo is online now  
Old 06 July 2020, 10:49   #163
Master484
Registered User
 
Master484's Avatar
 
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 525
Maybe the best way to create the feeling of smoothness and speed would be to make the player ship with sprites, and then use an interrupt to move it.

This way the player ship will always move at 50 FPS, no matter how slow the game gets.

So 4 sprite channels for the ship, and the remaining channels can be multiplexed to make some of the bullets.

This change alone would probably improve the game speed to a more or less steady 25 FPS, with the player ship moving at 50 FPS.

Many of the best Amiga shmups run in this kind of 50/25 FPS combination mode: Battle Squadron, Project-X, Blastar, R-type, and so on, and all of them feel smooth, because the Player Ship moves at 50 FPS.
Master484 is offline  
Old 06 July 2020, 10:56   #164
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
If you're willing to reduce a little bit screen area, It could be done by sprites.
sandruzzo is online now  
Old 06 July 2020, 11:19   #165
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,211
Quote:
Originally Posted by Master484 View Post
So 4 sprite channels for the ship, and the remaining channels can be multiplexed to make some of the bullets.
what about all the cannon attachments ?
DanScott is offline  
Old 06 July 2020, 13:04   #166
chb
Registered User
 
Join Date: Dec 2014
Location: germany
Posts: 439
Quote:
Originally Posted by mcgeezer View Post
Hybris and Apidya don’t use parallax scrolling.
Just on a side note: Apidya does have parallax scrolling in the last level (the one with the cogwheels in the bg), and it's pretty impressive - a multiplexed 4 color sprite background, which is even animated. Plus a lot of action going on in the foreground, but probably not X2 level.

The animation is really clever btw - as you need shifted copies of your background for the sprite layer anyway, you can as well make an 8 frame long animation at no additional memory cost. Works of course only if scrolling speed is constant, as animation frame rate is coupled to scrolling frame rate. You see this is Apidya: when scrolling slows down, the bg animation does so, too.
chb is offline  
Old 06 July 2020, 14:05   #167
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Quote:
Originally Posted by chb View Post
Just on a side note: Apidya does have parallax scrolling in the last level (the one with the cogwheels in the bg), and it's pretty impressive - a multiplexed 4 color sprite background, which is even animated. Plus a lot of action going on in the foreground, but probably not X2 level.

Yes, I'll let agree with you that Apidya does have parallax, but the parallax doesn't span more than 128px wide which would not be suitable for Xenon 2.
mcgeezer is offline  
Old 06 July 2020, 15:02   #168
chb
Registered User
 
Join Date: Dec 2014
Location: germany
Posts: 439
Quote:
Originally Posted by mcgeezer View Post
Yes, I'll let agree with you that Apidya does have parallax, but the parallax doesn't span more than 128px wide which would not be suitable for Xenon 2.
Yes, you can have only 128 individual background pixels, at least if you don't reload the SPRDAT registers (roondar's approach), which is totally flexible, but costs you quite some performance.

Still, there are important differences between a horizontal scrolling game and vertical scroller like X2:

With a h-scroller, the sprite content "spills over" to the next sprite, so you're tied to an "1234567812345678" arrangement (whole 128pix patterns repeats). When you scroll vertically, that's not the case, so in principle you can have more complex patterns, like "1234111112345678" or the like - still having only 8 individual 16-pix patterns per line. Or less, if you choose to retain some sprites for the star field or other stuff.

Addionally, X2 has quite often large black gaps in the background, which makes a sprite background more efficient. As you scroll only vertically, every bg line is completly static and can be optimized.

In the end, you might end up with something that's not 100% identical to X2, but looks good enough and is quite efficient. Not easy to do tho for sure.
chb is offline  
Old 06 July 2020, 16:19   #169
Hewitson
Registered User
 
Hewitson's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,772
Quote:
Originally Posted by Galahad/FLT View Post
Both also don't have remotely as many things going onscreen either.

When Xenon 2 gets hectic, it gets VERY hectic.
If the game slowed down when things got "hectic" that would be one thing. But the fact is that the game runs like a slideshow even when absolutely nothing is happening. It is honestly one of the worst examples of coding available on the Amiga.
Hewitson is offline  
Old 06 July 2020, 16:39   #170
Master484
Registered User
 
Master484's Avatar
 
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 525
Quote:
what about all the cannon attachments ?
Indeed, those small parts that attach to the player ship would be somewhat tricky to implement in my idea. I guess they would either need to be part of the player sprite, which would generate a lot of chip mem eating extra animation frames, or then the remaining sprites would need to be used for them.
Master484 is offline  
Old 06 July 2020, 17:03   #171
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
For Oldtower Porting for Amiga, I'm using Sprites to do parallax. I have 13 colum to fill with them attached. Using them is helping to do faster blitting since background is allmost black. Even Sprites Parallax scrolling is very easy: just by changing sprites' pointer, and control words!
sandruzzo is online now  
Old 06 July 2020, 17:14   #172
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Quote:
Originally Posted by Hewitson View Post
It is honestly one of the worst examples of coding available on the Amiga.
It's not the worst or the best so a bit of an over-reaction giving that the coders in the thread are mulling it over given the game design it is certainly outside of the Amiga's (A500) comfort zone.

You don't have to convince me though about the game play as I hate it, but I'm starting to appreciate what they (The Assembly Line) did and why they did it, more importantly I'm beginning to understand why they didn't improve the Amiga version over the ST version.

This isn't your typical lazy ST port for sure.
mcgeezer is offline  
Old 07 July 2020, 11:15   #173
Tigerskunk
Inviyya Dude!
 
Tigerskunk's Avatar
 
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,770
Quote:
Originally Posted by mcgeezer View Post
This isn't your typical lazy ST port for sure.
But isn't it basically the same?

Why isn't it faster the the ST version if they used the Blitter, I wonder?
Tigerskunk is offline  
Old 07 July 2020, 12:01   #174
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Quote:
Originally Posted by Steril707 View Post
But isn't it basically the same?

Why isn't it faster the the ST version if they used the Blitter, I wonder?
I can't say for sure but I suspect the game slows down less on the Amiga.
mcgeezer is offline  
Old 07 July 2020, 12:14   #175
Tigerskunk
Inviyya Dude!
 
Tigerskunk's Avatar
 
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,770
If I were to try to remake this, I'd probably go for 5 bitplanes and 25 fps.
4 bitplanes for the foreground, and then do that trick used by James Pond where the 5th bitplane is parallaxing.
That plane would only have 1 colour, but maybe you could make that look good enough, since it's pretty heavy on contrast anyway.

Plus triple buffering should give you enough objects on screen.
Not sure though if you had enough RAM then for all animations and tiles.
Tigerskunk is offline  
Old 07 July 2020, 13:28   #176
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
If you triple buffer then u have to do it with everything, background and foreground. Add that 5th bitplane and it probs doesnt fit into 512kb chip ram.
mcgeezer is offline  
Old 07 July 2020, 14:14   #177
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,211
I would be interested to know what they used the blitter for, as from what I can tell it runs identically to the ST version (perhaps the ST version slows down more, but the base speed appears to be the same or similar).

I think it's a fact that this game could have been running much quicker.. probably at a constant 25fps given that it's only in 16 colours.
DanScott is offline  
Old 07 July 2020, 16:20   #178
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Quote:
Originally Posted by DanScott View Post
I would be interested to know what they used the blitter for, as from what I can tell it runs identically to the ST version (perhaps the ST version slows down more, but the base speed appears to be the same or similar).

I think it's a fact that this game could have been running much quicker.. probably at a constant 25fps given that it's only in 16 colours.
It uses the Blitter for just about everything.

Try this poke in WinUAE to turn it from the pile of shit it is into a super top notch shooter:

Break into Winuae with Shift + F12

Code:
W 1835 00
W 185d 00
W 7adc 4e 71 4e 71 4e 71 4e 71
x

Break into Winuae again
W dff180 00 00 00 00 00 00 00 00
x
Enjoy.
mcgeezer is offline  
Old 07 July 2020, 16:36   #179
Tigerskunk
Inviyya Dude!
 
Tigerskunk's Avatar
 
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,770
Quote:
Originally Posted by mcgeezer View Post
If you triple buffer then u have to do it with everything, background and foreground. .
Maybe I am missing something here, but couldn't you just blit the foreground tiles into the triple buffer and restore blit only 4 planes instead of 5 in BLTSIZE?

Seems pretty straight forward to me (unless I am wrong )
Tigerskunk is offline  
Old 07 July 2020, 16:49   #180
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Quote:
Originally Posted by Steril707 View Post
Maybe I am missing something here, but couldn't you just blit the foreground tiles into the triple buffer and restore blit only 4 planes instead of 5 in BLTSIZE?

Seems pretty straight forward to me (unless I am wrong )
I think I see what you mean now.

You mean just have a separate 5th plane and vertical scroll that, yeah should work.
mcgeezer is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Critical Mass by Parallax, what machine will it run on? Leffmann support.Demos 16 11 August 2021 19:41
Lionheart Parallax question trydowave Retrogaming General Discussion 19 03 February 2020 08:24
Parallax scrolling layer with sprites possible? phx Coders. Asm / Hardware 21 12 July 2015 18:15
Parallax scrolling meant nothing to me until... killergorilla Amiga scene 26 12 February 2006 16:40
Parallax scrolling in DPaint (tutorial) Stein Retrogaming General Discussion 2 17 January 2006 22:18

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:41.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.43670 seconds with 16 queries