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 / Several probs with 2D in DBpro

Author
Message
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 1st Mar 2004 23:04
I'm having several problems, i'm hoping they're all related and easily fixed... *crosses fingers*

First of all, the background of the screen is blue. Even if I do 'CLS RGB(0,0,0)' it remains blue, that should make it black surely?

Second of all, I tried to place some text inside a box, and then display a sprite. Which worked fine, until I added the sprite, at that point the text and the box disapeared.
That second prob is easily fixed by putting the text and the box inside the main game loop, but never had to do that with DBC :/

Also my sprites seem a little fuzzier than they should be...
gar, it's all quite frustrating >_x any help would keep me sane, and thus be greatly appreciated ^_^
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 2nd Mar 2004 00:16
Add ",1" to your load image commands to get rid of the fuzzies. And, check out this command...

COLOR BACKDROP
This command will COLOR the 3D backdrop in the specified COLOR. You can specify the COLOR of your choice by using the RGB command to generate the COLOR value to pass into the command. The parameter should be specified using an integer value.

SYNTAX
COLOR BACKDROP Color Value
COLOR BACKDROP Camera Number, Color Value

OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 2nd Mar 2004 00:31
My load image already looks like 'LOAD BITMAP "Images\GUtitle.bmp",1' so that can't be the cause of the fuzziness :?

And the color backdrop rgb(0,0,0) is doing nothing... I still have blue screen background.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 2nd Mar 2004 00:39
What zircher meant was to utilise the extra parameter, like this:

LOAD BITMAP "Images\GUtitle.bmp",1,1

The extra ,1 on the end makes image pixel perfect instead of fuzzy.

Boo!
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 2nd Mar 2004 00:52
Hm, all that's getting me is a error:
"parameter for 'LOAD BITMAP' do not match 'Filename, Bitmap Number' at line 80"
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 2nd Mar 2004 03:16
Oops! Sprites run off images, not bitmaps, you need:

LOAD IMAGE "Images\GUtitle.bmp",1,1

sorry.

Boo!
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 2nd Mar 2004 22:53 Edited at: 2nd Mar 2004 23:00
Thanks that's sorted the problem with the sprites out.

My background is still blue, even with the color backdrop RGB(0,0,0) and/or CLS RGB(0,0,0) lines in place i'm getting blue *edit* after testing, the screen is black, until the first time I use the sprite command to display a sprite, then the background goes blue :/
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 2nd Mar 2004 23:00
Pro has some oddities that will hopefully be fixed on P6, try this instead...

make object sphere 9000,1000
color object 9000,rgb(0,0,0)
set object cull 9000,0

kinda a kludge, but I assume you know how to normaly use the commands and its Pro playing up, you could try the whole latest update/dx version/video driver thing, I must say they do seem to be ok for me .

Mentor.

1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, ATI radeon 9800 pro gfx, 6 way surround sound, 2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 4th Mar 2004 01:38
Well, that's not the problem at all :/ it's the background that is going blue, not the objects. I'm not actually doing anything 3D, it's all sprites... and it's the very moment that I place a sprite that the background is suddenly going blue.

I uploaded the game with source code and everything so hopefully someone can see what i'm doing wrong, please

http://snow.prohosting.com/~tifu2000/games/GUtest.rar
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 4th Mar 2004 13:01
I think you need to put the command BACKDROP OFF in you code. Had the same problem with something I am doing. Just rem the command out in my code had a blue back ground back again. give it a go.

In Space No One can Hear You Scream! (When your comm Line is cut?)
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 4th Mar 2004 19:28
Doesn't seem to be having any effect, i've tried putting it at the start of the code, somewhere in the middle, even within the main game loop... doesn't seem to do a thing
Wouldn't be so annoying if my game wasn't set in black black space
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 5th Mar 2004 00:50
Tried the link but it dosen't seem to work!

In Space No One can Hear You Scream! (When your comm Line is cut?)
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 5th Mar 2004 01:05
Were you saving target as?
The way prohosting does it is they make a page you have to visit before you can download the thing, shouldn't be any popups or anything, just banner thingies on the site... so you have to go there then save it. That should work, unless everything is going horribly pear shaped D:
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 5th Mar 2004 21:37 Edited at: 5th Mar 2004 21:38
errr!... what the code was intended to do is put you inside a black object and let you see it from the inside, this gives you a black background (oddly enough ), which was the effect you wanted, you can`t see the default background since you see the sphere first, and thats black, so you see black , example code follows....



Don`t forget sprites are 3D plains in Pro, you could use a large black sprite if that makes you happier, since the 3D commands are better sorted than the 2D in Pro you might want to use plains rather than sprites, just move them all at the same zdepth and et-voila!, sprites!.

Mentor.

1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, ATI radeon 9800 pro gfx, 6 way surround sound, 2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 5th Mar 2004 22:50 Edited at: 5th Mar 2004 22:50
In dbpro sprites are just 3d planes. Thats why using them gives you a blue background.

There is a tutorial about it here

I just put CLS at the top of the loop.
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 5th Mar 2004 22:52
OH! Sorry, I see what you mean now *slaps forehead*

A box command seems to work too, struggle for ages for a solution to a problem and then three come along at once, typical
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Mar 2004 23:23
Actually, getting DBPro to disable the blue backdrop without having to clear the screen or draw a black object is quite easy.

The steps are:
1 - Create a sprite
2 - Use the SET SPRITE command to disable the back-save on the sprite
3 - Use the BACKDROP OFF command to disable the blue screen
Optionally - Use the SET SPRITE command to re-enable the back-save.

Unfortunately, re-enabling the back-save effectively causes DBPro to do a GET IMAGE on the backdrop ... and we all know how slow that is.



For free Plug-ins, source and the DBPro Interface library for Visual C++ 6 and .NET
http://www.matrix1.demon.co.uk

Login to post a reply

Server time is: 2024-11-26 07:48:56
Your offset time is: 2024-11-26 07:48:56