Home » MODDING HQ 1.13 » v1.13 Coding Talk » RII - Resolution Independent Interface [UPDATE :RII v4f]
Re: RII - Resolution Independent Interface[message #211200] Thu, 26 March 2009 21:48 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1958
Registered:October 2005
Location: Austria
With the latest EXE I get the following error after splash screen:

RUNTIME ERROR

Assertion Failure [Line 132 in file .\Shade Table Utility.cpp].

Couldn't create RGBDist.dat for writing!

Report message to a moderator

Sergeant Major

Re: RII - Resolution Independent Interface[message #211204] Thu, 26 March 2009 22:08 Go to previous messageGo to next message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
I get this error when either the UserProfile directory does not exist or i don't have the right to write in it. Can you check for one of these conditions.

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #211264] Fri, 27 March 2009 17:15 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1958
Registered:October 2005
Location: Austria
@birdflu:
Should I put the "WRITE = true" for each profile in the INI file and als create a profile in "Profiles" folder for each Data directory?

Report message to a moderator

Sergeant Major

Re: RII - Resolution Independent Interface[message #211286] Fri, 27 March 2009 23:54 Go to previous messageGo to next message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
Here is a new test version. It writes a new file (vfs_init.log) in the exe's directory. Can you look if there is any error in that file?

- Can you look whether your Profiles/UserProfile directory is empty or not?

- Can you replace the "PROFILE_ROOT" key in section "PROFILE_UserProf" with a global path and see if that works?

Adding "WRITE = true" to other profiles should not make any difference as only the last one is relevant. But you could try the following.

- Add "WRITE = true" to the RII profile and remove the UserProfile from the "PROFILES" list.

- Add "WRITE = true" to the Vanilla or v113 profile and remove the UserProfile from the "PROFILES" list.

You cannot remove the RII profile, as it contains important init files (GUI wouldn't work without them).
RoWa21
create a profile in "Profiles" folder for each Data directory?

I'm not sure i understand. Do you mean the Data and Data-1.13 directories?

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #212011] Fri, 03 April 2009 01:07 Go to previous messageGo to next message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
Any progress on the testing front?

RoWa21 had/has some problems with starting the game. Anyone else had this problem? Because if you don't tell me that it works i will have to assume that it doesn't. And if you don't tell me what's wrong then i can't fix it.

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #212043] Fri, 03 April 2009 16:31 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1958
Registered:October 2005
Location: Austria
@birdflu: I am going to test the new version today. Then I can give you feedback.

Report message to a moderator

Sergeant Major

Re: RII - Resolution Independent Interface[message #212056] Fri, 03 April 2009 18:45 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1958
Registered:October 2005
Location: Austria
I just tested your latest EXE and it works fine.

I just renamed the ORIGINAL (so I did not made any changes to the file) "vfs_config_SLF.ini" to "vfs_config.ini". Then I started the EXE and it works perfect.
The "vfs_init.log" was created. Everything is "OK" in the file.

Good work birdflu!

Just a few minor things I noticed:
- In the "INITIAL GAME SETTINGS" screen, the background is not centered.
- In Strategy screen the minimap and the day string is in the lower right corner
- Loading screen is not centered
- In tactical the bottom interface is not correctly aligned on the minimap, the sector name and the date/time string.





Report message to a moderator

Sergeant Major

Re: RII - Resolution Independent Interface[message #212068] Fri, 03 April 2009 21:03 Go to previous messageGo to next message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
That is great. Now i can work on the things that are still misaligned.

Did anyone tried out the other configurations? Does the Ja2Convert program actually convert data for you?

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #212077] Fri, 03 April 2009 22:57 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1958
Registered:October 2005
Location: Austria
I will test the JA2Convert tools tomorrow. I give you feedback then.

Report message to a moderator

Sergeant Major

Re: RII - Resolution Independent Interface[message #212080] Fri, 03 April 2009 23:25 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1958
Registered:October 2005
Location: Austria
@birdflu: A few questions to the VFS:

For example, if I want to put a new MOD in my JA2 root directory I have to do the following:

1.) Create a new folder in th "Profiles" folder (e.g. MyMOD)
2.) Copy all the needed ja2 data folders (interface, tabledata, ...) into "MyMOD". So these files will overwrite the existing ones from folder "Data" and "Data-1.13"
3.) Edit "vfs_config.ini"
3a.) Create a new Profile (e.g: [PROFILE_MyMOD]). Set NAME, LOCATION, PROFILE_ROOT and WRITE
3b.) Add the new profile at the end of the PROFILES string in the [vfs_config] section. I assume the last one will override the previous ones, right?
4.) Start the EXE

Is this correct, birdflu? So one general question: If I install new mods I put all the data files inside the Profiles/MY_MOD_NAME folder.

EDIT: The folder "Profiles/UserProfile" is used to save user specific data. So savegames, setting file and temp files are saved there. Correct?

EDIT2: For the JA2 multiplayer the VFS would be awesome when it comes to server -> client file transfer. File transfer is working but we need a way to store the multiplayer data on the clients harddisk. Can VFS be easily integrated into current SVN source code. How much files need to be changed?

Thanks for the infos.

[Updated on: Fri, 03 April 2009 23:31] by Moderator

Report message to a moderator

Sergeant Major

Re: RII - Resolution Independent Interface[message #212085] Sat, 04 April 2009 01:25 Go to previous messageGo to next message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
In a simple case you would and up with something like this
[vfs_config]
PROFILES = P1, ... , Pn, MyMOD

[PROFILE_MyMOD]
NAME = Mod's name
LOCATIONS = rootdir
PROFILE_ROOT = global_or_relative_path
WRITE = true

[LOC_rootdir]
TYPE = DIRECTORY
PATH = relative_path_from_PROFILE_ROOT
MOUNT_POINT = 


Quote:
1.) Create a new folder in th "Profiles" folder (e.g. MyMOD)
Actually it can be any directory as long as it is referenced correctly.
Quote:
2.) Copy all the needed ja2 data folders (interface, tabledata, ...) into "MyMOD". So these files will overwrite the existing ones from folder "Data" and "Data-1.13"
You will only need the files you want to replace. The rest will be taken from lower profiles.
Quote:
3.) Edit "vfs_config.ini"
Yes.
Quote:
Create a new Profile (e.g: [PROFILE_MyMOD]). Set NAME, LOCATION, PROFILE_ROOT and WRITE
Name is required and has to be unique.
Its LOCATIONS and can be a list of section names (actually section names are created from the elements of this list by prepending "LOC_" ).
PROFILE_ROOT is the directory of your mod (see point 1) and can be a relative or an absolute path.
Key WRITE is not required, but at least on Profile has to defined writeable (your new mod or one of the older mods), preferably the last one in the list.
Quote:
Add the new profile at the end of the PROFILES string in the [vfs_config] section. I assume the last one will override the previous ones, right?

