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.

Newcomers DBPro Corner / Program compiles without error but with no graphics.

Author
Message
Fangs
16
Years of Service
User Offline
Joined: 24th Oct 2008
Location: 40 some miles North of the Emerald Coast
Posted: 25th Aug 2010 02:39
I haven't done anything with this program since 11/08. I brought it out to update and finish it.

The program compiled (dbpro7.2 or 3) correctly and worked fine.

The first thing I saw when I loaded the code into the editor (7.5) was the the editor did not recognize the apostrophe (') as a rem character. After taking care of that problem, the code compiled without error. The only problem, I was greeted with a blank black screen instead of the graphic background and menu buttons I expected.



The Fangman
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 25th Aug 2010 07:26 Edited at: 25th Aug 2010 07:29
Did you turn on syncing? Sometimes when you turn on syncing you need to add a quick SYNC to see the next SYNC.



Your code is a bit weird too. You clear the screen then GET IMAGE #1, then clear the screen again and LOAD IMAGE #1. Why grab a blank image only to overwrite that same image number by loading an image later? And why are you clearing the screen over and over again... all that does is slow it down.

This is all you need:


I'm not sure if you even need SET TEXT SIZE 14 since you never change the text size above that command. The only way it would be needed if it was earlier in the code thats not shown. You really should use .pngs instead of .bmp too. .pngs allow you to use transparencies and they are much smaller than .bmp.

Fangs
16
Years of Service
User Offline
Joined: 24th Oct 2008
Location: 40 some miles North of the Emerald Coast
Posted: 25th Aug 2010 18:24
@ Grog Grueslayer

NOPE! Your code snippet brought in the same results that I've been getting. The prog compiles and then presents a black screen with an over sized cursor.

BTW I compiled and run an earlier version of the prog in codesurge and everything worked as intended. I compared the codes and could find no differences. There are differences, but not in the areas that we are looking at.

If you are interestd in helping me out, I can e-mail you complete prog code. I don't want to impose but am interested in finding why this won't work.

The Fangman
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 25th Aug 2010 19:50
Quote: "NOPE! Your code snippet brought in the same results that I've been getting. The prog compiles and then presents a black screen with an over sized cursor."


Ah. Well, it was a shot in the dark without more code.

Quote: "If you are interestd in helping me out, I can e-mail you complete prog code. I don't want to impose but am interested in finding why this won't work."


Yeah, you can email it to me if you want. I updated my profile so you should see an email button right under my signature. An easier way though is zip up your programs folder and attach it to your next message. That way you get the benefit of the entire Darkbasic community helping you instead of just me.

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 25th Aug 2010 21:35
Are you only loading images?

I have had several instances where I didn't get the "image does not exist" error while the media definitely didn't exist. Instead, DBP chose to create a huge, completely black transparent image.

Furthermore, it seemed that this behavior only occurred with specific file types (I can't really remember which one, but I imagine bitmaps to be one of them).

Cheers!
Sven B

Fangs
16
Years of Service
User Offline
Joined: 24th Oct 2008
Location: 40 some miles North of the Emerald Coast
Posted: 26th Aug 2010 16:39
I have found the answer to my graphics problem!

The settings on my twin Nvidia 9800GT video cards were not correct.

The Fangman
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 27th Aug 2010 01:31
I looked at your code and I must say I'm thrilled you're working with the Zork Tutorial by Pluto. I love Zork so much my last name is an item from Zork.

The code you sent me ran fine after I put in a starting SYNC right after syncing is turned on.

Fangs
16
Years of Service
User Offline
Joined: 24th Oct 2008
Location: 40 some miles North of the Emerald Coast
Posted: 27th Aug 2010 02:59
@ Grog Grueslayer

I noticed that the code went to the main_menu subroutine before sync was turned on. That was the first thing I changed after adjusting my video cards. The adjustment gave me the background graphic but no buttons.

I hooked up my standby computer and found another copy (and later version) of the prog. It works pretty good but a few of the routines are out whack. The starting menu works fine.

I compared the two versions of code and changed the earlier version to match the later...still no buttons!

The Fangman
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 27th Aug 2010 06:41
That's weird... it worked fine for me (see attached image). Is there still a SYNC within the DO/LOOP?



Attachments

Login to view attachments
Fangs
16
Years of Service
User Offline
Joined: 24th Oct 2008
Location: 40 some miles North of the Emerald Coast
Posted: 27th Aug 2010 20:21
@ Grog Grueslayer

It's the FREEKING editor! I had the screen resolution set at 'full screen', 640/480/32. DZ didn't like it and wouldn't give me any buttons. Set at 'fulldesktop screen', and 640/480/16 everything works fine.

I like CodeSurge a whole lot better the Synergy IDE...BUT!

As for your code snippet, exactly like mine except I turned my sync on before the gosub Main_Menu and then put Sync's where they were needed.

The Fangman
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 28th Aug 2010 03:54
I'm glad you figured it out. It's annoying when your code is just right and something else makes it not work.

Quote: "I like CodeSurge a whole lot better the Synergy IDE...BUT!"


I prefer to use BlueIDE myself. It has a handy code library you fill up with your own code snips.

http://blueide.sourceforge.net/

Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 29th Aug 2010 00:48
The idea of code snippets sounds interesting. I'll give this blue IDE a go.

Login to post a reply

Server time is: 2024-11-24 12:09:50
Your offset time is: 2024-11-24 12:09:50