Pre-game shell

Moderators: GSH, VSMIT, Red Devil, Commando

User avatar
TheJamsh
Bull Dog
Posts: 689
Joined: Sat Feb 19, 2011 5:49 pm

Pre-game shell

Post by TheJamsh »

A little confused at the moment...

I'm curious, as to why the pre-game shell always renders in a resolution of 640*480? Whereas in-game the shell can render at the resolution of your monitor? Its incredibly irritating from a modders perspective, Trying to create a custom shell at the moment where everything fits in nicely and looks the same throughout, but it doesn't seem possible.

Out of curiosity, why does it work this way? Is it because of the stock background images or something? Unfortunately its also stretching and skewing all my images im trying to use, making things unneccesarily pixelated etc. Is there a way to stop this from happening? I want my shell to render at my screen resolution constantly.
User avatar
GSH
Patch Creator
Posts: 2486
Joined: Fri Feb 18, 2011 4:55 pm
Location: USA
Contact:

Re: Pre-game shell

Post by GSH »

1.0-1.3pb4a, the pregame shell was limited to 640x480. For 1.3pb5+, it does something tricky under the hood: it renders at the in-game resolution, but it's still working on a 640x480 canvas (or whatever's set in render.cfg), and upscales it. So, if your ingame resolution is 1024x768, it multiplies the x & y coordinates by 1.6 just before drawing.

Proper resolution-independent shell cfgs would take a lot of rework. Nobody's ever stepped up to redo the existing ones so that they look close-enough to 1.0-1.3pb6 at 640x480 (minimum resolution), but look better at higher resolution.

-- GSH
User avatar
TheJamsh
Bull Dog
Posts: 689
Joined: Sat Feb 19, 2011 5:49 pm

Re: Pre-game shell

Post by TheJamsh »

I'd be up for doing it ;) Possibly make some improvements along the way if there are any to make (like implementing the quicksave feature etc).

One thing that really gets me about the interface is why there are some dialog boxes that are pre-drawn by the code and not accessible outside in .cfg files. (such as the message when you want to retire a pilot etc). It would be great to see those become external... I imagine if the shell code is already written out in the code somewhere it wouldn't be tricky to copy & paste that into a .cfg and make the other CFG's reference it.

My problem is evident here in these screenshots, i'm moving all the error messages to the side like "notifications" for this shell (far from finished of course), but in-game it appears TINY as my resolution is 1440 * 900.

Pre-Game
Image

