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.

DarkBASIC Professional Discussion / Runtime error 7008 whenever I press windows key and go back to game

Author
Message
Eminent
16
Years of Service
User Offline
Joined: 15th Jul 2010
Location:
Posted: 8th Dec 2010 00:00
I've been working on a game for NaGaCreMo but what irks me is that I'm trying to take a video of the game, the Video Capture software has to go back to Windows and I have to press the games launch button thing on the bar(thw thing with the start menu icon and stuff). Whenever I do so, it crashes with a "Runtime Error 700bject does not exist at line 116: Object number(1)". I know for a fact that I put object 1 as the player. This is line 116:

I have a do right before that line. Anyone know how to fix this?


miso
16
Years of Service
User Offline
Joined: 16th Jun 2010
Location: Budapest, Hungary, 127.0.0.1
Posted: 8th Dec 2010 00:06
I think you run it in fullscreen mode, change it to fulldesktop for the time you make the video. I think it will solve the problem.

No place like 127.0.0.1 .
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 8th Dec 2010 15:16
That's caused by DBPro having to loose all the media - so when you alt+tab, or do anything to loose focus on your game, it will loose its media. I think windowed mode avoids this issue, so use that, or fullscreen windowed. The other alternative is to setup all your media again when this happens - like use a function to load and setup your 3D media and textures, and call it when object 1 disappears - check for it on each sync and re-load the media if needed.

This can be a real pain if you have popups - like RealPlayer wants to do an update, then it'll take focus for it's little window, and crash your program - same goes for anti-virus software. These days I like to use a media setup function that can be re-called, especially for platforms like the Netbook and AppUp.

Health, Ammo, and bacon and eggs!
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Dec 2010 17:29
Quote: "These days I like to use a media setup function that can be re-called, especially for platforms like the Netbook and AppUp."

That would be a handy function to post... if you're willing?

Does compiling in "full desktop" avoid this issue?

thenerd
17
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 8th Dec 2010 17:50
Quote: "Does compiling in "full desktop" avoid this issue?"

Yes, but it'll cost you in performance and image quality.


MMM
17
Years of Service
User Offline
Joined: 21st Jan 2009
Location: NSW, Australia
Posted: 12th Dec 2010 00:12
In smaller linear games, the re-load media function works fine. I use it on AppUp. It starts to get tricky when you have dynamically created environments where the data isn't necesarrily stored outside the objects themselves. The solution is to go ahead and store that info using arrays, variables, etc. But that's a lot of work if you've already used option A over option B.


The load media function would just be a function to reload all you're media - just as you did at the start of your program - which might result in a short loading period upon re-entering the game. The trick is to know which asset numbers apply to which asset on the screen - as in the case I've stated above.

Neco
18
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Waterloo, Wisconsin USA
Posted: 12th Dec 2010 01:09 Edited at: 12th Dec 2010 01:10
What about creating a function that saves the game state (some kind of memory dump?) and when this kind of screen switching happens, have it restore the game state?

That might get around the issue for dynamically generated stuff? Or better yet, if there are any open source samples of games that dynamically generate stuff, look through their code to see how they deal with the problem?

Login to post a reply

Server time is: 2026-07-21 11:25:38
Your offset time is: 2026-07-21 11:25:38