English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 13 August 2013, 16:01   #1
diablothe2nd
Registered User
 
Join Date: Dec 2011
Location: Northamptonshire, UK
Age: 42
Posts: 1,236
Tinting Greyscale Sprite Sheets?

Is this possible?

instead of manually drawing out a red, blue and green tile from a spritesheet is it possible to just call the spritesheet and have either the blitter (or i guess the copper?) then add the colour on the fly?
diablothe2nd is offline  
Old 13 August 2013, 18:18   #2
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,866
Quote:
Originally Posted by diablothe2nd View Post
Is this possible?

instead of manually drawing out a red, blue and green tile from a spritesheet is it possible to just call the spritesheet and have either the blitter (or i guess the copper?) then add the colour on the fly?
Sure, but not with the Copper.

Say each tile uses four shades. What you do is define your palette like this:
Code:
Color nr: 0   1   2   3   4   5   6   7   8   9   10  11  12  13  14  15
          x   x   x   x   red red red red gre gre gre gre blu blu blu blu
The uncolored tiles use two bitplanes, for four shades, so all you have to do now is have the blitter write two extra bitplanes like this:
Code:
Tile data:            0000111100001111 plane 0
	              1100110011001100 plane 1
Color select for red: 1111111111111111 plane 2
                      0000000000000000 plane 3
So basically the extra data you write combines with the tile data to create the full 16 color indexes.

Hope that made some sense

Last edited by Thorham; 13 August 2013 at 18:30.
Thorham is offline  
Old 13 August 2013, 18:36   #3
diablothe2nd
Registered User
 
Join Date: Dec 2011
Location: Northamptonshire, UK
Age: 42
Posts: 1,236
I think I get it.

I'm imagining it sort of like a Worms map, where the terrain uses only 4 colours, but instead of drawing the mud and rock for each "themed map" i could just adjust the colour of the tileset, needing less tile variations and thus, less tiles needing to be loaded in ram.

now the bigger question... using this technique, its it possible to tweak the tint on the fly? think of it like a downfall type digging game, but as you get deeper and deeper the colour hue of the tiles change?
diablothe2nd is offline  
Old 13 August 2013, 18:57   #4
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,866
Quote:
Originally Posted by diablothe2nd View Post
I'm imagining it sort of like a Worms map, where the terrain uses only 4 colours, but instead of drawing the mud and rock for each "themed map" i could just adjust the colour of the tileset, needing less tile variations and thus, less tiles needing to be loaded in ram.
If you're not mixing tiles of different colors, you can just change the colors in the palette directly.

Quote:
Originally Posted by diablothe2nd View Post
now the bigger question... using this technique, its it possible to tweak the tint on the fly? think of it like a downfall type digging game, but as you get deeper and deeper the colour hue of the tiles change?
Sure. If you do it like in my example, you could have three different hue levels by defining them in the palette.

If you want very smooth hue transitions, you can use the Copper to change the four tile colors per scan line. But that only works for your 'going deeper and deeper' example.
Thorham is offline  
Old 13 August 2013, 20:28   #5
diablothe2nd
Registered User
 
Join Date: Dec 2011
Location: Northamptonshire, UK
Age: 42
Posts: 1,236
Excellent! Thanks for the advice

I've yet another idea for a game ("lol! not ANOTHER one!?" I hear you guys cry). My problem is choosing a game type that's on par with my programming level, but will still offer a challenge as i learn more while making it. so if i made a digging game going deeper and deeper i could use a lot of cue's from Downfall to get me started then maybe work toward that colour change as a long term "for added polish" type of goal

so cheers!
diablothe2nd 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
Settlers sprite zdechlak project.Sprites 1 02 March 2019 10:55
sprite overscan jamiejamie Coders. General 11 02 February 2011 16:59
DIWSTART and sprite Camionsauro Coders. Tutorials 3 22 April 2009 13:24
some .cue sheets Thalion request.Other 2 30 October 2008 07:55

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 22:07.

Top

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