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 / Undocumented commands? Why don't they work?

Author
Message
Compteach
16
Years of Service
User Offline
Joined: 4th Apr 2008
Location: Wherever I hang my hat
Posted: 4th Apr 2008 23:59
I teach games programming to Foundation Degree students and have just started using Dark Basic Pro as the latest platform. As a text we decided to adopt the recommended "Hands on DarkBASIC Pro" by Alistair Stewart which on the whole seems to be a brilliant book to work with. However, he occasionally uses commands, which he say are not documented, and they never seem to work. An example is "PERFORM CSG UNION" which is used to merge two primitives.

Has anyone else come across these problems, and what have they done?

I had considered contacting Alistair to ask if there were any reasons why he was using what appear to be deprecated commands.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 5th Apr 2008 00:07
There are reasons why some commands are undocumented - and you've just discovered one.

Anyone who uses them runs the risk of them being removed at any time.

TDK_Man

spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 5th Apr 2008 00:31
CSG commands do work, but a bit of trial and error is needed.

Read this post for some help;

http://forum.thegamecreators.com/?m=forum_view&t=90484&b=6

Here is code showing PERFORM CSG UNION in action.



Boo!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Apr 2008 21:47
IIRC, the types of objects that the CSG commands work with is limited - I think you need objects that are constructed from triangle-lists, not strips or fans, and that also have an index buffer.

TBH, beyond a little playing around, I've not done anything serious with them, so there may be other limitations I don't know about.

pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 7th Apr 2008 18:06
"PERFORM CSG UNION"

cube,box is good.
cone,cylinder,sphere is bad.
CLIP command, precision is bad.

You can test it.

This command is not supported.
jasonhtml
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: OC, California, USA
Posted: 8th Apr 2008 01:38
i've done some extensive testing with the CSG commands and here is what i have found:

Quote: "
cube,box is good.
cone,cylinder,sphere is bad.
"


this is not entirely true because only if you are using DBP primitives, the cone, cylinder, and sphere do not work. but you can load in your own and it will work on one condition: the object must be convex.

so, the only objects that work with CSG commands are:
DBP Cube primative
DBP Box primative
any loaded object that is convex
any object that has already had CSG commands performed on it(so a concave object that used to be convex and then had the commands performed on it will still work)

Login to post a reply

Server time is: 2024-09-27 12:18:22
Your offset time is: 2024-09-27 12:18:22