Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Mixed Blessings
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Soapbox
View previous topic :: View next topic  
Author Message
Joe Man




Joined: 21 Jan 2004
Posts: 742
Location: S. Latitude 47°9', W. Longitude 123°43'

PostPosted: Sat Apr 08, 2006 1:03 pm    Post subject: Reply with quote

Yeah, I'm familiar with bitmap transparency. Just throwing something out there to possibly be added one day.
Back to top
View user's profile Send private message Send e-mail
Kizul Emeraldfire
Type: Cyber Dragoon




Joined: 26 Mar 2004
Posts: 229

PostPosted: Sun Apr 09, 2006 8:41 am    Post subject: Reply with quote

Hmm, I was sorta thinking of the layers a whole different way. I was sorta thinking that each layer could be a different tileset. You'd be able to add/remove layers in Edit Maps -> <map> -> Add/Remove Tile Layers (or just Add/Remove Layers). By default, each map would have one tile layer (the base layer), and you could add layers above and below it. By default, all tiles on one tileset are opaque.

However, if you wanted to get jiggy with some layers in your game, here's how I was thinking that would work (we'll use the standard 'Tree-over-an-NPC' example). Here is the tree tile:


We want it to be drawn mostly over the NPC:


However, as is shown here — that's quite impossible the way the tile is right now. :)


So, we go back the the main menu and go to Edit Graphics > Edit Maptiles > Tile Set x > Draw Alpha Map (or something. Maybe Draw Transparency. I dunno what to call it exactly! :D)


By default, all tiles are opaque, so we black out the stuff we don't want to see over the NPC sprite by using the black-to-white bar at the bottom of the palette thing (but don't worry, you won't see the black you just scribbled onto the tile when you go to the Draw Maptiles menu and edit it! :D). Black makes it invisible, white makes it completely visible. This would also allow us 14 shades of opacity (the superdark gray to the superlight gray), but let's not use those right now)!

Go out of the editor, save the changes and kick up the game.


Et voilá! The tile is only drawn over MOST of the NPC! :)

Edit: Was just thinking — since people like to use custom palettes, maybe the OHR could have a built-in 256-color black-to-white palette that's only used when you went to draw the Transparency stuff, and for calculating it as well. Just a 100% grayscale palette of 256 colors or something, that way you'd be able to have larger control over the transparency/opacity of the tile/sprite you're working on. :/ Just a thought! :D
Back to top
View user's profile Send private message Yahoo Messenger
Joe Man




Joined: 21 Jan 2004
Posts: 742
Location: S. Latitude 47°9', W. Longitude 123°43'

PostPosted: Sun Apr 09, 2006 1:39 pm    Post subject: Reply with quote

If you were paying attention, which you clearly weren't, adjusting opacity will definately not be an option (though you may have been thrown off by alternate terms) in the near future. Sorry, but you'll have to wait for Jormungand, if it ever is implemented.
Back to top
View user's profile Send private message Send e-mail
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Mon Apr 10, 2006 6:08 am    Post subject: Reply with quote

Jormungand will have the same restrictions. It's not that we're lazy, or the language is incapable of it, it's that we're stuck in 256-color mode for the time being.

Anyway, Ked, would it be acceptable if instead of using colour #0 for transparency, we instead allow you to choose which colour your use? I.e. you could pick any colour in the palette to be transparent.
_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Mon Apr 10, 2006 7:12 am    Post subject: Reply with quote

Mike Caron wrote:
Jormungand will have the same restrictions. It's not that we're lazy, or the language is incapable of it, it's that we're stuck in 256-color mode for the time being.

Anyway, Ked, would it be acceptable if instead of using colour #0 for transparency, we instead allow you to choose which colour your use? I.e. you could pick any colour in the palette to be transparent.


I still like a 1-bit transparency bitmap that is unrelated to the pixels in the image.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Kizul Emeraldfire
Type: Cyber Dragoon




Joined: 26 Mar 2004
Posts: 229

PostPosted: Mon Apr 10, 2006 9:50 am    Post subject: Reply with quote

Joe Man wrote:
If you were paying attention, which you clearly weren't, adjusting opacity will definately not be an option (though you may have been thrown off by alternate terms) in the near future. Sorry, but you'll have to wait for Jormungand, if it ever is implemented.


Well, for right now, we could just use colors 0 and 16, I was just giving my 2 cents-worth. :)
Back to top
View user's profile Send private message Yahoo Messenger
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Mon Apr 10, 2006 12:52 pm    Post subject: Reply with quote

James Paige wrote:
Mike Caron wrote:
Jormungand will have the same restrictions. It's not that we're lazy, or the language is incapable of it, it's that we're stuck in 256-color mode for the time being.

Anyway, Ked, would it be acceptable if instead of using colour #0 for transparency, we instead allow you to choose which colour your use? I.e. you could pick any colour in the palette to be transparent.


I still like a 1-bit transparency bitmap that is unrelated to the pixels in the image.


But, why? We use the colour-based system in sprites, and it seems to work ok. This is the same thing, except that there's more colours overall, and you don't have to worry about being able to make tiles with only 255 colours.

I cannot think of any other program that uses a mask for doing transparency. Either way, the algorythms would be the same:

Mask Based:
Code:

For x = 0 to sprite.width - 1
  for y = 0 to sprite.height - 1
    if sprite.mask[y * sprite.width + x] then buffer[(dy + y) * buffer_width + (dx + x)] = sprite.data[y * sprite.width + x]
  next
next


Colour based:
Code:

For x = 0 to sprite.width - 1
  for y = 0 to sprite.height - 1
    if sprite.data[y * sprite.width + x] = trans_colour then buffer[(dy + y) * buffer_width + (dx + x)] = sprite.data[y * sprite.width + x]
  next
next


In fact, if we use colour 0, then we can optimize it by using Allegro's blitting routines, which are optimized for colour based transparency.
_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Gizmog1
Don't Lurk In The Bushes!




Joined: 05 Mar 2003
Posts: 2257
Location: Lurking In The Bushes!

PostPosted: Mon Apr 10, 2006 4:14 pm    Post subject: Reply with quote

What about old games where people used color 0? Would we have a bitset or something in the game, "ENABLE TRANSPARENCY ON MAP?" or "ENABLE TRANSPARENT TILES?"
Back to top
View user's profile Send private message Send e-mail AIM Address
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Mon Apr 10, 2006 5:22 pm    Post subject: Reply with quote

Well, we (or, I) was thinking a bitset to solve the first problem I mentioned, of the overhead tiles.

Otherwise, drawing the tiles solid, or drawing them transparent with a solid black background is the same.
_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Soapbox All times are GMT - 8 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group