Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / using dual screens

Author
Message
MikeP
14
Years of Service
User Offline
Joined: 9th Oct 2010
Location:
Posted: 9th Oct 2010 16:22
Hi
Has anyone noticed that darkgdk programs don't render grasphics and text properly? Is there anyway to get around this as I usually use two screens to program in visual studio. Also, is there anyway use maybe take advantage of dual screen gaming in dark gdk? (I'm thinking for formula type games) (just a thought)
Thanks,
Mike
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 11th Oct 2010 14:56
how so? i never noticed such problem, maybe a screen-shot would help?

[url][/url]
Nothing's impossible, it's just a matter of time...
MikeP
14
Years of Service
User Offline
Joined: 9th Oct 2010
Location:
Posted: 11th Oct 2010 18:58
sorry i should have been clearer. It only has the problem when you extend the desktop to another screen. However, when I unplug the screen it renders fine.
Maybe clues to the source of the problem:
-it doesn't print the correct font when using dual screens
-I use windows 7
-The graphics don't appear at all in dual-screen mode.
MikeP
14
Years of Service
User Offline
Joined: 9th Oct 2010
Location:
Posted: 11th Oct 2010 19:11
I have tried to screenshot my game but it just shows a blank screen. :/
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 12th Oct 2010 14:53
can you upload the exe? i have windows 7 and 2 monitors, i'll see if it also happens to me (i don't have gdk so i can't rebuild)

[url][/url]
Nothing's impossible, it's just a matter of time...
MikeP
14
Years of Service
User Offline
Joined: 9th Oct 2010
Location:
Posted: 12th Oct 2010 15:49
ill upload the exe this evening . Thanks for your help btw
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 12th Oct 2010 17:14
I have XP and dual screens work fine as far as I can tell, just slows down alot when window is overlapping both screens, but that is understandable.

What Visual Studio do you use?
Is it true that only VS2010 supports multiple monitors? Thanks.

MikeP
14
Years of Service
User Offline
Joined: 9th Oct 2010
Location:
Posted: 12th Oct 2010 19:02
heres the exe for you to try.
I use VS 2008 but on my other screen I like to have an excel document or (to scale) drawing of the map in my game for coordinates. It's just easier than having to flick through applications on a small screen. :L


You probably won't see images because I haven't included them (for upload file size) but you should sill be able to see the difference in text font.

Attachments

Login to view attachments
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 13th Oct 2010 15:14
Quote: "Is it true that only VS2010 supports multiple monitors? Thanks."


hmm, i dunno, but probably not true, it's just a compiler, i don't think it has anything to do with that

@MikeP
i see no exe , and i don't really see the problem in the photo, everything is blurry in the screen, how about alt-print screen?

honestly, till now i don't even know what's wrong, different font than expected? buggy font somehow? what exactly? it might be a problem in your code

well anyway, upload the exe so i can see what's happening

[url][/url]
Nothing's impossible, it's just a matter of time...
MikeP
14
Years of Service
User Offline
Joined: 9th Oct 2010
Location:
Posted: 13th Oct 2010 16:02
Hmm maybe it didn't upload because I'm a new member ;/ ill try again tonight
MikeP
14
Years of Service
User Offline
Joined: 9th Oct 2010
Location:
Posted: 13th Oct 2010 20:13
here the exe again.

Attachments

