[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 486: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 115: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 115: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4675: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3817)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4677: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3817)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4678: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3817)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4679: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3817)
PocketMatrix • View topic - Eye-candy
This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Eye-candy


Re: Eye-candy

Postby Malmer » May 18, 2001 @ 9:09am

We're talking about ingame RLE. To boost performance. The reason for this is that it is way faster to have the engine see "hmm...there is a transparent pixel in this sprite...how many follows it...aha...twenty...then let's skip 20 steps ahead and don't do any prosessing on those pixels."<br><br>Sortof...<br><br>// Fredrik<br>
All your base are belong to us
User avatar
Malmer
pm Member
 
Posts: 768
Joined: Apr 26, 2001 @ 5:15pm
Location: Sweden


Re: Eye-candy

Postby Malmer » May 18, 2001 @ 10:14am

So personally I don't really care about compression of the sprites. They don't use much memory/storagespace. It's more of a performance issue. <br><br>// Fredrik<br>
All your base are belong to us
User avatar
Malmer
pm Member
 
Posts: 768
Joined: Apr 26, 2001 @ 5:15pm
Location: Sweden


Re: Eye-candy

Postby Digby » May 18, 2001 @ 11:51am

I tend to be a bit anal about skipping a few pixels because I'm currently working on the inner loop of a 3D rasterizer which I'm writing in ARM assembly.  I'm always looking to skip pixels whenever possbible for performance reasons.  If textures have been created with spans of like texels (a la RLE), then there are times that I don't have to do a texture fetch.  And if it's a transparent texel then I don't have to do a lot of stuff.<br><br>Anyway, none of this is working yet but the ideas keep spewing from my melon.<br><br>Fredrik, you using pre-multiplied alpha for those sprites?<br><br>Cheers,<br>Digby<br><br>
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Re: Eye-candy

Postby SonicSilicon » May 18, 2001 @ 12:16pm

On the subject of optimizations...<br>Somewhere I heard of this wonderful idea of "pre-calculated transparency." Essentially the values that the sprite will contribute in an alpha blend is computed ahead of time and saved to a copy (or overwrite the original) that will be used in the actual composition.<br><br>Say that there is an explosion sprite. In that explosion sprite there could be full yellow pixel (r:255 - g:255 - b:0) with a bit of transparency (a:191 assuming 255 is opaque.) That pixel will not contribute the entire full bright yellow. Intead it will only contribute 191 of Red, 191 of Green, and no Blue. In pre-calculated transparency that value (r:191 - g:191 - b:0) would be stored in the sprite. When it comes time to mix the sprite with the image behind it, only what the background contributes will have to be calculated. Afterward the values from the pre-calculated transparent sprite are simply added to the result of the background's contribution.
User avatar
SonicSilicon
pm Member
 
Posts: 204
Joined: Mar 7, 2001 @ 1:36pm


Re: Eye-candy

Postby Moose or Chuck » May 18, 2001 @ 12:23pm

wow its actually becoming like a developersforum and stuff, keep up the good work. :)
Moose or Chuck
 


Re: Eye-candy

Postby Digby » May 18, 2001 @ 2:22pm

SonicSilicon,<br><br>Why you've just described premultiplied alpha! :)<br><br>In the typical alpha blending scenario, the equation for calculation the final pixel color is:<br><br>Sc = source color (sprite pixel)<br>A = alpha<br>Dc = destination color (screen pixel)<br><br>Dc = Sc*A + Dc*(1 - A)<br><br>Premultiplied alpha would be storing the result of the Sc*A calculation in the sprite pixel so you don't have to do the multiply.  The (1-A) can be precalculated, so it comes down to multiplying the screen pixel by a constant and adding the source color, then storing the result in the screen pixel.<br><br>There's lots of stuff out there on premultiplied alpha blending on the web.  I recommend the article that Alvy Ray Smith authored, "Image Compositing Fundamentals" :<br>ftp://ftp.alvyray.com/Acrobat/4_Comp.pdf<br><br>
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Re: Eye-candy

Postby Malmer » May 18, 2001 @ 2:54pm

