English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. AMOS

 
 
Thread Tools
Old 29 June 2013, 20:17   #1
Kenan
Registered User
 
Kenan's Avatar
 
Join Date: Apr 2013
Location: Rijeka, Croatia
Posts: 194
Sprite colors all mixed up

Posted this on the AMOS forums but no reply so far..so was thinking of giving it a shot here:

Hello!

I'm currently reading the AMOS manual (I have a 2.0 Amos Pro) and so far couldn't find the answer to my problem. When I load up the sprite in Amos using the Sprite and Get Sprite Palette commands, the colors of the sprite are mixed up, they do not match the prefered ones in Object Editor. Same happens if I grab sprite images from an IFF file - in the Object Editor colors are fine but as soon as I load it in Amos, what was once say, a green sprite, it's now purple etc.

What am I doing wrong and how do I fix this problem?

Thanks in advance.

p.s.
Not sure if it matters, I'm running Amos on my real A1200 with an ACA1220 accelerator (hard disk install).
Kenan is offline  
Old 29 June 2013, 21:43   #2
Amiten
Banned
 
Join Date: May 2011
Location: Spain
Posts: 519
Ok, the quick way is after you made the sprites/bobs in Deluxe paint grab each one in the Amos object editor and also width the same palette/resolution you use for these object make a background image, after the object grab load iff as background image and them show your sprite/bobs in the screen and the result must be ok in colours aspect, dont need to get spritte palette calls, feel free to askme more help if you want , hope you can continue explorer The great Amos

Remember Amiga sprites only are 16 pixel wide bigger than that is a Bob so if you try to show a bob like a sprite maybe you can get rong color or other issues...

Also max sprite colour are 8 , sprites its ok for misils, or similar small forms who need move very quick or like that, but I not usually use sprites for me bobs are better in major cases, big dimensions colours and moving using Amal its all smooth fast i need

Last edited by prowler; 30 June 2013 at 21:06. Reason: Back-to-back posts merged.
Amiten is offline  
Old 30 June 2013, 05:51   #3
fishyfish
Banned
 
Join Date: Jul 2010
Location: Australia
Posts: 475
Sprites use color registers 16-31, so you can either define the colors manually if using a 16 color screen (sprites use a different palette, even when screen is only 16 colors), or just setup a 32 color screen and the sprites will use last 16 colors.

Sprites can actually be 16colors. Sprites 0 and 1 use registers 16,17,18,19, sprites 2/3 use 20,21,22,23, sprites 4/5 use 24,25,26,27, and sprites 6/7 use 28, 29, 30, 31.
You can however mix channels and have 16 color sprites, but you lose 1/2 the sprite channels (4x4bit color instead of 8x2 bit color). One color however, regardless of color depth will be transparent.

While theyre technicaly only 16 pixels wide and only allow 8 you can multiplex them which allows "unlimted" 64 pixel wide sprites (4 channels * 16). When doing this however youre restricted to 64 pixels per scan line (and in multiples of 16 (eg. cant have a 44 pixel wide sprite + 20 pixel wide sprite on same scanline, but can have 1x48+1x16)). This width is doubled when using 2bit color sprites (4 color). You can mix 4 and 16 color sprites, but I advise against it as it gets hard to keep track of what channels are used where, especially when using multiplexed sprites.

To multiplex sprites in AMOS you just need to use sprite "channel" 8 and above. Amos will do the hard work for you. For every channel you use between 0 and 7 you lose some width for multiplexing.

Sprites really are more useful than theyre given credit for and can reduce the amount of bobs needed, making for less blitter work required saving time for bobs and scrolling.
fishyfish is offline  
Old 30 June 2013, 13:19   #4
Amiten
Banned
 
Join Date: May 2011
Location: Spain
Posts: 519
Rectify. Amiga supports. 16 pixel wide up to 255 high and max 8. Of 3xcolours sprites and 4 of 15xcolours sprites colour number 0 are transparent, computed sprites can vary between 16 and 128 pixel wide

16*8=128 pixel 3 colours

16*4=64 pixel for 15 colours

Sprites

Edit: Forget to mention max objects(computed sprites) at same time in the screen its limited to 64.

Last edited by prowler; 30 June 2013 at 21:05. Reason: Back-to-back posts merged; please use Edit button.
Amiten is offline  
Old 04 January 2016, 22:08   #5
volvo_0ne
Registered User
 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
All this is very interesting, but how do I get a 15 colour sprite in the first place?

My images are created with the AP object editor in 16 colour mode and output to a 16 colour screen in AMos, However it only ever shows the sprite in 3 colours.

scratches head........
volvo_0ne is offline  
Old 04 January 2016, 22:18   #6
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
if they are really sprites and not bobs, bear in mind they use the upper 16 colours in the palette, that is, colours 17 to 31. They should appear the same even on a 2 colour screen, because sprites are independent of the screen.

Also since a 16 colour sprite is two sprites joined together, make sure you only use even sprite numbers.
Mrs Beanbag is offline  
Old 04 January 2016, 22:32   #7
volvo_0ne
Registered User
 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
Quote:
Originally Posted by Mrs Beanbag View Post
if they are really sprites and not bobs, bear in mind they use the upper 16 colours in the palette, that is, colours 17 to 31. They should appear the same even on a 2 colour screen, because sprites are independent of the screen.

Also since a 16 colour sprite is two sprites joined together, make sure you only use even sprite numbers.
Thanks Mrs Beanbag.
Yes it is a sprite (not Bob) 16x16 px in 16 colours.


