Home » SIRTECH CLASSICS » Jagged Alliance: Unfinished Business » Vanilla Modding » what is the system bpp?
what is the system bpp?[message #171873] Sat, 19 January 2008 20:27 Go to next message
zed

 
Messages:43
Registered:November 2006
hi All,
is all ja2 textures are in 16bpp format or in 32bpp format?
i'm asking since i can't udnerstand why in window mode i need to change my desktop to 16 bit where as in full screen even though my desktop setting are 32bpp everything works.
is 32bpp (in case we don't support it) is something we want to add?
i'm a coder in my real life but not a graphic expert so please forgive me for my ignorance
Re: what is the system bpp?[message #171882] Sat, 19 January 2008 20:55 Go to previous messageGo to next message
Ar1z

 
Messages:33
Registered:January 2008
Location: Greece

I guess the problem is in the game engine... Maybe you could fix it? Wink
Re: what is the system bpp?[message #171889] Sat, 19 January 2008 22:31 Go to previous messageGo to next message
zed

 
Messages:43
Registered:November 2006
for fixing it i need to understand the priciples behind it. from what i understand so far:
this is the code that generate the error if the desktop is not set to 16bpp (in window mode)

gusRedMask = (UINT16) SurfaceDescription.ddpfPixelFormat.dwRBitMask;
gusGreenMask = (UINT16) SurfaceDescription.ddpfPixelFormat.dwGBitMask;
gusBlueMask = (UINT16) SurfaceDescription.ddpfPixelFormat.dwBBitMask;

if (!gusRedMask)
{
MessageBox( NULL, "Jagged Alliance 2 windowed mode requires a color depth of 16bpp or less.", "Jagged Alliance 2", MB_ICONEXCLAMATION);
PostQuitMessage(1);
return FALSE;
}

the check is on the RBitMask - in 32 bit there is are 256 levels for each color instead of 5 so maybe the mask is returning 0 since there is no need for such mask?? 8 bits are known size in c languege and there for no need to make mask.
this is all assumptions - need some one to say why we are working 16bpp.
is it texture? is it a legacy?
if it is only a legacy i think i could make a conversion table from 16bpp to 32bpp but i need to understand why.
Re: what is the system bpp?[message #171912] Sun, 20 January 2008 01:02 Go to previous messageGo to next message
Lesh 2

 
Messages:108
Registered:September 2006
Location: Izhevsk, Russia
zed
this is all assumptions - need some one to say why we are working 16bpp.

Because Sir-Tech's wrote their own blitters, capable to draw only on 8-bit and 16-bit surfaces.

Re: what is the system bpp?[message #171933] Sun, 20 January 2008 07:03 Go to previous messageGo to next message
zed

 
Messages:43
Registered:November 2006
thanks lesh,
ok i understand and is the window mode something that was written in sir-tech as well ? because i can see in it some comments from someone i think he is part of the community.
BTW, all the sti and jsd files are in 16bpp format as well? or are they compressed in someway and there is an sxpander that translate it to 16bpp?
during the investiation i have found an interesting article on setting the bit correctly from window mode http://www.gamedev.net/reference/articles/article538.asp
i think i will try to add it.

another last question - do you think that removing the 8bpp support and adding directx9 calls should be ok? i think absoulote part of the players has this as minimal requirement in their PC.
Re: what is the system bpp?[message #171968] Sun, 20 January 2008 13:41 Go to previous messageGo to next message
Lesh 2

 
Messages:108
Registered:September 2006
Location: Izhevsk, Russia
zed
BTW, all the sti and jsd files are in 16bpp format as well? or are they compressed in someway and there is an sxpander that translate it to 16bpp?

Most sti's are 8-bit RLE compressed images, that are converted by blitter to 16-bit on-the-fly, while rendering them.

zed
another last question - do you think that removing the 8bpp support and adding directx9 calls should be ok? i think absoulote part of the players has this as minimal requirement in their PC.

8-bit actually is not used in ja2. Most probably is was intended for another Sir-Tech game Wizardy 8. Also directx9 is question. Personally I prefer platform-independed way - SDL library. I ported ja2 1.13 to SDL under windows long ago and it worked in windowed mode. I should note, that I didn't touch blitters - they were still producing 16-bit output, but game was able to be viewed on 32bpp desktop. But then I moved to linux...

Re: what is the system bpp?[message #171978] Sun, 20 January 2008 14:54 Go to previous messageGo to next message
zed

 
Messages:43
Registered:November 2006
Lesh 2
Personally I prefer platform-independed way - SDL library. I ported ja2 1.13 to SDL under windows long ago and it worked in windowed mode. I should note, that I didn't touch blitters - they were still producing 16-bit output, but game was able to be viewed on 32bpp desktop. But then I moved to linux...

and why this isn't part of the source code? SDL could have given a very good boost for other things to be added?
Re: what is the system bpp?[message #172061] Sun, 20 January 2008 22:25 Go to previous messageGo to next message
Lesh 2

 
Messages:108
Registered:September 2006
Location: Izhevsk, Russia
Sadly, I've lost mails from that days... If I remember correctly, low interest in changing video subsystem. Sources are still available, though.

Re: what is the system bpp?[message #172065] Sun, 20 January 2008 22:43 Go to previous messageGo to next message
zed

 
Messages:43
Registered:November 2006
lately i have been intereseted in testing the option of combining the OGRE engine to the source code. for me it is a long term work - didn't publish it nor asking for help since my limited time doesn't afford me to handle this task in coordination with others. my plan is first to create a tatical map based on OGRE base tile engine (there is one which is lgpl i'm thinking of) + support that will be added to the engine to support current game formats.
i'm giving this intro to say that you have allready made a huge advance allready and can open the code for new developments that will inhance the code greatly since SDL is giving at least some of the feature of today's engine i can only suggest to you to raise this as an offer once more.
i'm sure that once the SDL will be part of the code new features that today may take many man years to implement (new animations, new textures and terrains, new multilevel buildings, new view engles and more) will be much easier (at least from my not so deep understanding of the graphics world).
i can suggest myself and my spare time to help you testing your code (it will help me better understand the system and the graphics).
if you decide not to integrate it could i still send you questions from time to time? i'm still far from understanding how the graphical system work and your knowledge can be very helpfull in my work.
Re: what is the system bpp?[message #172241] Mon, 21 January 2008 17:47 Go to previous messageGo to next message
Lesh 2

 
Messages:108
Registered:September 2006
Location: Izhevsk, Russia
Despite I inserted SDL into ja2, the game is still plain 2D - I am not using OpenGL. Those legacy blitters are limitation to engine, preventing the game to be fully 32-bit. So there is more potential gain currently, than real (ex. using SDL_image library to load images in various formats).

Of course, you can always ask about graphical subsystem.

Re: what is the system bpp?[message #172760] Thu, 24 January 2008 10:31 Go to previous messageGo to next message
Ar1z

 
Messages:33
Registered:January 2008
Location: Greece

It's not the graphics, it's the gameplay that makes this game great! The ability to load images in png format is a big feature in my book!
Can I take a look at your code? Are there any licensing problems? JA2 isn't gpl...

[Updated on: Thu, 24 January 2008 10:31] by Moderator

Re: what is the system bpp?[message #172835] Thu, 24 January 2008 15:45 Go to previous messageGo to next message
lalienxx

 
Messages:82
Registered:February 2006
@Ar1z

Look into branches folder.


Re: what is the system bpp?[message #172842] Thu, 24 January 2008 16:06 Go to previous messageGo to next message
Ar1z

 
Messages:33
Registered:January 2008
Location: Greece

how do I do that? can you provide a link?
Re: what is the system bpp?[message #173049] Fri, 25 January 2008 15:25 Go to previous messageGo to next message
RoWa21

 
Messages:2046
Registered:October 2005
Location: Austria
@ar1z: https://81.169.133.124/source/ja2/branches/Lesh/


Re: what is the system bpp?[message #173164] Sat, 26 January 2008 13:26 Go to previous messageGo to next message
Lesh 2

 
Messages:108
Registered:September 2006
Location: Izhevsk, Russia
@ar1z: I can only add, if you are windows programmer, get the revision 764. Otherwise you can't compile this.

Re: what is the system bpp?[message #173177] Sat, 26 January 2008 17:03 Go to previous messageGo to next message
Ar1z

 
Messages:33
Registered:January 2008
Location: Greece

Lesh 2
@ar1z: I can only add, if you are windows programmer, get the revision 764. Otherwise you can't compile this.


Yes I figured that much... Wink Thanks for the tip about rev 764 though Wink
Maybe I'll try compiling in linux also Razz
Re: what is the system bpp?[message #174814] Tue, 05 February 2008 23:04 Go to previous messageGo to next message
lynxlynxlynx

 
Messages:81
Registered:September 2005
Location: Slovenija
port to ogre?? Sounds like a waste of effort. Especially with the 1.13 codebase. You are better of trying anything with the ja2-stracciatella code: http://ja2.dragonriders.de/index.html (tron has removed more than 100k lines of useless code already, done much other cleanup and this is actually already ported/portable, along with most of the blitters).
Re: what is the system bpp?[message #174828] Tue, 05 February 2008 23:38 Go to previous messageGo to next message
zed

 
Messages:43
Registered:November 2006
the other guy in the thread had already mentioned it.
personally i think the two should be integrate together - no point in holding two sources so different each has very needed funcionality. i think the integration will not be impossible since most of 1.13 code is exeternalazing data and less graphics (at least from my very small understanding)
OGRE is just and idea running in my head for a while. computer graphics is something i found interesting in the last months and i have an idea to replace today graphic engine (which includes the tile engine) with a more advanced engine so not every new animation / texture will take ages to add to the code. its more like a personal idea - not something i'm trying to make other do... i can't commit to time tables and tasks so i not trying to initiate it as a project.
Re: what is the system bpp?[message #174836] Wed, 06 February 2008 00:05 Go to previous messageGo to next message
lynxlynxlynx

 
Messages:81
Registered:September 2005
Location: Slovenija
A merge would be hard, especially since both are in a svn repo. Wink

The little joke aside, a merge would be very hard, since the ja2-s folks have very high standards and have modified and sanitized a lot of code, so simple cherry-picking would be impossible (well no impossible, just with plenty of conflicts). It would require a well thought and organized "port" of the new stuff. Currently the 1.13 team seems too starved to attempt anything like this and should imho continue on its goal of making the next stable.

Ogre is not a bad choice, as it is Free (LGPL). Smile I questioned the whole point of introducing it though - what would be the benefits (I'm interested in details)?
Re: what is the system bpp?[message #174859] Wed, 06 February 2008 07:46 Go to previous messageGo to next message
zed

 
Messages:43
Registered:November 2006
i think that in terms of adding new animation types, textures, multilevel buildings, hills, 4 cammera views, easy integration of larger maps and so.
once you have a new engine you can expand to many new direction limitied by today engine.
the plan is to expand OGRE to support today's used formats or to create a convertors. i'm not planning to make people rewrite every thing they did in the past if it won't be backward competible no one will adopt it.
besides the graphic is not the most important staff here - a true hight map based tatical map could give tatical manuvers more meaning.
it is a very hard task to accomplish and i'm note sure i could succeed in it but want to try to see if it at least possible to do.
Re: what is the system bpp?[message #186335] Mon, 26 May 2008 03:35 Go to previous message
Shanga

 
Messages:3512
Registered:January 2000
Location: Danubia
zed
i think that in terms of adding new animation types, textures, multilevel buildings, hills, 4 cammera views, easy integration of larger maps and so.
once you have a new engine you can expand to many new direction limitied by today engine.
the plan is to expand OGRE to support today's used formats or to create a convertors. i'm not planning to make people rewrite every thing they did in the past if it won't be backward competible no one will adopt it.
besides the graphic is not the most important staff here - a true hight map based tatical map could give tatical manuvers more meaning.
it is a very hard task to accomplish and i'm note sure i could succeed in it but want to try to see if it at least possible to do.


Bloody hell, OGRE one of the best GPL engines I've seen... Worth giving it a shot, I'd say.


Previous Topic: Linux port
Next Topic: JA2 Source Code Digging: Adding new teams?
Goto Forum:
  


Current Time: Fri Jul 21 11:46:55 EEST 2017

Total time taken to generate the page: 0.02144 seconds