My alpha stuff is very optimized I would say...I use no floats and no divisions just bitshifts and multiplication. <br><br>The way you described with Sc*A + Dc*(1 - A) is basically the way I'm doing it, except for the optimizations used. (So I don't have to have a float alpha of 0.5 or so). <br><br>Anyways...I noticed when I do the same sprite without alpha I don't get any performance increase, so my alpha stuff is probably quite fast. There are other things in the game that could be optimized to gain speed.<br><br>one thing that I might do is to go through the sprite image at loadtime and separate the three color channels. That would probably give me some speed increase...probably not a lot, but some.<br><br>// Fredrik<br>
All your base are belong to us
User avatar
Malmer
pm Member
 
Posts: 768
Joined: Apr 26, 2001 @ 5:15pm
Location: Sweden


Re: Eye-candy

Postby Digby » May 18, 2001 @ 4:01pm

Fredrik,<br><br>Absolutely you don't want to use floating point for these calculations for alpha blending.  I would say that you're better off using the CPU and doing calculations than creating lookup tables for alpha values. I wrote an alphablt routine years ago that used LUTs and it worked pretty well.  Doesn't carry over to this architecture though.<br><br>I think the memory bandwitdh is pretty low on these devices and you should do as much as you can to the pixel once you have it in registers.  This isn't always easy to do if you're coding in C/C++.  Still, anything you can do to minimize read/writes to RAM is going to be a win.  <br><br>If I have time this weekend, I might write some tests to see just how bad the memory bandwidth is on my iPaq.  I'll post results here (or more appropriately in the Developer Discussion area).<br><br>
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Re: Eye-candy

Postby Malmer » May 18, 2001 @ 4:33pm

I said I was not using floating point. Think you misunderstood my post. ;)<br><br>My stuff is all integers. All the way through. And I'm using bitshifts whenever possible  (bitshifts are FAST!).<br><br>As for memory bandwidth tests I think there are some at pocketpcpassion. Either way. Anything that works good on the casio runs like a dream on the iPaq. And since Argentum is beeing written on a Casio EM-500 (me) and a overclocked Casio E-125 (carpediem) it will probably be oh-so-smooth on your iPAQ.<br><br>// Fredrik<br><br>Last modification: Fredrik Malmer - 05/18/01 at 13:33:47
All your base are belong to us
User avatar
Malmer
pm Member
 
Posts: 768
Joined: Apr 26, 2001 @ 5:15pm
Location: Sweden


Re: Eye-candy

Postby Paul » May 18, 2001 @ 6:26pm

yeah... and shit on the jornada. thats IF ou release it for sh3. nevermind.
Paul
pm Insider
 
Posts: 9835
Joined: Apr 2, 2001 @ 3:15pm
Location: California


Re: Eye-candy

Postby Malmer » May 18, 2001 @ 6:31pm

It doesn't have to "run like shit" (*ahem*) on the jornada. The first versions of the game was in 14 fps or so and that was playable. We have to test it and see how it works. <br><br>// Fredrik<br>
All your base are belong to us
User avatar
Malmer
pm Member
 
Posts: 768
Joined: Apr 26, 2001 @ 5:15pm
Location: Sweden


Re: Eye-candy

Postby Paul » May 18, 2001 @ 6:49pm

well excuse me, princess.<br><br>what is the font for the small text under the argentum logo anyways?
Paul
pm Insider
 
Posts: 9835
Joined: Apr 2, 2001 @ 3:15pm
Location: California


Re: Eye-candy

Postby Diego Cueva » May 18, 2001 @ 6:54pm

--------------------------

Last modification: Diego Cueva - 04/31/03 at 17:32:04
I´m currently listening to my PC´s fan
SMRF founder
Peace
User avatar
Diego Cueva
pm Insider
 
Posts: 2582
Joined: Mar 28, 2001 @ 9:06pm
Location: D.I.G. Secret Headquarters, Brazil


Re: Eye-candy

Postby Digby » May 18, 2001 @ 7:00pm

Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Re: Eye-candy

Postby Malmer » May 18, 2001 @ 7:00pm

It's my favorite font, called Sevenet 7. We use it in the game too. It is a free font. I'll put it up on the website...you can download it . The font size is 7, but in Photoshop 6, which I use you have to use 8. Turn of anti-aliasing, since it is a bitmap font.<br><br>// Fredrik<br>
All your base are belong to us
User avatar
Malmer
pm Member
 
Posts: 768
Joined: Apr 26, 2001 @ 5:15pm
Location: Sweden


PreviousNext

Return to Argentum


Sort


Forum Description

Discuss Ionside's groundbreaking RTS title

Moderators:

sponge, CARPEDIEM, John Lomax, Malmer

Forum permissions

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 post attachments in this forum

cron