i just get the same "Can't open screen !" errmsgStarBootics wrote:By the way did you try my version of Snakes of balls demo on WinXP and Win 7 ?
DigitalClock Animation
Re: DigitalClock Animation
- StarBootics
- Addict
- Posts: 1006
- Joined: Sun Jul 07, 2013 11:35 am
- Location: Canada
Re: DigitalClock Animation
I can't reproduce this problem under WinXP, I get an error about creating sprites instead.
I don't have any computer with Win7 so you will have to figure out the problem your self. Perhaps a bug in PureBasic V5.50.
If you try this code :
What do get as error message ?
Best regards
StarBootics
I don't have any computer with Win7 so you will have to figure out the problem your self. Perhaps a bug in PureBasic V5.50.
If you try this code :
Code: Select all
If InitKeyboard() = 0 Or InitSprite() = 0 Or InitMouse() = 0 ; Or InitSprite3D() = 0
MessageRequester("ERROR","Can't initialize DirectX !")
End
EndIf
ExamineDesktops()
Screen_W = DesktopWidth(0)
Screen_H = DesktopHeight(0)
If OpenScreen(Screen_W, Screen_H, 32, "Sprite Demo") = 0
MessageRequester("ERROR", "Can't open 32 bit screen !")
If OpenScreen(Screen_W, Screen_H, 24, "Sprite Demo") = 0
MessageRequester("ERROR", "Can't open 24 bit screen !")
If OpenScreen(Screen_W, Screen_H, 16, "Sprite Demo") = 0
MessageRequester("ERROR", "Can't open 16 bit screen !")
End
EndIf
EndIf
EndIf
Repeat
If IsScreenActive()
ClearScreen(0)
Else
Delay(10)
EndIf
FlipBuffers()
ExamineMouse()
ExamineKeyboard()
Until KeyboardPushed(#PB_Key_All) ; MouseDeltaX() Or MouseDeltaY() Or MouseWheel() Or
CloseScreen()
End
Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
Re: DigitalClock Animation
in both XP and Win7 i get the same result ... Can't open 32bit screen, click ok, then Cant open 24bit screen, click ok, then Cant open 16bit screen
- StarBootics
- Addict
- Posts: 1006
- Joined: Sun Jul 07, 2013 11:35 am
- Location: Canada
Re: DigitalClock Animation
Very strange to me, look like a bug somewhere within PureBasic it's self.Keya wrote:in both XP and Win7 i get the same result ... Can't open 32bit screen, click ok, then Cant open 24bit screen, click ok, then Cant open 16bit screen
Just for curiosity :
Code: Select all
InitSprite()
If ExamineScreenModes()
While NextScreenMode()
Debug Str(ScreenModeWidth())+"x"+Str(ScreenModeHeight())+"x"+Str(ScreenModeDepth())+"@"+Str(ScreenModeRefreshRate())+"Hz"
Wend
EndIf
StarBootics
The Stone Age did not end due to a shortage of stones !
Re: DigitalClock Animation
800x600x16@60Hz
640x480x16@60Hz
1024x768x16@60Hz
1152x864x16@60Hz
1280x960x16@60Hz
800x600x32@60Hz
640x480x32@60Hz
1024x768x32@60Hz
1152x864x32@60Hz
1280x960x32@60Hz
1280x960x32@60Hz
800x600x32@60Hz
im using 5.42LTS, but i just also tested with 5.31 and same problem
I also redid all the tests in both inside VM and on my non-VM host machine, same problem
I dont play any games so perhaps i dont have directx or opengl or whatever installed - if that's needed?
640x480x16@60Hz
1024x768x16@60Hz
1152x864x16@60Hz
1280x960x16@60Hz
800x600x32@60Hz
640x480x32@60Hz
1024x768x32@60Hz
1152x864x32@60Hz
1280x960x32@60Hz
1280x960x32@60Hz
800x600x32@60Hz
im using 5.42LTS, but i just also tested with 5.31 and same problem
I also redid all the tests in both inside VM and on my non-VM host machine, same problem
I dont play any games so perhaps i dont have directx or opengl or whatever installed - if that's needed?
Last edited by Keya on Sat Sep 10, 2016 3:40 am, edited 1 time in total.
- StarBootics
- Addict
- Posts: 1006
- Joined: Sun Jul 07, 2013 11:35 am
- Location: Canada
Re: DigitalClock Animation
This doesn't make any sense ! You should be able to open a screen properly with one of these settings. You should report this as a bug under Windows. But first make sure you have the latest graphic card driver installed, perhaps the problem came from there.Keya wrote:800x600x16@60Hz
640x480x16@60Hz
1024x768x16@60Hz
1152x864x16@60Hz
1280x960x16@60Hz
800x600x32@60Hz
640x480x32@60Hz
1024x768x32@60Hz
1152x864x32@60Hz
1280x960x32@60Hz
1280x960x32@60Hz
800x600x32@60Hz
im using 5.42LTS, but i just also tested with 5.31 and same problem
Edit : I have discovered an issue in the FullScreen Module, it's now corrected, see the First post for the download link.
Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
- Kwai chang caine
- Always Here
- Posts: 5494
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: DigitalClock Animation
Excuse me for the late answerStarBootics wrote:Can you run this code and post back the Debugger output ?
Best regards
StarBootics

This is the result
Debugger wrote:1680
1050
32

Not a destination
- StarBootics
- Addict
- Posts: 1006
- Joined: Sun Jul 07, 2013 11:35 am
- Location: Canada
Re: DigitalClock Animation
Hello everyone,
I have updated the source to solve the problem pointed out by Kwai chang caine (thanks by the way), see DigitalClock::CreateScreen() instruction for details.
See the first post for the download link.
Best regards
StarBootics
I have updated the source to solve the problem pointed out by Kwai chang caine (thanks by the way), see DigitalClock::CreateScreen() instruction for details.
See the first post for the download link.
Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
- StarBootics
- Addict
- Posts: 1006
- Joined: Sun Jul 07, 2013 11:35 am
- Location: Canada
Re: DigitalClock Animation
Hello everyone,
I have take a little break from my game project and re-visited an old code. So this is the version 6 of the DigitalClock FullScreen animation. Nothing is different from the previous version. The main difference is the OOP programming style just to see if the code get any slower in comparison with the Modular approach. I don't see any difference at all. You can download the new source code here :
https://www.dropbox.com/s/vo9v57dh41488 ... 6.zip?dl=0
Best regards
StarBootics
I have take a little break from my game project and re-visited an old code. So this is the version 6 of the DigitalClock FullScreen animation. Nothing is different from the previous version. The main difference is the OOP programming style just to see if the code get any slower in comparison with the Modular approach. I don't see any difference at all. You can download the new source code here :
https://www.dropbox.com/s/vo9v57dh41488 ... 6.zip?dl=0
Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !