English Amiga Board


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

 
 
Thread Tools
Old 24 December 2023, 22:12   #1
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,386
is it possible to use multiplexed sprite to display/scroll this image?

This is a background pic with 3 colors, not repeating


Click image for larger version

Name:	bg2.png
Views:	124
Size:	1.9 KB
ID:	81136


Can I multiplex X number of sprites to create a fake background layer?


Or do I have to blit / use dual playfield, knowing that there's another scrolling layer (3 different parallax layers)
jotd is offline  
Old 24 December 2023, 22:48   #2
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,438
Well, I'd say it depends on the number of active bitplanes. If it's 4 or less, you can create a Sprite based background that has no repeating patterns in it by reloading Sprite DATA/DATB and the position with the Copper. If it's 5 bitplanes or over, it's going to be much harder, if not impossible (though it may still be possible if you are clever about how you reload the Sprites - if some of the Sprites stay the same, you might be able to make it fit).

I've done this for a 4 bitplane screen in one of my Amiga Tech examples, found here: https://powerprograms.nl/amiga/spr-layer.html

However, the effect is quite costly so if most of the background is the same colour as it seems to be in your example, make sure to not do that for those lines

Of course, if you limit yourself to a 128 pixel wide pattern, it becomes much easier.
roondar is offline  
Old 25 December 2023, 00:56   #3
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,187
Question It depends!

First of all, I would redraw that slightly, as almost all of the bottom part is a single colour, and if you stripped out that extra dark blue bit hanging down, you'd be down to 256x48 rather than probably have a layer that's more like 256x128.

In one of my projects, I was able to switch the top part of my display to 16 colour mode (most of it is in 32 colours) which gave me enough DMA time to do the panel at the top completely with sprites. So it really depends how many colours you're using for the display.

Even if you failed to make a complete sprite layer, you could always do a combination by using sprites as much as you can, maybe reposition some of them, and do a blit for the small part you couldn't get done with sprites alone.

The other thing I would consider is simplifying the pattern above so that it does repeat. Assuming your game scrolls and you lose the 8th sprite, you could still make a 7 sprite wide background layer and repeat it with a few copperlist moves. If you have enough memory, you could precalculate all necessary combinations (a la Risky Woods) and then wouldn't even have to scroll it.

Basically it all just depends on how many colours you're using, how much spare memory you have, if you have all 8 sprites available or just a few, how much spare DMA time you have etc etc.
Attached Thumbnails
Click image for larger version

Name:	moon_patrol_bg.png
Views:	59
Size:	4.5 KB
ID:	81137  
Codetapper is offline  
Old 25 December 2023, 01:05   #4
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,187
Thumbs up No need for a full sprite layer

Assuming this is for a Moon Patrol conversion, if you look at the graphics, the back blue mountains layer hardly interacts with the green hills layer anyway - those 2 could share the same layer, switching from blue mountains at the top and then becoming the green layer underneath.

There'd only be a tiny part with some random blue pixels that could be done with a few random sprites to fake the entire thing being 2 independent layers. There's literally no need for a full sprite layer imho. Fake it until you make it!
Attached Thumbnails
Click image for larger version

Name:	moon_patrol.png
Views:	112
Size:	5.4 KB
ID:	81138  
Codetapper is offline  
Old 25 December 2023, 14:10   #5
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,386
Yes, I was considering Moon Patrol and I don't care about the solution as long as it works.

I would like to use dual playfield if number of colors is enough, even if sprites can be used to add more colors too. In which case not using sprites for mountains would be better.

Anyway, funny how a simple 1982 game is a challenge for ECS or even AGA amiga!
jotd 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
Smooth Scroll and Sprite Channel 7 Shatterhand Coders. Blitz Basic 5 22 December 2023 23:40
displaying multiplexed sprites using the copper jotd Coders. Asm / Hardware 8 22 January 2022 13:07
Sprite editor: software to convert image to C code Toki Coders. Language 5 28 June 2020 11:36
Sprite priority on display. Shatterhand Coders. Blitz Basic 28 15 January 2020 22:57
Changing sprite images in long display lists phx Coders. Asm / Hardware 2 12 March 2016 20:13

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 10:26.

Top

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