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.

Dark GDK / Questions about the DarkGDK

Author
Message
InfamousNoone
15
Years of Service
User Offline
Joined: 19th May 2009
Location:
Posted: 20th May 2009 07:45
Hi, I've been using the DarkGDK in C++ for awhile now (and I'm enjoying it), and I've come across some questions I'd like answered before I continue developed, please.

On the Wiki documentation it states:
Quote: "
http://darkgdk.wikia.com/wiki/DbLoadObject
the old object will be replaced by the newly loaded one.
"


Does this mean that the current object will be freed (dbDeleteObject) automatically? If not, it seems to imply this (not deleting it *seems* to cause a memory leak, as expected).

How does one go about obtaining an object on the screen (a db objectID) based off the mouse's X and Y (or even Z) coordinates? If so, how (if there is no db functions for this, I can come up with my own methods, all I'm looking for is a db method, or 'no DB can't do this for you')

How would you retrieve the point of a vector on the screen (for instance if I have my camera pointed somewhere) would I retrieve the 2D screen coordinates so I could call a function?
* This ones a bit hard to understand so scenario:
I've rendered a object (*.x), and the camera is pointed at it so I can see it. I know the objects X,Y,Z access, how I use dbText() (or should I use another function) to write a name above it's head?

What is the dbText3D function, there seems to be no documentation on it (I've googled, checked the WIKI, and checked the help file) and it only takes on parameter (instead of 3d vector points), "char* szText".

Am I right about there being certain functions as "dbSetTerrainHeightMap()" where it sets a field, but there is no "get" method to re-obtain the information, then I take it I must store the information in my own class, a better example of this is scaling an object, and not being able to re-obtain through db functions (or at least from what I can see) what it was scaled to.

How do you delete a terrain (if you should), do you use dbDeleteObject()? If you can't delete a terrain, wouldn't this use unnecessary memory?

Is there any way to loop an object backwards? (Forward being dbLoopObject()) other than manually changing frames (dbSetObjectFrame()).

Look forward to your replies, and thanks in advance.

~ Hybrid, the Infamous Noone
go2none
16
Years of Service
User Offline
Joined: 8th Oct 2008
Location: London
Posted: 20th May 2009 10:54
Obtaining an object ID on the screen: dbPickObject

(...)to write a name above it's head:
dbObjectScreenX(objectID)
dbObjectScreenY(objectID)

as in:

dbText(dbObjectScreenX(objectID), dbObjectScreenY(objectID), "text_string");

You may want to offset the text so its above / below and so on.
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 20th May 2009 11:46
No, the object is not deleted ( I just tried it )

Yes, db is a method to retrieve the coords

Maybe, I dont know how to retrive vector and would like to know this as well to display text over an object

I'm not sure what your talking about dbText3D

Yeah, set those to a variable. (there may be a command for it)

Don't know about terrain

And I don't know about looping backwards, maybe create a for loop to subrtact 1 from a variable each frame, then play that objects animation at the frame of the variable ( this may create lag i don't know )

I tried to help as much as I could =]

Login to post a reply

Server time is: 2024-11-25 10:48:29
Your offset time is: 2024-11-25 10:48:29