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 / Needing help with DB Pro

Author
Message
Jobie
23
Years of Service
User Offline
Joined: 9th Feb 2003
Location: United States
Posted: 10th Feb 2003 00:36
Hello all,

I'm a professional console game developer by day, but I've been playing with the DB Pro Demo at home just for kicks, and overall it seems pretty powerful, but I have 2 questions (so far):

1. Does DB Pro support object instancing? I want to load one .X file object and place multiple instances in the world. The clone command actually duplicates the object's data, which is not what I want. I want one original set of data, and as many copies as I care to render.

2. I'm trying to set up a menu screen, and I want a bitmap background with 3D objects in front of it. I'm using load image and paste image, which works great for the background, but since I can't specify the draw order, it seems to be overwriting my rendered scene rather than being rendered behind it. (I wish that there would have been a render object command so you could have a bit more control over things like that.)

Thanks in advance for any help you can provide,

John
"Courageous convictions will drag the dream into existence." -Neil Peart (Rush)
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 10th Feb 2003 01:15
I can't answer number 1 for you, but number 2 is possible using 'draw to back'. All 2D drawing operations then happen before the scene is rendered.
Richard Davey
Retired Moderator
24
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 10th Feb 2003 04:20
Hi,

As IanM has said the draw to front/back (and draw sprites first/last) commands will control 2D over 3D. As for object instances this isn't possible at the moment - you've already found the clone object command but you're right, all of the object data including vertices and textures are duplicated. Even with something like limb or mesh creation the same problem will arise. This is something we will look at addressing when the new DBO format is introduced with Patch4.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
Jobie
23
Years of Service
User Offline
Joined: 9th Feb 2003
Location: United States
Posted: 10th Feb 2003 04:33
Ok, thanks to both of you for the response.

Just to make a suggestion. You might consider allowing the programmer to specify what gets rendered and in what order. Your draw to back feature makes possible the specific case that I mentioned, but if I use that, I'm now unable to have any smaller sprites in front the 3D (unless I can turn that off and on in the main loop, but I'm guessing that's a performance hit if it works at all).

So a render manually command to turn off the automatic rendering of 3D objects, and then a draw object command to render specific objects.

Do you think this is something that will/could likely happen?

Thanks in advance,
John

"Courageous convictions will drag the dream into existence." -Neil Peart (Rush)
Richard Davey
Retired Moderator
24
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 10th Feb 2003 04:57
It's something that is possible already to be honest. You cannot control the sequence in which 3D objects are drawn (i.e. "draw object 1 then 5 then 2 then 3" etc) but you can control if 3D is over the top of 2D bitmaps and also if sprites are over the top of 3D or not.

But you can go beyond this as well - if you need to have say 3D ontop of some 2D backdrop but still want to draw a 2D image ontop of the 3D (without using a sprite) then you can lock the primary display surface, write to it and then unlock it again (see the lock pixels command) at the end of your main loop. Using this I don't believe there is any combination of 3D over/on 2D that can't be achieved.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
Jobie
23
Years of Service
User Offline
Joined: 9th Feb 2003
Location: United States
Posted: 10th Feb 2003 05:04
Alrighty then, that's good enough...as long as it's possible to do various combinations of overlapping bitmaps/3D, I don't really mind not being able to specify exact order. That's great information, thanks!

I would really like to see the object instancing ability though...that, so far, is really the only "complaint" I have about the product.

Thanks again for the info!

-John

"Courageous convictions will drag the dream into existence." -Neil Peart (Rush)
Richard Davey
Retired Moderator
24
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 10th Feb 2003 05:16
Yeah agreed, I've already passed your requested onto the rest of the team and we'll see if a "create object instance" command is possible. Patch4 will introduce a complete 3D system overhaul anyway so now would be the time to consider such a feature. I can see how it would be useful - you'd have a single parent object and many instances of it, modify the parent mesh (or texture) and the rest would deform/change. But they can still be positioned and move of their own accord.

At the moment you can achieve a similar result with limbs, but it's not ideal.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
Lee Bamber
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location:
Posted: 12th Feb 2003 00:28
If the end result of the object instance is a large number of them scattered around, then the new Node Tree commands would be used in this case. The object you want to 'instance' would be copied to a fast-rendered scene of geometry that is ideal for walls, trees, etc. I can see the additional benefit of using a single object as the source of instances, and the argument in my mind is the benefit of the memory saved in such an approach over the loss in flexibility to change and modify instances of objects. As it is now, each object is absolutely changable with no restrains. We would suddenly have 'special' objects that cannot be modified in some ways which might complicate a simple idea. I personally like the idea from a pure programming perspective, so I invite others to add the pros and cons to this thread. If it was implemented, it would have the same 3D geometry and texture as the orignal, with the only changes allowed being scale, rotation and position within your 3D world (and perhaps animation and limb information changes too).

ZomBfied
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 12th Feb 2003 01:00
As far as sprites on top of 3d. You could just use plain objects with transparency, depending on the size of the "sprites" desired.

BTW Lee, Rich, I've asked a couple of times why ghosted objects appear behind other objects when they shouldn't sometimes, any word on that?

Login to post a reply

Server time is: 2026-07-06 17:10:13
Your offset time is: 2026-07-06 17:10:13