Yes. If a file can be found in the top profile, then it is used, other wide the system looks in the next profile and then in the next until it is found. So, actually you cannot "delete" a file in your profile as it may be found in another profile.


Quote:
Is this correct, birdflu? So one general question: If I install new mods I put all the data files inside the Profiles/MY_MOD_NAME folder.
In a simple case, yes. But you can also put a directory in any position in the VFS by using "MOUNT_POINT = ". For example you could take a directory "%ModRoot\Stuff" and insert the contents of it into "Tabledata\Lookup" be doing this
[PROFILE_MyMOD]
NAME = Mod's name
LOCATIONS = dir1, ...
PROFILE_ROOT = %ModRoot

[LOC_dir1]
TYPE = DIRECTORY
PATH = Stuff
MOUNT_POINT = Tabledata\Lookup

But there is a restriction. In one profile you cannot add two files with the same vfs path. You would have to use a second profile to do that, but then one of these files would be overridden and thus unaccessible by normal means. So, you probably don't want to do that.

Quote:
EDIT: The folder "Profiles/UserProfile" is used to save user specific data. So savegames, setting file and temp files are saved there. Correct?

The UserProfile is the writeable profile. There you save all files that are written through the vfs. These are Savegames, Shadetables, Temp files, but also ja2.set and probably other files. So, the question is, do you want a "clean" user profile or do you want to mix in actual data.
The writeable Profile is special as is contains "exclusive" directories. These are "Temp", "ShadeTables", "SavedGames" and "SavedGames\MP_SavedGames". Exclusive means that if a file is not found for write or read access in this directory, the system does NOT look in other profiles.

