Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
58 user(s) are online (31 user(s) are browsing Forum)

Members: 0
Guests: 58

more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +30€

Current balance: -190€
(last updated 04/2017)

Please make a donation if you want to help keeping The-Starport online:

Bitcoin address:
Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 50 users playing Freelancer on 39 servers.
September. 19, 2017

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post

« 1 (2)


Re: Widescreeen Crashes
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1770
Offline
The resolution strings are built dynamically, so adding aspect ratio will require a patch.

Freelancer actively discourages non-4:3 resolutions - I had to patch it out to get the widescreen desktop resolution to show up.

There's one list of resolutions (which JFLP replaces), which is made twice with each depth, so adding more resolutions will also require a patch.

Freelancer only tests width, not height, so if you want multiple resolutions with the same width, the last seen will be used - so you'll need another patch.

Your best bet would probably be to modify Patch_Dimensions in JFLP to do it all. If you can't, well, I think you're out of luck...

Posted on: 7/26 9:20

Edited by adoxa on 2017/7/27 8:10:56
Top
Re: Widescreeen Crashes
Not too shy to talk
Joined:
3/20 14:31
Group:
Registered Users
Posts: 71
Offline
I see.

Thanks for the info.

Posted on: 7/26 19:08
Top
Re: Widescreeen Crashes
Not too shy to talk
Joined:
3/20 14:31
Group:
Registered Users
Posts: 71
Offline
Ok so looking at your source file for JFLP, I see the below:

static int res_width[] = { 800, 1024, 1152, 1280, 1600 };
static int res_height[] = { 600, 768, 864, 960, 1200 };

This is how you correct the resolutions?

Can I just change these and recompile? If so I could use my method with portable FL to detect aspect ratio and build a version for 16:9 and one for 16:10 and just have the appropriate one put in?

Is that a solution?

Posted on: 7/27 7:04
Top
Re: Widescreeen Crashes
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1770
Offline
What is it you're trying to accomplish? JFLP will replace 800x600 with the current desktop resolution (if it's not already in the list), also using it as default, since that is assumed to be the native monitor resolution and hence the preferred resolution. How do you envisage other resolutions being used? Testing fonts? Multi-monitor setups?

You don't need separate versions, just do it dynamically, something along the lines of:
Code:
static int width4_3[] = { ... };
static int height4_3[] = { ... };
static int width16_9[] = { ... };
static int height16_9[] = { ... };
static int width16_10[] = { ... };
static int height16_10[] = { ... };
int* res_width;
int* res_height;
...
int ratio = 100 * desktop.right / desktop.bottom;
if (ratio == 177)
{
  res_width = width16_9;
  res_height = height16_9;
}
else if (ratio == 160)
{
  res_width = width16_10;
  res_height = height16_10;
}
else
{
  res_width = width4_3;
  res_height = height4_3;
}

Posted on: 7/27 8:22
Top
Re: Widescreeen Crashes
Not too shy to talk
Joined:
3/20 14:31
Group:
Registered Users
Posts: 71
Offline
Quote:

adoxa wrote:
What is it you're trying to accomplish? JFLP will replace 800x600 with the current desktop resolution (if it's not already in the list), also using it as default, since that is assumed to be the native monitor resolution and hence the preferred resolution. How do you envisage other resolutions being used? Testing fonts? Multi-monitor setups?


A number of small but probably minor reasons in your eyes.

My OCD compells me to offer other widescreen resolutions, 720p, 1080p, 1440p, 4k and the equivalent for 16:10.

I am about to enter a phase of this patch where I will be making a lot of tweaks to the UI, as much as is reasonable, including fonts, font sizes etc. Some of the UI elements fill the screen (like the multiplayer server browser for example).

I plan to patch in a decent shader with a suitable profile, so the graphics draw will be a little higher, along with higher resolution textures, providing the option for a lower resolution makes sense with that.

Now you've got me curious, as I don't use a multi-monitor setup, does JFLP account for that and by extension hudshift?

Oh and my method is simply because I lack the programming expertise, I can't roll off code just like you do. Whilst I get syntax and logic statements easily enough, I can't program it myself fluently, I take other peoples work and modify it usually, if I understand all the concepts involved.

