Welcome! Log In Create A New Profile

Advanced

Max Resolution Size of Screen??

Posted by 11ssims 
Max Resolution Size of Screen??
April 18, 2011 10:38PM
Probably a dumb question :/ but please can someone tell me? Need to know for the game im making.



Edited 1 time(s). Last edit at 04/18/2011 10:39PM by 11ssims.
Re: Max Resolution Size of Screen??
April 19, 2011 12:29AM
720x574

But 640x480 is most common.
And then 5% of the screen falls "off screen" on older TVs.

So, don't put anything of important too close to the border
Re: Max Resolution Size of Screen??
April 19, 2011 03:42PM
Alright Thank you!
Re: Max Resolution Size of Screen??
April 20, 2011 01:38PM
Also a texture can be at most 1024x1024 pixels. however you stretch it indefinately.
Re: Max Resolution Size of Screen??
April 27, 2011 11:28AM
Daid is the 720 x 574 resolution is correct? Where did get these values from as I though 640x576 was the top limit?

NTSC @60Hz, 640x480 (USA & Japan)
PAL @50Hz, 640x574 (Europe)
PAL60 @60Hz, 640x480 (for modern European TVs)

Something else worth pointing out as alot of homebrew suffers from this:
When coding your display & logic parts; you need to deal with the 50/60 Hz refresh rate and the difference of 94 pixels when someone is using PAL (50hz). So if you’re using the screen wait (i.e. VIDEO_WaitVSync ) to time your code it will run about 17% slower when in 50Hz mode.
As a rule never mix display logic and game logic, keep them separate.

The worst case could be if someone is developing in PAL 50 without testing out the other display modes, and say is also not being careful about the 5-10% cut-off arround the TV display edge. Their finished product may WILL be unplayable to a very large audience.
Re: Max Resolution Size of Screen??
April 27, 2011 05:10PM
Quote
Titmouse
Daid is the 720 x 574 resolution is correct? Where did get these values from as I though 640x576 was the top limit?
I think it was the widescreen format, found it somewhere in libogc I think.
Re: Max Resolution Size of Screen??
April 27, 2011 05:36PM
wait...so I have 90 extra pixels at the bottom of the screen in PAL? and games run at 50 frames per second instead of 60? wth. Are there any docs on how to code for this?

does this code return the correct numbers? or do I have to start hacking at more stuff?
	screen_width = rmode->fbWidth;	screen_height = rmode->efbHeight;
Re: Max Resolution Size of Screen??
April 27, 2011 08:55PM
In PAL mode the XFB can have a height of 574 pixels, so technically the max is 720x574 if you're game enough to poke values into XFB directly (or use multipass rendering, which is a bad idea). But in this mode the EFB size (which is what GX renders to) is still the same as for NTSC - 640x480. So there's no extra effort needed to support it, except that it's not the default mode selected by libogc for PAL - you have to manually specify TVPal574IntDfScale when calling VI_Configure, otherwise it uses an XFB resolution of 720x528 (with black borders on the top and bottom which looks rubbish) and an EFB resolution of 640x528. I would really like to see this default behaviour changed in libogc...
Re: Max Resolution Size of Screen??
April 27, 2011 11:41PM
11ssims - What type of game are you making?
Re: Max Resolution Size of Screen??
April 28, 2011 02:28AM
I've given up on making homebrew... :/
Re: Max Resolution Size of Screen??
April 28, 2011 02:50AM
why????
Re: Max Resolution Size of Screen??
April 28, 2011 03:59AM
just cant understand what to do...think i'll just read a bit more on C++ then when i understand a bit more...then ill comeback.
Re: Max Resolution Size of Screen??
April 28, 2011 05:43AM
yeah you will have to know a bit of C or try the Lua thing I suggested. eitherway good luck
Re: Max Resolution Size of Screen??
April 28, 2011 06:34AM
Thanks :)
Re: Max Resolution Size of Screen??
April 28, 2011 04:10PM
Try out SDL - Simple DirectMedia Layer, its ideal for game programmers and is very portable across platforms.
SDL does all the hard bits for you - also you can start programming a game on the PC and port it over to the Wii with very minimal effort. Download some small SDL working examples and work up from there - for the moment use something like a PC for the target while you finding you feet.

