RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
Question regarding alpha blending...
 
Post new topic Reply to topic Goto page 1, 2  Next 
View previous topic - View next topic  
Author Message
Nodtveidt
Demon Hunter


Joined: 11 Nov 2002
Posts: 786
Location: Camuy, PR

PostPosted: Sat Jul 10, 2004 7:15 am    Post subject: Question regarding alpha blending... [quote]

I'm not exactly sure which way to go on this, so I'm asking here. I've written an extension of TinyPTC for Windows, including sprite blitters and all primitives that can, in addition to their normal functions, perform alpha blending. The question I have is this: is it more proper to add the weight to the source pixels or the overlay pixels? (as in...is it better to multiply the alpha factor by the source pixels, or the inverse of the alpha factor to the source pixels?) Like...if my alpha factor is .7, would the source be multiplied by .7 or .3?

I plan to use this new graphics library in an upcoming AD&D-rules-style RPG called Rise Of The Lich, which will be my first-ever C-coded RPG for Windows (the TG16 port of WOS is also coded in C, but it's HuC for the 6280 architecture).
_________________
If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
Back to top  
Rainer Deyke
Demon Hunter


Joined: 05 Jun 2002
Posts: 672

PostPosted: Sat Jul 10, 2004 8:28 am    Post subject: [quote]

The standard formula is 'dest * (1 - alpha) + source * alpha', where 'source' is the pixel you're drawing and 'dest' is the previous value of the destination pixel. However, if you're writing your own blitting code you might want to premultiply and use 'dest * (1 - alpha) + source' or even just 'dest * alpha + source', as this can make things considerably faster.
Back to top  
Nodtveidt
Demon Hunter


Joined: 11 Nov 2002
Posts: 786
Location: Camuy, PR

PostPosted: Sat Jul 10, 2004 2:50 pm    Post subject: [quote]

OK so the pixel I'm "overwriting" gets the inverse. Cool, thanks. :D As far as optimization goes...good idea :) I haven't gotten that far yet but I'll be sure to speed it up a bit (at present, my BMP alpha overlay routine is a tad slow even at 320x240 because it's not optimized at all).
_________________
If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
Back to top  
biggerUniverse
Mage


Joined: 18 Nov 2003
Posts: 326
Location: A small, b/g planet in the unfashionable arm of the galaxy

PostPosted: Sat Jul 10, 2004 5:38 pm    Post subject: [quote]

Actually there's quite an awesome article over at GameDev:

http://www.gamedev.net/reference/articles/article817.asp

This one presents several methods and gives some pros and cons as well as stats on each.
_________________
We are on the outer reaches of someone else's universe.
Back to top  
cloudchild
Fluffy Bunny of Doom


Joined: 09 Jul 2004
Posts: 18
Location: PANTS!

PostPosted: Mon Jul 12, 2004 3:12 pm    Post subject: [quote]

why 2nd ed? why not 3rd ed?
_________________
BOOGA!
Back to top  
Nodtveidt
Demon Hunter


Joined: 11 Nov 2002
Posts: 786
Location: Camuy, PR

PostPosted: Mon Jul 12, 2004 7:15 pm    Post subject: [quote]

Because:

1. Second edition is the one I'm most comfortable with.

2. I've already invested thousands of dollars in manuals, and don't have the cash at the moment to do that again.