I considered asking for your help with various things but I get the impression you aren't into doing anything more for Freelancer projects wise, unless I am misunderstanding. Don't get me wrong I'm certainly not ungrateful for all you have done for this community, I actually understand and respect that. So I wouldn't ask.

That little workaround was an easy solution for me, that is all.

Posted on: 7/27 20:06
Top
Re: Widescreeen Crashes
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1770
Offline
Quote:
I plan to patch in a decent shader with a suitable profile, so the graphics draw will be a little higher, along with higher resolution textures, providing the option for a lower resolution makes sense with that.

Fair enough. I've attached a new DLL that does it (but note that Freelancer will still only display supported resolutions). I may have the 16:10 values wrong, but that should be easy enough to fix in the binary.

Quote:
Now you've got me curious, as I don't use a multi-monitor setup, does JFLP account for that and by extension hudshift?

Apparently.

Quote:
I considered asking for your help with various things but I get the impression you aren't into doing anything more for Freelancer projects wise, unless I am misunderstanding.

No, my Freelancer days are pretty much behind me, but I'll still do some little things that take my fancy; unfortunately for you, this isn't one of them.

Attach file:


zip jflpres.zip Size: 14.32 KB; Hits: 22

Posted on: 7/28 3:34
Top
Re: Widescreeen Crashes
Not too shy to talk
Joined:
3/20 14:31
Group:
Registered Users
Posts: 71
Offline
Eeerrrm, how about a hook version of lancers FL Cargo Exchanger then?
Does that tickle your coding fancies?

Incase you don't remember it or didn't see it at the time...

It is meant to allow exchange of items based on requirements. Item swapping is a working thing in FLHook as far as I've read.

Example:

[base]
name = base that does the exchange, use 'all' for all bases (without the '
[product]
name = descriptive name (unused but required)
credit = main required item for exchange (ie. purchase credit), usually a specialty item
req = additional required items, up to 16 requirements allowed with a minimum of one requirement
out = item that is put in the cargo hold

It currently only works on player logout I believe, we've struggled to get it to work properly.

Phase 4 of my plans includes building a server package to include with my patch.

I was planning on using it for a crafting system, i.e; typing /fabricate itemname, as long as you had the required commodities on your inventory, would produce an item.

It also has other more powerful options. I could basically use it to create a basic quest system too for the purpose of expanding on story etc.

Doesn't even have to be you, anyone who is already familiar with FLHook programming would be awesome, but I suspect there isn't many of you left.

Oh and thanks for the DLL Adoxa, I muchly appreciate it man.

Attach file:


zip Cargo_Exchanger_V0_007.zip Size: 45.19 KB; Hits: 19

Posted on: 7/28 6:33
Top
Re: Widescreeen Crashes
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1770
Offline
Quote:
I was planning on using it for a crafting system, i.e; typing /fabricate itemname, as long as you had the required commodities on your inventory, would produce an item.

We've all had the idea for a manufacturing plugin, but none of us ever got around to writing it, apparently.

Quote:
Doesn't even have to be you, anyone who is already familiar with FLHook programming would be awesome, but I suspect there isn't many of you left.

I never did MP, so I never became all that familiar with FLHook.

Posted on: 7/30 1:57
Top
Re: Widescreeen Crashes
Not too shy to talk
Joined:
3/20 14:31
Group:
Registered Users
Posts: 71
Offline
Yeah, Azureus in that linked thread was me. I've always wanted it. How come no-one has ever got around to it? Seems strange. I suspect someone made it at some stage, but has not shared outside their mod.

Back on topic, which version can I use to compile your jflp source?

Posted on: 7/30 7:48
Top
Re: Widescreeen Crashes
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1770
Offline
I use VC6, but any Windows C compiler should work. Hm, vswprintf changed, though, so edit that line to *len += vswprintf( buf + *len, 4096 - *len, value_fmt, args ); and you might like to add #define _CRT_SECURE_NO_WARNINGS before the other includes. You might also like to remove option /MD, to avoid a CRT dependency (although it's likely people will have the redistributable already) and there's no need for the filealign option, as other compilers default to 512 (VC6 defaults to 4096).

Posted on: 7/30 8:18
Top
« 1 (2)