Just remember to use 640x480 resolution and forget about the frame rate thing and your good to go, flush the rest of the crap I said or anyone else has said from you mind - it's just not relevant for a beginner.

(C++ is good choice it will serve you well, don't forget about stl containers & design templates, C++ does allot for you, so there's no need to reinvent the wheel like the rest of the poor lost souls using plain C)
Re: Max Resolution Size of Screen??
August 29, 2011 11:43AM
Sorry for bumping an old thread but. Whenever I set my wii to widescreen mode some games such as COD:WAW or RE4:wii (which still looks great, imho) start showing up in a stretched/squished wide screen format. This does not happen with homebrew games. How is this effect achieved/enabled?
Re: Max Resolution Size of Screen??
August 29, 2011 06:06PM
I modify the 2Dmode function of GRRLIB to control the aspect ratio depending on the selected setting on wii configuration.
I don't know if it is that you mean:

	f32 yscale, yoffset;
    Mtx view, m;

    GX_SetZMode(GX_FALSE, GX_LEQUAL, GX_TRUE);

    GX_SetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_CLEAR);

	if (rmode->efbHeight >= 520) {yscale =1; yoffset=0;}
	else {yscale=0.87; yoffset=35;}

    guOrtho(m, -yoffset, rmode->efbHeight/yscale, 0, rmode->fbWidth, 0, 1000.0f);
    GX_LoadProjectionMtx(m, GX_ORTHOGRAPHIC);

    guMtxIdentity(view);
    guMtxTransApply(view, view, 0, 0, -100.0F);
    GX_LoadPosMtxImm(view, GX_PNMTX0);

    GX_ClearVtxDesc();
    GX_SetVtxDesc(GX_VA_POS, GX_DIRECT);
    GX_SetVtxDesc(GX_VA_CLR0, GX_DIRECT);
    GX_SetVtxDesc(GX_VA_TEX0, GX_NONE);
    GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
    GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
    GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);

    GX_SetNumTexGens(1);  // One texture exists
    GX_SetTevOp(GX_TEVSTAGE0, GX_PASSCLR);
    GX_SetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR0A0);
    GX_SetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY);

    GX_SetNumTevStages(1);

    GX_SetTevOp  (GX_TEVSTAGE0, GX_PASSCLR);

    GX_SetNumChans(1);
    GX_SetChanCtrl(GX_COLOR0A0, GX_DISABLE, GX_SRC_VTX, GX_SRC_VTX, 0, GX_DF_NONE, GX_AF_NONE);
    GX_SetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR0A0);

    GRRLIB_Settings.lights  = 0;

Re: Max Resolution Size of Screen??
August 29, 2011 06:37PM
I'm not sure. its called Anamorphic widescreen [en.wikipedia.org] but I'm not sure what is used to achieve it. Can't find any homebrew examples.



Edited 1 time(s). Last edit at 08/29/2011 06:37PM by owen.
Re: Max Resolution Size of Screen??
August 29, 2011 07:40PM
Ok. When you display an 16:9 image in a 4:3 TV you have two options:

- Fill all screen viewing a stretched image.
- Display two bands up and down keeping the aspect ratio.

Which do you wanna get?

You can detect the wii configuration using (from ogc\conf.h):

if (CONF_GetAspectRatio() == CONF_ASPECT_16_9) {
    yscale =......; 
    yoffset=......;
} else {
    yscale =......; 
    yoffset=......;
}
guOrtho(m, -yoffset, rmode->efbHeight/yscale, 0, rmode->fbWidth, 0, 1000.0f);

You can set the appropiate configuration patching the GRRLIB_2DMode function and finding the apropiate values for yoffset and yscale for each case.
Probably theese value could be diferent with diferent resolutions (640x480 or 640x520). In my code from previous post you can see how you can detect the resolution configured.
Re: Max Resolution Size of Screen??
August 29, 2011 07:44PM
I want to do option 1: Fill all screen viewing a stretched image. Just like in FZero Gx when the widescreen option is selected.
Sorry, only registered users may post in this forum.

Click here to login