[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 488: 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 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - winquake - hud / text scaling?

winquake - hud / text scaling?

Discuss anything not covered by any of the other categories.

Moderator: InsideQC Admins

winquake - hud / text scaling?

Postby qbism » Wed Mar 27, 2013 5:10 pm

Has anyone bothered to code scalable hud or text in winquake? In simplest form, a 2X scale factor to text/ HUD/ icons toggled by cvar or video mode. Conceptually simple but impacts many areas in the code.

Another idea would be to render to a separate hud/console layer. It would be an overlaid alpha-masked bitmap upscaled to screen resolution.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: winquake - hud / text scaling?

Postby leileilol » Wed Mar 27, 2013 5:13 pm

Makaqu and Engoo has it. Similarly Hammer of Thyrion has it (Engoo uses Siggi's patch he submitted for that)

Engoo implements it slightly differently, with a scr_scale cvar, which can also accept decimal values and can scale the whole thing to a virtual 320x200.


The hard part is keeping the refdef consistent with your scale :(

There's also a potential performance problem when you're dealing with scaled transparent pics because it redraws it scaled when the view is refreshed before it. Bad for Quakeworld huds and menus.


I don't know how Makaqu does it, never looked into its source.
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: winquake - hud / text scaling?

Postby qbism » Thu Mar 28, 2013 3:39 am

Thanks, now I recall the HoT thread with that discussion (well, thanks to search). I tried the scaling out in Engoo and didn't notice any slowdown with the menus. And it's terrible that I have not run Makaqu 1.6 until now, was only up to 1.5 :oops:
MQ 1.6 scales the console text also.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: winquake - hud / text scaling?

Postby mankrip » Thu Mar 28, 2013 9:07 am

All calculations and function calls for Makaqu's 2D drawing functions have been changed to use a fixed 320*200 resolution. Internally, the drawing functions scales that by an integer factor and aligns the 2D elements on the screen to the extra screen space that may be there.
This works great across different screen aspects, including really weird ones (try setting vid_mode 2 with vid_config_x 480 and vid_config_y 800 in square pixel aspect mode to simulate a vertically-oriented handheld device, for example).

I haven't implemented stretched scaling because it looks plain ugly to me. But in high resolutions it may be acceptable, so I'm thinking about implementing it.

Large portions of Makaqu's 2D drawing code aren't cleaned up and optimized yet, and the crosshair code is really messy. But they doesn't seem to affect performance.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
/ /
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Re: winquake - hud / text scaling?

Postby qbism » Sat Mar 30, 2013 2:13 am

I'm adding the functions from Makaqu, but scaling by float for better accuracy handling funky resolutions like 1680x1050, 1366x768, 1600x900. 900/200 = 4 int or 4.5 float. I don't know if I will scale console text. Or maybe by lesser factor. It's legible at HD res, (and still larger size than forum links :D ) but that's looking at laptop LCD rather than HDTV or CRT monitor.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest