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 / Simple Image Trouble

Author
Message
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 28th Jul 2012 23:01
I've dabbled with DB Pro long ago and imagine I've simply forgotten some form of display setting, or someting. The following compiles correctly, so I assume the image is loading ok, but why is nothing displayed? I don't think it's a flag issue - I've played with every conceivable combination...



They call me crazy, but it is I who am insane!
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 29th Jul 2012 01:03
Hi Foz,

I tried running your code and it wouldn't compile until I changed "sync 40" to "sync rate 40" so you might want to try that.

I can't see anything else wrong so if it's still coming up black then there might be something wrong with the png file. If you want, you can attached the png file and I'll see if it loads.
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 29th Jul 2012 01:47
Yeah, I meant sync rate - 'Fraid that's not it. I also tried it with .bmp images with no luck. They were all made with Paint Shop Pro - could there be something special I need to do to files I make with that program?

They call me crazy, but it is I who am insane!
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 29th Jul 2012 02:55 Edited at: 29th Jul 2012 02:55
Are you sure you have you computer switched on?

Ok, probably not a good time for jokes but I think I know what's wrong! Have you created a project file?

I created a png, ran your code without a project file and I get a black screen. This means that the program can't locate the png file but still allows the program to run.

With the code you have, you need the png, the dba file (source code) and dbpro file (the project file) all in the same folder.
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 29th Jul 2012 04:12
Holy Crap - maybe it IS the time for jokes...how could I miss something that big? Guess I've spent too much time with the XNA editor. Well, thanks for the help - probably would'a ended up jumping into traffic before finding that out on my own...

They call me crazy, but it is I who am insane!
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 29th Jul 2012 23:41
Since I've already attained the title 'noob of the month', I might as well ask the following:

I had just assumed that the dbpro file you mentined would be automaticlly created when you selected 'new project'. Since it is not, how do u go about doing that...

They call me crazy, but it is I who am insane!
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 29th Jul 2012 23:58
Noob of the month? It might be a bit longer than that

When I moved over from DBC it took me a while to get my head around the project files. What I do to create a new project is:

Open up DBPro and you get the "untitled" code window (of what ever itt's called).

You can then simply save the project:

File > save project as

The save the file:

File > save as

I tried using the FILE > NEW > PROJECT but for some reason it struggled to save projects when I wanted them.

If you're using the default editor: to the left of the code window, there another window with some tabs at the bottom. Click the tab that say "solutions explorer" this will show all the dba files attached the project. What this means, is that all functions (and I believe labels, sub-routines and date lables) will be shared across all the file. If you right click a dba file you can swap it out as main or remove files. If the want to add a new file to the project select "project" (top left of solutions window) then select "add new file", you can also add files from import existing files. For messing about with snippets, I just have a single project file called "stuff" then create, remove and swap around dba files, which saves faffing about with lots of project files.
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 30th Jul 2012 00:48
We're not exactly on the same page. I know how to do all that - anyone can create a file and manually give it the extension '.dbpro', I guess I'm asking what the compiler is expecting that document to contain. I've used several different IDE's for several different languages, and all of them automatically created whatever files were needed beyond the one containg the source code...

They call me crazy, but it is I who am insane!
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 30th Jul 2012 03:30 Edited at: 30th Jul 2012 03:31
No that's all you do. I usually just make a text document, and change the name to DBA instead of txt. Then double click it, and the rest is all done automatically. You just start typing in it.

Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 30th Jul 2012 04:04 Edited at: 30th Jul 2012 04:55
Right, but I need the .dbpro file, not the .dba - is it done the same way?...seems strange.

They call me crazy, but it is I who am insane!
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 30th Jul 2012 16:36 Edited at: 30th Jul 2012 16:45
Quote: "Right, but I need the .dbpro file, not the .dba - is it done the same way?...seems strange."


If you do it with a DBA file the DBPro file is created automatically. I find that DBA files boot up without a loss of the file. Sometimes you lose a file that is loaded as DBPro and forget to save the source code. So it is just safer to load the empty DBA, and then do a bit of programming, and then save all, or click the 3 disc squares.

Click New Text document. Rename a txt as DBA, so Game.dba. Double click it, and a DBPro file is saved Game.DBpro. Do some programming, and click the 3 disc squares. Make sure that DBA files are loaded with DBPro, and not DB Classic.

29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 31st Jul 2012 01:07
Sorry Foz, I didn't mean to be patronizing.

I didn't know the project file could be created automatically.

Yeah, I don't think you actually need to do anything with the project file as such. I think things that you set in the properties windows (application name, icon, screen resolution etc) and any links to media that you've made are saved to it. I say I "think" because I've never used this before.
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 31st Jul 2012 10:10
Whew...what a mess. It finally worked - I just made a new project, being very careful to let it simply save in the original projects folder that it defaults to when you first install DB. Sure enough, after dbl clicking the .dba file I manualy navigated to the new project folder and found the .dbpro file there waiting for me, like you said.

I Guess it was the act of trying to make it save the new project into my own folder outside of 'The Game Creators' stuff that made it hick-up the first time and not create everthing - dunno...

Thank you both for hanging around long enough for me to figure this out...

They call me crazy, but it is I who am insane!

Login to post a reply

Server time is: 2024-04-19 14:34:11
Your offset time is: 2024-04-19 14:34:11