Posted: 18th Aug 2011 7:51
How do you set the screen res on windows PC? I have used the commands SetVirtualResolution, SetDisplayAspect and SetResolutionMode. None of them are doing what I need. I changed the variables in the setup file and that made the window bigger but the text is blurry. All I want to do is set the screen res for the PC and have the text displayed nice and sharp. Any help?
Posted: 18th Aug 2011 9:20
Using Tier1?
You cannot do that, at least right now.
Posted: 18th Aug 2011 9:45
Tier 1 yeh. Thanks ill just have to wait.
Posted: 18th Aug 2011 10:05
You can do it, you need to change the resolution values in setup.agc
Posted: 18th Aug 2011 11:46
He wants to set the desktop resolution of the PC, not the Window size.

As far as i can see you can only change the Window size from setup.agc
Posted: 18th Aug 2011 15:40
Setting the values in setup.agc changes the window size, and window resolution to match. The text can only get sharper if you use a higher resolution font image as well.
Posted: 18th Aug 2011 17:29
Setting the values in setup.agc changes the window size, and window resolution to match. The text can only get sharper if you use a higher resolution font image as well.


I have just messed around with a few sprites and they look fine with the way I set things up before. The thing I don't get is what is the font then? Is it a image and not a proper font like in DBP.
Posted: 18th Aug 2011 18:20
As far as I understand AppGameKit it uses bitmap fonts ... DBPro uses Windows fonts ... they look better if you increase textsize.
Posted: 18th Aug 2011 18:33
The AppGameKit uses bitmap fonts, it has a built in image called ascii.png that it will use unless you provide your own image called ascii.png in your media directory.

It also has one called Arial.png built it but doesn't use it by default, you can change to it by using

+ Code Snippet
arial = LoadImage( "Arial.png" )
SetTextDefaultFontImage( arial )


Note that this only affects text objects, Print commands always use the ascii.png image.
Posted: 18th Aug 2011 21:55
Ah thanks all. I was looking in the wrong place. I kept thinking it was resolution
Posted: 19th Aug 2011 4:42
To go full screen in Windows, simply:

rem Go to SETUP.AGC and set FULLSCREEN=1
SetVirtualResolution ( GetDeviceWidth(), GetDeviceHeight() )
LoadImage(1,"background1.jpg")
CreateSprite(1,1)
while GetPointerPressed()=0
Sync()
endwhile

This will give you full screen to the size of the desktop, and a perfect 1:1 back buffer for your graphics. Be aware that when you do this your bitmap fonts will be substantially smaller than normal on large resolutions so you should look at the documentation on how you can provide higher resolution fonts for your app.
Posted: 19th Aug 2011 9:06
How can we do Fullscreen for Tier2 windows?
Posted: 19th Aug 2011 15:59
Yes i'm wondering how to do it on Tier 2 also..
Posted: 19th Aug 2011 16:42
+ Code Snippet
agk::SetVirtualResolution ( GetDeviceWidth(), GetDeviceHeight() );
agk::LoadImage(1,"background1.jpg");
agk::CreateSprite(1,1);
while GetPointerPressed()==0 {
   agk::Sync();
}

?
Posted: 19th Aug 2011 18:51
That's not enough Mobiius. You have to set DEVICE_WIDTH and DEVICE_HEIGHT in Cope.cpp too. And even that is not enough, as window borders are still there.

I saw a fullscreen=True & some screen settings code in Core.cpp but all was commented out.
Posted: 20th Aug 2011 0:39
I saw a fullscreen=True & some screen settings code in Core.cpp but all was commented out.


No need to uncomment anything, just set the final parameter of CreateWin32Window() to "true"
Posted: 20th Aug 2011 9:12
Thanks Paul, it works & resizes beautifully
Posted: 20th Aug 2011 9:13
How would we do this in Xcode 4? I see the following code commented out in Core.mm but there is warning comment since full screen hides the mouse or something :

if ( App.g_dwFullScreen==1 ) wfflag=GLFW_FULLSCREEN;
Posted: 20th Aug 2011 9:34
DarkGDK had the option to run custom Windows code before execution.

Is there anything similar in AppGameKit, so that I could do a small selector to set screen resolution etc, before app::Begin executes?
Posted: 23rd Aug 2011 17:25
Got around setting the agk window the way i want on Windows.

Now I moved onto MacOS, where I am stuck.

I am interested to have these options:

1. set full screen mode.

2. switch off the green maximise button. I don't want my window to be resized in any way.

3. switch off windows resizing. I don't want my window to be resized in any way.