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 / disappearing sprites

Author
Message
thedubdude
23
Years of Service
User Offline
Joined: 24th May 2003
Location: San Jose, Ca.
Posted: 1st Nov 2010 07:34
I'm at a stand still. I developed a program that uses alot of sprites. I then integrated this program into a 2nd very large program. I compile the combined programs and the DBPro screen sits in the task bar but the screen doesn't show. I know it is running in a loop and that the sprites that I created exist as I use DEBUGLOG to check SPRITE EXIST. I then click on the DBPro icon in the task bar....a black screen shows and an SPRITE not exist error stops the program from executing. Somehow, the act of clicking on the DBPro program in the task bar deletes all my SPRITEs. The program will run in a loop forever in the task bar but after I click on it the SPRITEs are deleted and the program dies.

What is particulary odd is that, in an effort to figure out what is going wrong, I only execute the code of the 1'st working SPRITE program, within the combined program. The code from the 2nd program I combined it with never executes.

I'm using DBPro 1.073 and Windows 7. Any ideas would be helpful. I'm stuck.Thanks in advance...
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 1st Nov 2010 07:45 Edited at: 1st Nov 2010 07:45
Before people start landing some very specific suggestions or requests to show code...

Clicking On The TaskBar:
Make sure you are running in Windowed Mode or it will delete all the textures in memory when the program is minimized or window focus is lost.

Merging Two Programs:
Double check the scope of all your variables. You very likely have things overlapping. This is very common.

Finding the Problem:

Use this to make your program terminate with a message. Keep working backward until you reach code that actually executes. Then test your variables there to find out what is going wrong. Then when the problem variable is found work back further in that direction.

thedubdude
23
Years of Service
User Offline
Joined: 24th May 2003
Location: San Jose, Ca.
Posted: 2nd Nov 2010 06:23
Dear Mage...you are my hero. I've been working on this problem for weeks. I had no idea that I needed to run my program in Windowed Mode!! With this setting my beautiful sprites are restored. Thank you. I almost gave up.
thedubdude
23
Years of Service
User Offline
Joined: 24th May 2003
Location: San Jose, Ca.
Posted: 2nd Nov 2010 08:03
Now thinking back, the reason I ran the program in full screen mode was to effectively hide the task bar. With the program now in windowed mode the task bar shows. Is there a way to hide the task bar in windowed mode? Thanks in advance for your help.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Nov 2010 15:43
In the newer IDE, it's called 'fulldesktop' mode. That gives you a fullscreen window that covers the task bar.

Utility plug-ins (26-JUL-2010)
I'm applying terms of use that require you to wear a red nose and honk a horn whenever you use the Internet

Login to post a reply

Server time is: 2026-07-26 05:03:44
Your offset time is: 2026-07-26 05:03:44