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 / eXtends: B3D vs normal commands

Author
Message
CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 4th Sep 2010 02:35 Edited at: 4th Sep 2010 03:23
theres some commands in eXtends that are like "B3D make object sphere" and such, is that faster and better than the original DBpro commands?

Also in darklights how do I make a light? Or do I just use make light 1, and is that a darklights command or basic darkbasic pro?
This is the keywords for darklights

So i wanted to know if theres a special light command i'm suppose to use to make, color, position, strength etc.

EDIT: I just tried this "B3D make object sphere 20" and it came up with an error, I even tried "B3D make object sphere 1,20" and an error too, whats up?

I want coke, not Pepsi!
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 4th Sep 2010 16:29
The extends 3D commands are like a combination of create object and find free object.

It returns the ID of the newly created object.

My signature is NOT a moderator plaything! Stop changing it!
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 4th Sep 2010 16:34
That seems stupid to me lol



CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 4th Sep 2010 17:28
Oh, so it doesn't actually create an object?

I want coke, not Pepsi!
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 4th Sep 2010 22:11
Yes it does, you just don't need to tell it what object to use, as it find's it's own.

Quote: "That seems stupid to me lol"

Why? It simplifies your code so you use less. Really, all plugins make it easier/quicker to do what native code can do.

My signature is NOT a moderator plaything! Stop changing it!
James H
19
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 5th Sep 2010 00:07
I haven`t got this installed currently but from what I remember it does more than just create objects without being fed an ID http://www.thegamecreators.com/?m=view_product&id=2080
Besides MAKE OBJECT SPHERE RND(RANGE),1 is only a few charactors difference; havent tested for speed differences but theres a pretty good chance its faster - the billboard system maybe faster and likely simpler to code than in native. I never looked into it properly and removed it from my system a long time ago because it had to be run in 98 compatability mode to get xgui and a few other examples working(which limits memblock sizes) what I wanted the billboards for required very large memblocks, but I didn`t know then what I know now. Time for another look I think
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 5th Sep 2010 02:58
Quote: "MAKE OBJECT SPHERE RND(RANGE),1"

And this works great, until you randomly get the same number twice which will crash your program. Oh yeah, and since you don't know what object number you've just created you can't texture, move or do anything with it.

Suddenly, the B3D code isn't so pointless. lol

My signature is NOT a moderator plaything! Stop changing it!
James H
19
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 5th Sep 2010 11:59
"And this works great, until you randomly get the same number twice which will crash your program. Oh yeah, and since you don't know what object number you've just created you can't texture, move or do anything with it" hehe; sure extra code would be required to maintain a record of whats created(not much though), or the use of an existence check would be needed, but you would still require a return id from b3d commands if the created object is to be of any use - which would also mean keeping a record of them - simplifying code at creation would just mean having to use extra code later on. At least if you decide your own id`s you might not need to keep a record of them. Guess it depends what you require overall - for my own work I found that maintaining a record or deciding specific ids for specific objects was a must for frustrum checks alone, which is another reason I didn`t have a use for extends although I wouldn`t ever say its pointless - I`m sure it has its uses, which is why I intend to revisit to reinvestigate!(Although I can only think of simple uses for them such as objects that dont require further control) If you have any specific suggestions I would love to hear them.
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 6th Sep 2010 09:19
Extends DOES return the object ID! That's the point of the command! lol

My signature is NOT a moderator plaything! Stop changing it!
James H
19
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 6th Sep 2010 11:46
Yes I know, I have purchased it - I wasnt being ignorant of that deliberately. I made a poor choice of words - what I`m highlighting is that the simplification is there, its just barely worth it when at the most all you save is one short line at the cost of losing control of which object numbers you want to use. I wasnt going to point out it does return an id - was hoping the OP would realise from my last post why he/she gets the error they mention in the OP
=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 6th Sep 2010 11:53 Edited at: 6th Sep 2010 12:06
@James H:

This is how I do it. (Not actual code, just typing it now to show u a simplified version of how I do it...)



This way is much easier than having a list of thousands of object No's which you need to keep refering to.

>edit<

I only say this because I used to have a list of thousands of object No's running sequentially, which was a right pain when I suddenly needed 7 extra door objects, or a couple of extra shadow objects, lol


>edit 2<

to the OP, not sure if your question was answered or not, but you need to put a variable at the front for it to return the Object Number to..

e.g.

ObjNo=B3D make object sphere(whatever parameters it takes)

Sorry I can't be more specific, I haven't actually got extends installed atm.

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 6th Sep 2010 15:54
Quote: "Why? It simplifies your code so you use less. Really, all plugins make it easier/quicker to do what native code can do."


It seems stupid having to buy a plugin that does what you could do in a 4 line function, unless it's a free plugin of course.

Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 6th Sep 2010 18:57 Edited at: 6th Sep 2010 18:58
Plugins are generally faster. Most people are prepared to pay a little to make their life easier/quicker. I know I am! lol

My signature is NOT a moderator plaything! Stop changing it!
CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 6th Sep 2010 19:00
Quote: "ObjNo=B3D make object sphere(whatever parameters it takes)"


Thank you!!! and is that command faster than the regular "make object sphere num,size" ??

I want coke, not Pepsi!
=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 6th Sep 2010 19:33
I dunno if there is much of a speed difference, but it saves a few lines of typing

@Mad Nightmare:
a) You don't have to buy the plug in, lol

and b) the eXtends plug in does much more than just the object commands, the real time sky sphere stuff is awesome; and it has pixel perfect sprite collisions and a whole heap of other stuff, as detailed >here<

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 6th Sep 2010 20:35
I know, I know, it must look like I came on this thread to criticize the plugin lol, sorry. It wasn't my intention.

Login to post a reply

Server time is: 2026-07-24 23:11:53
Your offset time is: 2026-07-24 23:11:53