It gets more curious........
i copied the lower 16 colours to the upper 16 and now I get more than 3 colours, but still the colours are wrong(in a different way).

eg :
for i=0 to 15:colour(i+16),colour (i):next i




I'm obviously going wrong somewhere.
volvo_0ne is offline  
Old 04 January 2016, 22:33   #8
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
remember also your mouse pointer is already sprite 0, so you can't use sprite 0 or sprite 1 unless you turned the mouse pointer off.

3-colour sprites will use the following colours:
sprites 0 and 1: 17,18,19
sprites 2 and 3: 21,22,23
sprites 4 and 5: 25,26,27
sprites 6 and 7: 29,30,31
Mrs Beanbag is offline  
Old 04 January 2016, 22:41   #9
volvo_0ne
Registered User
 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
Quote:
Originally Posted by Mrs Beanbag View Post
remember also your mouse pointer is already sprite 0, so you can't use sprite 0 or sprite 1 unless you turned the mouse pointer off.

3-colour sprites will use the following colours:
sprites 0 and 1: 17,18,19
sprites 2 and 3: 21,22,23
sprites 4 and 5: 25,26,27
sprites 6 and 7: 29,30,31
Yes I hid the mouse pointer & used sprite 0, however my images in the object bank are 16 colours and they are all 16 px X 16 px

then i did get bob palette, then copied the colours as above.

getting tired now lol

Last edited by volvo_0ne; 04 January 2016 at 22:51.
volvo_0ne is offline  
Old 04 January 2016, 22:53   #10
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
I have rarely used Bobs in AMOS so this could quite possibly be wrong, but what does the BOB UPDATE command do? Does that just update the Bob positions or does that update any colours changes too??


Secondly, are you sure you are applying Get Bob Palette etc. on the correct screen? If you are using multiple screens (including hidden ones) it is easy to wonder why graphical changes are 'failing' - usually because they are being applied to the wrong screen.
Lonewolf10 is offline  
Old 04 January 2016, 23:00   #11
volvo_0ne
Registered User
 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
Quote:
Originally Posted by Lonewolf10 View Post
I have rarely used Bobs in AMOS so this could quite possibly be wrong, but what does the BOB UPDATE command do? Does that just update the Bob positions or does that update any colours changes too??


Secondly, are you sure you are applying Get Bob Palette etc. on the correct screen? If you are using multiple screens (including hidden ones) it is easy to wonder why graphical changes are 'failing' - usually because they are being applied to the wrong screen.
Hi Lonewolf.

It's a SPRITE I'm using, the reason I use get bob palette is to grab the palette from the object bank into my screen palette ready to copy the first 16 to the last 16 colours (see above)
volvo_0ne is offline  
Old 04 January 2016, 23:22   #12
volvo_0ne
Registered User
 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
Gurrrrrrrrrrrrrrrr!

Panic over

Just reloaded everyting and it now works perfectly, sorry for wasting your time people.

And many thanks!

oh and.....

HAPPY NEW YEAR!!

Last edited by volvo_0ne; 04 January 2016 at 23:23. Reason: HNY
volvo_0ne is offline  
Old 04 January 2016, 23:38   #13
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
ha! "did you try turning it off and on again?"
Mrs Beanbag is offline  
Old 06 January 2016, 23:04   #14
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
Quote:
Originally Posted by volvo_0ne View Post
It's a SPRITE I'm using, the reason I use get bob palette is to grab the palette from the object bank into my screen palette ready to copy the first 16 to the last 16 colours (see above)
Ok, but isn't there a Get Sprite Palette instruction?


Good to see you now have it working though
Lonewolf10 is offline  
Old 06 January 2016, 23:41   #15
volvo_0ne
Registered User
 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
Quote:
Originally Posted by Lonewolf10 View Post
Ok, but isn't there a Get Sprite Palette instruction?


Good to see you now have it working though
Thanks for the reply Lonewolf...

Indeed there is , but as far as I can see, Get Sprite Palette and Get Bob Palette do exactly the same thing?

Unless someone knows better?
volvo_0ne is offline  
Old 08 January 2016, 22:32   #16
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
Hmmm... That's a good question. I did download the source to AMOS Pro a few years back. I'll take a look tomorrow (if I don't forget - I have to work this weekend ).
Lonewolf10 is offline  
Old 09 January 2016, 10:39   #17
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
I think that the BOB color palette starts at zero and the sprite palette starts at sixteen.
Samurai_Crow is offline  
Old 20 January 2016, 20:40   #18
volvo_0ne
Registered User
 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
According to the AMOS manual (not pro) they are identical.
volvo_0ne is offline  
Old 20 January 2016, 21:49   #19
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
AMOS Pro manual claims Get Sprite Palette uses the upper 16 colours if using a 32 colour screen, i do have a recollection of this not working, however.
Mrs Beanbag is offline  
Old 20 January 2016, 22:11   #20
volvo_0ne
Registered User
 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
Come to think of it, how the hell do you change (colour) resolution in the AmosPro "object editor", because every time I tried and saved, the reloaded "objects" are always 16 colour.

Or am I missing something?
volvo_0ne 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
Mixed Up Amiga History gklinger Amiga scene 6 09 January 2013 23:20
Need help with Mixed-Up Mother Goose hipoonios support.Games 4 23 July 2009 19:21
Savage mixed with Blade Warrior s2325 Retrogaming General Discussion 4 24 October 2008 07:23
Mixed Ram for sale Lips2k8 MarketPlace 0 06 May 2008 13:28

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 03:16.

Top

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