3. Is it just me...or is third edition more focused on combat than any other version? I dislike that. :(
_________________
If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
Back to top  
Ninkazu
Demon Hunter


Joined: 08 Aug 2002
Posts: 945
Location: Location:

PostPosted: Mon Jul 12, 2004 7:30 pm    Post subject: [quote]

1st edition is better than anything else in the entire world (except food and sex... well, it's better than some food). There's nothing you can say to change this fact (yes, fact).

Grah.
Back to top  
Nodtveidt
Demon Hunter


Joined: 11 Nov 2002
Posts: 786
Location: Camuy, PR

PostPosted: Mon Jul 12, 2004 7:44 pm    Post subject: [quote]

Probably better than all my ex's cooking. :D
_________________
If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
Back to top  
cloudchild
Fluffy Bunny of Doom


Joined: 09 Jul 2004
Posts: 18
Location: PANTS!

PostPosted: Mon Jul 12, 2004 7:55 pm    Post subject: [quote]

yeah well chainmail ownz you all (and if you don't know what chainmail is, then heh, i roxerz).

2nd ed is good I've played it the longest. But 3rd Ed is much more streamlined. I thought ALL versions of D&D (with or without the A) where heavily combat focused. I mean, compared to games like Vampire, Call of Cthulu, Amber Throne, Ars Magica, BESM, etc etc etc
_________________
BOOGA!
Back to top  
Nodtveidt
Demon Hunter


Joined: 11 Nov 2002
Posts: 786
Location: Camuy, PR

PostPosted: Mon Jul 12, 2004 9:16 pm    Post subject: [quote]

Anyone remember Danny Gump of Virtuasoft (made Dash, DashX, and some modex library which was used in MUX)? Looks like he's trying to make a living off of selling chain mail. No idea how well he's doing.
_________________
If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
Back to top  
grenideer
Wandering Minstrel


Joined: 28 May 2002
Posts: 149

PostPosted: Wed Jul 14, 2004 12:18 am    Post subject: [quote]

To reveal myself as a big nerd, I'd say 2nd edition is the best overall. !st edition is awesome - don't get me wrong, but it went a little wacko with the tables and stuff like that. 2nd edition was very cool, got technical when it needed to, and had a LOT of expansions for it (1st did too, in fairness). 3rd edition is VERY streamlined and combat-oriented, and I dislike it, but maybe it's cause I'm used to the older ones.

Any rpg is really as combat-oriented as the players playing, though.
_________________
Diver Down
Back to top  
Rainer Deyke
Demon Hunter


Joined: 05 Jun 2002
Posts: 672

PostPosted: Wed Jul 14, 2004 6:13 am    Post subject: [quote]

My impression of 3rd edition is that it fixes many of the problems that plagued 2nd edition. For example, the multiclassing system in 3rd edition seems much more sane and balanced, and the skills system in 3rd edition also seems superior to the proficiency system in 2nd edition. However, it's entirely possible that 3rd edition introduces as many problems as it fixes, and I just haven't found those problems yet.
Back to top  
Nodtveidt
Demon Hunter


Joined: 11 Nov 2002
Posts: 786
Location: Camuy, PR

PostPosted: Wed Jul 14, 2004 7:03 am    Post subject: [quote]

My only "real" experience with AD&D video games by SSI is Pool Of Radiance. It was a little weird, had some weird errors and omissions...for example, fighters advanced levels as a paladin would, and held monsters and characters could be slain instantly even if others were present (as per these Hold spells, as most AD&D nerds [like me! hehe] know, you can only slay a held person or monster if no one else is fighting, otherwise the attack is automatic without an attack roll). And of course...the complete lack of the proficiency system (no thieving skills either!) made the game completely focused around combat with only a meager storyline (Tyranthraxus was quite badass though). I guess I kinda lost interest in SSI's games when I saw a promo shot for a new one showing a character development dialog...and allowing Gnome Paladins. Blatant defiance for both the core rules and just plain common sense.

I was a dungeon master for many years, and my friend Charlie and I worked on our own realm for a few years. He designed most of the pantheon, I developed most of the lands. I continued to work on it after he went away to university (and never saw him again). I don't play anymore (especially down here, heh) so this game project is my way of getting back into the spirit of AD&D. We called the world Do-Tar (named after the supreme evil being in Exile II: Wicked Phenomenon) and split the campaign into three major time areas: the Rise Of The Lich (which this game project is based on; the introduction of undead into the realm and the coming of the powerful undead sorceror), the War Of The Light (my old Monolith RPG project was based on this; it was the battle between Drex, the 400 foot tall tyrant ruler, and Raiden, a "chosen warrior" who was destined to machinate Drex's demise), and The Descent Into Darkness (during this time period, the great god Elaxill has been outwitted by Damballa, the evil god of nightmares, pain and strife; darkness has engulfed the realm and the world is in utter chaos until the time of Elaxill's return, when he will punish Damballa for his betrayal).

Well anyways...I guess I could ramble on about this kinda stuff all night. :) What can I say...I love AD&D. :D

(Just a bit of history as well...for anyone who's played The Wrath Of Sona...that storyline takes place between the Rise Of The Lich and the War Of The Light...when Jareth sees the world reshaping itself inside the Palace Of The Gods, he's looking at the way Do-Tar shapes itself into its prominent form; the Stone Dynasty ends several hundred years later when Reznor The Crusader is defeated by Damballa and twisted into the ultimate evil warlord who, with the assistance of his godlike creation Drex, conquers most of the realm...only to be betrayed by his own creation three hundred years later, thus ending the Crusade and beginning the Tyranny Of The Monolith.)
_________________
If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
Back to top  
cloudchild
Fluffy Bunny of Doom


Joined: 09 Jul 2004
Posts: 18
Location: PANTS!

PostPosted: Wed Jul 14, 2004 5:09 pm    Post subject: [quote]

heh i too loved 2nd ed, played it most of my life (imainly cause it was around longer...1st ed was barely around before 2nd ed took over...although i love the 1st ed covers, esp the DM guide with that terrible art work, snicker), but 3rd ed is better.

It is not any more combat oriented than 2nd ed, in fact, in some ways it's less combat oriented.

Anyway, I thought you might be interested in this->
http://www.kuro5hin.org/story/2004/4/10/231927/504

and, a game I'm working on also takes place in a world originally played in by my friends and I's campaign.
_________________
BOOGA!
Back to top  
Nodtveidt
Demon Hunter


Joined: 11 Nov 2002
Posts: 786
Location: Camuy, PR

PostPosted: Sat Jul 17, 2004 12:53 am    Post subject: [quote]

Great article, but it's obvious from the first few paragraphs what the real problems are...

-Bad design sense.
-Programmers unfamiliar with the rules.
-An overall lack of love for the game.
-Using a prebuilt system that doesn't meet the needs of such a game.

SSI managed to pull off some great AD&D games. Like I said before, Pool Of Radiance is simply awesome...it's now over 15 years old and I still play it. :)

You got a website or any info on this game you're working on? It'd be great to see some info on it. :D
_________________
If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
Back to top  
Post new topic Reply to topic Page 1 of 2 All times are GMT
Goto page 1, 2  Next 



Display posts from previous:   
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