Login to view attachments
MikeP
14
Years of Service
User Offline
Joined: 9th Oct 2010
Location:
Posted: 13th Oct 2010 20:17
heres the other photo (sorry it didn't upload right :S)

Attachments

Login to view attachments
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 14th Oct 2010 14:57
what the hell is going on there...my screen keeps flashing forever, probably code errors? can i see your code? if not, maybe just how you initialize it?

[url][/url]
Nothing's impossible, it's just a matter of time...
MikeP
14
Years of Service
User Offline
Joined: 9th Oct 2010
Location:
Posted: 17th Oct 2010 12:25
I checked and ran the file on my laptop and it runs fine ( in non-dual screen mode), I don't get any flashing. The program has a resolution of 1336, 768. (widescreen). I have change my c++ code top use subs now instead of labels so I'll post a new exe with this aswell
When using the program don't what ever you do press enter cause im still debugging it and if you press enter it ends up in a really bad loop of continually loading objects into the memory. (tried this for 10 mins and it loaded over 700mb (and still counting :L)). To exit just press ESC.
Heres the first 150 lines of my code:

#include "DarkGDK.h"
#include "SC_Collision.h"
#include <string>
int queID = 0;
int returnbmp = 0;
int storeinvent = 0;
int weaponsinvent = 0;
int currInvent = 0;
int score = 0;
int lives = 5;
int injump = 0;
int hjump = 0;
int x = 50;
int y = 10;
int z = 50;
int a = 60;
int d = 400;
int h = 10;
int s = 25;
int pause=0;
int xtodo=800;
int ztodo=400;

void mainmenu ( void );
void helpmenu ( void );
void LoadCampaign ( void );
void checkcollision ( void );
void chooseQ ( void );
void chooseQstore ( void );
void control ( void );
void Map002 ( void );



void DarkGDK ( void )
{

dbSetDir ( "C:\\Users\\Owen\\Documents\\Visual Studio 2008\\Projects\\Dark GDK - Game1\\Dark GDK - Game1\\Debug\\\\");
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
SC_Start( );
dbMakeMemblock ( 1, 1 );
dbDeleteMemblock (1);
dbMaximizeWindow();
dbSetWindowOff();
dbSetDisplayMode (1366, 768, 32);
dbCLS ();
dbSetTextFont ("Chiller");
dbSetTextSize (30);


dbSetImageColorKey (255,255,255);
dbCLS (dbRGB ( 0, 0, 0));
dbInk (dbRGB(255,255,255), dbRGB(0,0,0));
dbLoadImage ( "Title.bmp", 254);
dbSprite (254, 300, 50, 254);
dbShowSprite (254);
dbLoadImage ( "MenuB1.bmp", 7);
dbLoadImage ( "MenuB2.bmp", 8);
dbLoadImage ( "MenuB3.bmp", 9);
dbLoadImage ( "MenuB4.bmp", 6);
dbSprite (7, 35, 600, 7);
dbSprite (8, 372, 600, 8);
dbSprite (9, 699, 600, 9);
dbSprite (6, 1036, 600, 6);
dbSetSpriteAlpha (7, 255);
dbSetSpriteAlpha (8, 20);
dbSetSpriteAlpha (9, 20);
dbSetSpriteAlpha (6, 20);
mainmenu();
}
void mainmenu()
{
dbSync ( );
dbSync();
dbShowSprite (254);
dbShowSprite (7);
dbShowSprite (8);
dbShowSprite (9);
dbShowSprite (6);
while ( LoopGDK ( ) )
{
dbSync ( );
//dbSync();
dbCLS (dbRGB ( 0, 0, 0));
if (dbReturnKey() == 1)
{
if (dbSpriteAlpha(7) == 255)
{
dbHideSprite(7);
dbHideSprite(8);
dbHideSprite(9);
dbHideSprite(6);
LoadCampaign();
}
if (dbSpriteAlpha(8) == 255)
{

}
if (dbSpriteAlpha(6) == 255)
{

}
if (dbSpriteAlpha(9) == 255)
{
helpmenu();
}
}
if (dbRightKey() == 1)
{
if (dbSpriteAlpha(9) == 255)
{
dbSetSpriteAlpha(7, 20);
dbSetSpriteAlpha(8, 20);
dbSetSpriteAlpha(9, 20);
dbSetSpriteAlpha(6, 255);
}
if (dbSpriteAlpha(8) == 255)
{
dbSetSpriteAlpha(7, 20);
dbSetSpriteAlpha(8, 20);
dbSetSpriteAlpha(9, 255);
dbSetSpriteAlpha(6, 20);
}
if (dbSpriteAlpha(7) == 255)
{
dbSetSpriteAlpha(7, 20);
dbSetSpriteAlpha(8, 255);
dbSetSpriteAlpha(9, 20);
dbSetSpriteAlpha(6, 20);
}
dbWait(150);
}
if (dbLeftKey() == 1)
{
if (dbSpriteAlpha(8) == 255)
{
dbSetSpriteAlpha(7, 255);
dbSetSpriteAlpha(8, 20);
dbSetSpriteAlpha(9, 20);
dbSetSpriteAlpha(6, 20);
}
if (dbSpriteAlpha(9) == 255)
{
dbSetSpriteAlpha(7, 20);
dbSetSpriteAlpha(8, 255);
dbSetSpriteAlpha(9, 20);
dbSetSpriteAlpha(6, 20);
}
if (dbSpriteAlpha(6) == 255)
{
dbSetSpriteAlpha(7, 20);
dbSetSpriteAlpha(8, 20);
dbSetSpriteAlpha(9, 255);
dbSetSpriteAlpha(6, 20);
}
dbWait(150);
}


dbText(100, 700, "Game for Unit 4 Owen Michael Pemberton 2010 (C++ Version)");
dbText(602,5,"------Main Menu------");
}
}

Attachments

Login to view attachments
MikeP
14
Years of Service
User Offline
Joined: 9th Oct 2010
Location:
Posted: 17th Oct 2010 12:33
Btw as i said before you won't see image because they are too big to include, but you should still see the difference in font from when using dualscreen (extended desktop) and when just using one screen.
It could just be my graphics card or my laptop :L.
If you want to see the difference when using images then just add random images with these names:
"Title.bmp"
"MenuB1.bmp"
"MenuB2.bmp"
"MenuB3.bmp"
"MenuB4.bmp"

the MenuB#.bmp are buttons at size : 300x100
and the title image is: 800x500

Maybe it happens because I have my laptop screen at res. 1336x768 plugged in to a 1280x1024 screen.
N3wton
15
Years of Service
User Offline
Joined: 3rd Jun 2009
Location: Leeds, UK
Posted: 17th Oct 2010 13:49
I just ran the exe, worked fine...

dual screen, both screens at 1600x900 res, all text was clear as day...

Yours
N3wton

MikeP
14
Years of Service
User Offline
Joined: 9th Oct 2010
Location:
Posted: 18th Oct 2010 00:18
Maybe its because I have my screens set at different resolutions or maybe its just my laptop :/ anyway thanks everyone for your help.

Login to post a reply

Server time is: 2024-11-19 18:35:38
Your offset time is: 2024-11-19 18:35:38