Quote:
EDIT2: For the JA2 multiplayer the VFS would be awesome when it comes to server -> client file transfer. File transfer is working but we need a way to store the multiplayer data on the clients harddisk. Can VFS be easily integrated into current SVN source code. How much files need to be changed?
Is that kind of thing not possible now? Can't you just store (arbitrary) data in a file? What kind of data is this multiplayer data and why can't is remain in memory?

Integrating the VFS into the main branch should be relatively simple. First, all VFS code is located in a separate Project that compiles independently of anything else (OK, that's not true, it requires the libs 7z.lib and also libpng.lib). The integration into the rest of the code is done by "hijacking" the FileMan interface, basically doing this kind of stuff
BOOLEAN	FileExists( STR strFilename )
{
#ifdef USE_VFS
	return GetVFS()->FileExists(vfs::Path(strFilename));
#else
	// First check to see if it's in a library (most files should be there)
	if ( gFileDataBase.fInitialized &&
		CheckIfFileExistInLibrary(	strFilename ) ) return TRUE;

	// ... then check if it's in the custom Data directory
	if ( gCustomDataCat.FindFile(strFilename) ) return TRUE;

	// ... then check if it's in the default Data directory
	if ( gDefaultDataCat.FindFile(strFilename) ) return TRUE;

	// ... lastly, try to locate it in the file system
	DWORD attribs = GetFileAttributes(strFilename);
	if ( attribs != INVALID_FILE_ATTRIBUTES && !(attribs & FILE_ATTRIBUTE_DIRECTORY) )
		return TRUE;
	
	return FALSE;
#endif
}

So, if "USE_VFS" is defined in vfs.h, then you use the VFS, otherwise you use the old system. There are also a couple of other files that look for VFS definition. This is mostly because of different path names for ini files. I also have an own INI file parser that is used by "hijacking" the INIReader class.
And i also disabled (or at least tried) all changes to the current directory, as it would royally screw up VFS initialization with paths defined relative to the exe. I also didn't "hijack" all functions from FileMan.cpp, only those that were actually used and had something to do with file operations.

There is another problem with the VFS, but it is not too dramatic. There are a quite some direct file accesses via the FILE C-interface or the fstream C++-interface, that are bypassing the regular FileOpen, FileRead, FileWrite interface from FileMan and thus bypassing the VFS. This would have to be changed.

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #212101] Sat, 04 April 2009 12:04 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1958
Registered:October 2005
Location: Austria
Thanks for the infos on VFS.

BirdFlu

Quote:
EDIT2: For the JA2 multiplayer the VFS would be awesome when it comes to server -> client file transfer. File transfer is working but we need a way to store the multiplayer data on the clients harddisk. Can VFS be easily integrated into current SVN source code. How much files need to be changed?
Is that kind of thing not possible now? Can't you just store (arbitrary) data in a file? What kind of data is this multiplayer data and why can't is remain in memory?


In Multiplayer mode the server can define which files should be sent to all clients after they connect (defined in a simple text file). This is used so that all clients have the same INI (ja2_options.ini, ...) XML-Files (Items.xml, ....) and also Maps and Tilesets. I don't want to override the files the client received from the server in the Data-1.13 folder. First we thought about adding a postfix to the received files (e.g: Items.mp.xml, ja2_options.mp.ini). After the client received all files from server the client has to reinitialize the GameSettings. If we are in mutliplayer, the clients looks for the *.mp file to initialize. If that file is not found it takes the "normal" file. It is also important that the file is stored on the clients harddisk, so if you play another game with the same server settings, the client does not need to receive the files again from server, because the client already has the files on the harddisk.

If we would use your VFS we could get rid of the *.mp postfix and simple store all MP files in a separate profile. (E.g: Profiles/Multiplayer). So it would me much clearer. Also we want to use the VFS in the future in the 1.13 source code.


[Updated on: Sat, 04 April 2009 12:05] by Moderator

Report message to a moderator

Sergeant Major

Re: RII - Resolution Independent Interface[message #212104] Sat, 04 April 2009 13:13 Go to previous messageGo to next message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
That would indeed be possible.
You can have only one "active" writable profile at the same time, so the multiplayer profile would actually substitute the current user profile. But, as the settings come from the server anyway, that should not be a problem. I think there should be something like this
Profiles
|- Multiplayer
|  |- Profile_Server1
|  |- ...
|  `- Profile_Server2
|- other_mod
`- UserProfile

So, when you connect to a server, you receive an ID from it and push the according server profile on the profile stack.

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #212178] Sun, 05 April 2009 08:58 Go to previous messageGo to next message
Tiler_Durdan

 
Messages:18
Registered:February 2009
Location: orbiting planet mindless
how does vfs handle the x and y coordinate offset stored in the sti?

Report message to a moderator

Private
Re: RII - Resolution Independent Interface[message #212197] Sun, 05 April 2009 16:11 Go to previous messageGo to next message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
The VFS doesn't really handle the coordinate offset. When you work with STIs then there is nothing to handle. And when you convert STI images to PNG images in 7z containers, then i save the sub image offset in the png files. Again, not really a VFS concern.

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #212216] Mon, 06 April 2009 08:57 Go to previous messageGo to next message
Tiler_Durdan

 
Messages:18
Registered:February 2009
Location: orbiting planet mindless
ahh.. how is this done?
this conversion thing is the novum i was waiting for for creating better and nicer tilesets.
great job.
every png in a 7z can have its own 256 palette?

Report message to a moderator

Private
Re: RII - Resolution Independent Interface[message #212292] Tue, 07 April 2009 02:18 Go to previous messageGo to next message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
Although every png file can have its own palette, i'm using only the palette of the first image from a 7z container. This is because i convert the series of png images to the internal format that was/is used with sti images and it can have only one palette. Doing it this way makes it possible to replace all sti files without changing the rendering code that belongs to these images. The disadvantage is that you still stick with old restrictions, but you have the advantage to create these images in a simpler way (although i don't know how easy it is to set image offsets in an image processing application or is such a thing is supported at all).

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #212317] Tue, 07 April 2009 11:14 Go to previous messageGo to next message
moteel is currently offline moteel

 
Messages:11
Registered:August 2006
Location: Banana Republic of Poland
How I can save x,y coords in e.g. Photoshop?

Report message to a moderator

Private
Re: RII - Resolution Independent Interface[message #212553] Wed, 08 April 2009 23:03 Go to previous messageGo to next message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
Quote:
How I can save x,y coords in e.g. Photoshop?
I have no idea. I don't have Photoshop.

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #212673] Fri, 10 April 2009 00:04 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1958
Registered:October 2005
Location: Austria
@birdflu: Could you send me the modified/added files (CPP, H, Project Files) that are needed for working VFS. The reason for this is, because I want to include it in the multiplayer source code which is for now in my private branch. The good thing would be that the VFS will get well tested by the multiplayer guys before I am going to merge it in the official 1.13 source code.

So if you sent me (wannebox@gmx.at) all the needed files and a short explanation how to use/compile it that would be fine. Of course we give you credits in SVN log and wiki page Smile

[Updated on: Fri, 10 April 2009 00:05] by Moderator

Report message to a moderator

Sergeant Major

Re: RII - Resolution Independent Interface[message #212680] Fri, 10 April 2009 03:25 Go to previous messageGo to next message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
I guess you mean just the VFS without the RII stuff.
What about the PNG loader? It doesn't directly belong to the VFS, but it also doesn't hurt anyone if it there.
What about other dependencies (7z (aka LZMA SDK), libpng)? How should these thing be included? Static or dynamic linking? Code/Headers outside ja2 project files or inside (like RakNet)? Can we include the code without breaking the license? Do we care?

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #212691] Fri, 10 April 2009 10:54 Go to previous messageGo to next message
spaeR is currently offline spaeR

 
Messages:77
Registered:September 2008
Location: Hungary
Hi All!
I try to download, this mod (http://www.turboupload.com/files/get/ph9Aii8Ine/ja2-rii-alpha-v1.7z), but this link not work!
Another lacation!?
Please help!

Report message to a moderator

Corporal
Re: RII - Resolution Independent Interface[message #212693] Fri, 10 April 2009 11:03 Go to previous messageGo to next message
lockie is currently offline lockie

 
Messages:3714
Registered:February 2006
Location: Scotland
None of the links seem to work at present , only Birdflu can restore I think .
You'll just have to wait till fixed :whoknows:

Report message to a moderator

Captain

Re: RII - Resolution Independent Interface[message #212696] Fri, 10 April 2009 11:50 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1958
Registered:October 2005
Location: Austria
@birdflu: Yes I mean only the VFS stuff without RII. What does the PNG loader? If it does not break anything I can also include it.
We should handle the dependencies like Raknet. I am sure we can include the code without breaking license.

Report message to a moderator

Sergeant Major

Re: RII - Resolution Independent Interface[message #212749] Sat, 11 April 2009 02:34 Go to previous messageGo to next message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
Quote:
None of the links seem to work at present , only Birdflu can restore I think .
You'll just have to wait till fixed
If the links aren't working you have to tell me. How else should i learn about that. I'm not checking them every day, you know.

Anyway, i re-uploaded the (old) files in a new release (V4b, see first page). I will try to merge my mod with the current HEAD in the next couple of days.

@RoWa21 : I will prepare the vfs files for release and will send them to you soon.

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #212766] Sat, 11 April 2009 11:02 Go to previous messageGo to next message
spaeR is currently offline spaeR

 
Messages:77
Registered:September 2008
Location: Hungary
THX, the Alpha V.4b link are working!

Report message to a moderator

Corporal
Re: RII - Resolution Independent Interface[message #212790] Sat, 11 April 2009 14:19 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1958
Registered:October 2005
Location: Austria
@birdflu: Thanks, waiting for the VFS source.

Report message to a moderator

Sergeant Major

Re: RII - Resolution Independent Interface[message #213051] Mon, 13 April 2009 13:04 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1958
Registered:October 2005
Location: Austria
@birdflu: Please don't forget to send me the source files for the VFS. Thanks.

Report message to a moderator

Sergeant Major

Re: RII - Resolution Independent Interface[message #213053] Mon, 13 April 2009 13:19 Go to previous messageGo to next message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
Almost there. Have done some cleaning and other (not so trivial changes) and have to test that it still works as intended.

edit:
I have noticed an "error", that wasn't in the RII release. The problem occurred when you switch from sti to jpc.7z (aka png@7z) images. Then the files mdp*items.jpc.7z do not exist in the directory "Data-1.13" (unless you explicitely converted the files). When you now try to load these files, you get them from the converted slf archives (the files in the archives were converted when you used the provided batch files). But the files in the archives are outdated and don't contain newer item images and the game crashes when trying to access them. Not a vfs problem per se, but it shows that the vfs configuration has to done with a clear mind.

[Updated on: Mon, 13 April 2009 13:41] by Moderator

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #213065] Mon, 13 April 2009 16:08 Go to previous messageGo to next message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
@RoWa21, just sent the diff file to you.

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #213088] Mon, 13 April 2009 18:59 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1958
Registered:October 2005
Location: Austria
@birdflu: Thanks received it, but I could not compile it. I sent you a mail with some details.

Report message to a moderator

Sergeant Major

Re: RII - Resolution Independent Interface[message #213224] Wed, 15 April 2009 00:01 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1958
Registered:October 2005
Location: Austria
@birdflu: I have sent you 2 mail regarding to VFS. Please take a look at them. Thanks

Report message to a moderator

Sergeant Major

Re: RII - Resolution Independent Interface[message #213227] Wed, 15 April 2009 00:53 Go to previous messageGo to next message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
got it.

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #214096] Sat, 25 April 2009 01:34 Go to previous messageGo to next message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
http://img24.imageshack.us/img24/9952/bigj.th.png
Can anyone tell me where sizes and distances for maps and tilesets are handled?

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #214101] Sat, 25 April 2009 05:36 Go to previous messageGo to next message
Kaerar is currently offline Kaerar

 
Messages:2021
Registered:January 2003
Location: Australia :D
Looking good mate Smile

Report message to a moderator

Lieutenant

Re: RII - Resolution Independent Interface[message #214103] Sat, 25 April 2009 06:49 Go to previous messageGo to next message
SharkD is currently offline SharkD

 
Messages:350
Registered:July 2003
I would just like to add that the developers of Homeworld 2 created two sets of interface element images: one for 800x600 and one for 1600x1200. The game would then "guess" which set of images to use based on the requested resolution. For instance, if the game were running at 1024x768, then the 800x600 images were upscaled to fit the larger resolution. If the game were running at a resolution larger than 1600x1200, the latter set of images were used.

Also, the game used percentages instead of pixel coordinates for image placement. I.e., instead of placing an image at (200px, 400px), the game would place the image at (10%, 20%) of the screen dimensions.

I'm not sure, however, how the game dealt with other aspect ratios. I.e. did the game align everything in the center? Did it stretch the images?

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #214105] Sat, 25 April 2009 10:02 Go to previous messageGo to next message
Kaerar is currently offline Kaerar

 
Messages:2021
Registered:January 2003
Location: Australia :D
You would then need a set of images per aspect ratio + high quality textures and low quality textures. It would be good if the whole interface could be layered correctly too so you don't get the pixel errors currently in the game.

With the aspect ratios you would need 4:3, 5:4, 16:9 and the other main widescreen one (can never remember it!).

Report message to a moderator

Lieutenant

Re: RII - Resolution Independent Interface[message #214109] Sat, 25 April 2009 11:33 Go to previous messageGo to next message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
16:10?

What i did was not scaling the images in game but scaling the image files (x*2, y*2). I transformed only files inside Anims.slf and Tilesets.slf. But just scaling was apparently not enough. The positions of the tiles in the have to be changed too and i need to find out where this is done in the code.

Report message to a moderator

Master Sergeant
Re: RII - Resolution Independent Interface[message #214113] Sat, 25 April 2009 12:39 Go to previous messageGo to next message
Native_Elder is currently offline Native_Elder

 
Messages:56
Registered:April 2009
certainly two elements to behold, the .jsd file that defines what shape your object is and the x/y coords in the .sti that defines where relative to the grid the tiles get placed.

maybe you have success multiplaying these coords by the same ratio you did with the objects (graphics) themselves. Or maybe my grasp of geometry is lacking and you need to apply some euclid/ pythagore to get the right values.

Report message to a moderator

Corporal
Re: RII - Resolution Independent Interface[message #214115] Sat, 25 April 2009 12:55 Go to previous messageGo to previous message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: Lampukistan
Until now i did not touch the code, i only scaled the images, where i also scaled the offsets. I think the problem is that the distance between two tiles is not scaled and thus all objects are placed way too close to each other. To change that i need to modify that part of the code that handles inter-tile distances.

Report message to a moderator

Master Sergeant
Previous Topic: Learning how the tactical AI works
Next Topic: Folding Stock Revamp
Goto Forum:
  


Current Time: Sat Nov 15 05:41:35 GMT+2 2025

Total time taken to generate the page: 0.01216 seconds