In-Game (Ideally I'd like to be able to get pre-game rendering at this resolution)
Image
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Pre-game shell

Post by Nielk1 »

Isn't there an override for shell size? I recall using it a few times.
User avatar
TheJamsh
Bull Dog
Posts: 689
Joined: Sat Feb 19, 2011 5:49 pm

Re: Pre-game shell

Post by TheJamsh »

Haven't been able to find one, looked through render.cfg and the only thing I can find in there is windowed mode resolution.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Pre-game shell

Post by Nielk1 »

Check gameprefs or commandline flags.
User avatar
Cyber
Sabre
Posts: 202
Joined: Sun Feb 20, 2011 5:46 pm

Re: Pre-game shell

Post by Cyber »

I am confused about this 640x480 stuff, too. But the dxtgen converter doesnt allow anything others for "shell background".
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Pre-game shell

Post by Nielk1 »

Cyber wrote:I am confused about this 640x480 stuff, too. But the dxtgen converter doesnt allow anything others for "shell background".
No, the dxtgen converter default rules file doesn't allow anything other than 640 by 480.
User avatar
GSH
Patch Creator
Posts: 2486
Joined: Fri Feb 18, 2011 4:55 pm
Location: USA
Contact:

Re: Pre-game shell

Post by GSH »

No, the dxtgen converter has a special rule to recognize 640x480 background images (which is what 1.0-1.3pb4a used for the shell backgrounds), and only 640x480 images, and if it sees them, it upconverts them to a square power of 2, which makes graphics cards happier. That square power of two is 1024x1024, which is the next power of 2 larger than 640x480. And, it only makes 3 mips of those backgrounds, because the shell backgrounds will never be drawn at low resolutions in the distance.

You could point the shell backgrounds in the .cfg to any other texture you want. Go ahead, point them at a 32x32 unit icon. It'll stretch and look funny, but it'll still draw. If you want to use resolutions over 640x480 for your source art, you might want to create a custom dxtgen rule (it's not hard at all!) to go from the resolution you're editing, and upconvert to the next square power of 2.

Note: if you're trying to do a custom shell with backdrops, be sure to test at screen resolutions that are 4:3 (e.g. 640x480), 16:9 (common widescreen ratio), 16:10 (another common widescreen ratio), 5:4 (e.g. 1280x1024). Don't just make it look good on your monitor, because it'll usually fail. And lining things up against background images in those 4 ratios is going to be a ROYAL PAIN. Good luck. There's a reason why most modern games just have some generic 2D/3D art in the background, and an interface floating on top of it that doesn't line up with the background art. Floating things don't have the lining up problem.

But, BZ2's shell design for the past 12 years has been buttons that line up with background art. I don't want to go off and radically change the shell just to make some small random tweaks better. I get enough grief about random mods being incompatible with 1.3. I got blamed for FE not working on 1.3, when FE thought it owned the shell, and totally replaced everything. Then 1.3 adds items to the pregame shell, and it's somehow my responsibility to go in and patch FE to do the same edits. Mods don't own the shell, but I get blamed for modders that do break things. So, I'm generally subscribing to POLA for BZ2's shell: Principle of Least Astonishment. When I have decisions on a change, I tend to pick the approach that's the least astonishing to someone who's played BZ2 before.

-- GSH
User avatar
TheJamsh
Bull Dog
Posts: 689
Joined: Sat Feb 19, 2011 5:49 pm

Re: Pre-game shell

Post by TheJamsh »

Thats my intention really, to remove the idea of background art. In fact currently im layering shells over each other to enable the background 'video' to keep playing through as many different shell screens as possible, as I can't ever line up the damn buttons to background images (more than enough mods have tried and failed, and being somewhat of a psycho quality control person, i wouldnt be happy with it).

I have looked at the DXTGen rules file, creating rules really isn't that difficult. As you say i'll also have to test things on different resolutions.

If there is no current way to increase the size of the drawn shell objects (scource art is easy enough), then fair do's. My my quip at the moment is its strange how before you load up a world, the shell is forced to run at 640*480. If its a pain to change that, fair enough! I just wondered if there was a localprefs/similar command that would override this in the case of custom background art etc.
User avatar
Zax
Attila
Posts: 1388
Joined: Sat Feb 19, 2011 6:56 am

Re: Pre-game shell

Post by Zax »

Do like, but am wondering if the duplicate asset is a tank due to the picture used.

Shell makes me want to request something...mmm
User avatar
TheJamsh
Bull Dog
Posts: 689
Joined: Sat Feb 19, 2011 5:49 pm

Re: Pre-game shell

Post by TheJamsh »

Nah its just a placeholder, I couldn't get the original 'model' i had for that to work without crashing the game, made a new one now :)

I quite like the searching for sessions one, looks very modern with the little animated spinning loading wheel thing.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Pre-game shell

Post by Nielk1 »

Again, I DID make it bigger and the option most probably IS a command line flag or gameprefs entry. So... LOOK instead of saying "can't be done." and READ the posts others make.
User avatar
TheJamsh
Bull Dog
Posts: 689
Joined: Sat Feb 19, 2011 5:49 pm

Re: Pre-game shell

Post by TheJamsh »

TheJamsh wrote:Haven't been able to find one
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Pre-game shell

Post by Nielk1 »

TheJamsh wrote:
TheJamsh wrote:Haven't been able to find one
Well, any feedback on what you TRIED? Any different tries in different versions? Maybe ta5 and up it can't be done?
Post Reply