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 / DBPRO Inconsistent commands

Author
Message
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 9th Sep 2003 19:22
could sombody please tell me what the return expreions for the follwoung commands please:

scale object texture
texture object
scale object
(note object size x does not count as the return for this command)

We have make object sphere cube box cone cylinder plain triangle.
but... not return values for the types of objects.

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
UberTuba
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 9th Sep 2003 19:25
its not meant to return values
scale object makess the textureon the object bigger or smaller
texture object tectures the object
and scale object makes the object bigger or smaller.
simple

the artist formally known as darkfluff
Richard Davey
Retired Moderator
24
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 9th Sep 2003 19:25
Sure. There aren't any.
They set values, not return them.
Same for object creation. What exactly do you want to return?

Cheers,

Rich

"Gentlemen, we have short-circuited the Universe!"
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 9th Sep 2003 19:28
Do you mean you want a command to return the type an object is?

If not, I have no clue why you would ask such a question

--Mouse: Famous (Avatarless) Fighting Furball
Read It: http://www.angryflower.com/itsits.gif
Learn It: http://www.angryflower.com/bobsqu.gif
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 9th Sep 2003 19:33
And surely if you've created it, you would already know its type.


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 9th Sep 2003 19:35
i want to know the number of the texture the object has been textured with
i want to know the object type e.g. shpere cube box sylinder
i want to know what the textures on the object were scaled to.

sort of

string$ = object type(object number)
integer = object texture(object number)
real = object texture scale x(obejct number)
real = object texture scale y(object number)
real = object scale x (object number)
real = object scale y (object number)
real = object scale z (object number)

thx

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
Richard Davey
Retired Moderator
24
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 9th Sep 2003 19:39
Quote: "i want to know the number of the texture the object has been textured with
i want to know the object type e.g. shpere cube box sylinder
i want to know what the textures on the object were scaled to."


Keep track of it then? None of those things can happen unless you issue a command to make them happen. When you do that, log it somewhere (an array perhaps). You ought to know what state your objects are in, this is just good coding practise.

Cheers,

Rich

"Gentlemen, we have short-circuited the Universe!"
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 9th Sep 2003 19:46
well yeah the way i usually keep track is by using return value expressions tht come with dark basic.

if i set a size for an object i can return it.
therefor
if i set a texture for an object i can return it. (but i cant)
it makes sense.

thats all!
just wondered!
question answered-do it yourself
shezzz

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 9th Sep 2003 19:49 Edited at: 9th Sep 2003 19:50
@TCA
soz just noticed your post

yeah.... i, me, the programmer knows, but (this is not the but lets say)

i did.
for t=1 to 10
x=rnd (2)
if x=0 then make object sphere...
if x=1 then make object box....
if x=2 then make object cube...
next t

now, solve this one
you have 10 objects
print on the screen what type they are.

or even better example

playing a game.
if the camera collides with a sphere then die
if the camera collides with a box then point increase.

(dont be smart and say just make all the phere objects from 1-5 and boxes from 5-10 and check the object number) cus thats obvious and not funny

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 9th Sep 2003 19:56 Edited at: 9th Sep 2003 19:57
Quote: "(dont be smart and say just make all the phere objects from 1-5 and boxes from 5-10 and check the object number) cus thats obvious and not funny "

But logical and pratical - I try to put as much information as possible into the object number (unfortunately its slightly limited as you cant use the full 32-bit range), so for example :

Bits 0-12 - Object Number
Bits 13-15 - Object Type

That way you can get the object number and type in one go without having to resort to other means.

Programming is never funny...


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 9th Sep 2003 20:20
All the more reason for some Object Oriented concepts in dbpro!
Like Object Collections could be used in the debate above

Dim objSphere as new Sphere
for each objSphere in me.spheres
debug.writeline(objSphere.xpos.tostring)
debug.writeline(objSphere.name)
next

you get the idea
just a thought

-RUST-
Kentaree
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 9th Sep 2003 20:26
Wouldnt that get rid of the whole concept of BASIC? Yes, I know VB is OO, but is that really a BASIC?

I would be unstoppable if I could just get started...
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 9th Sep 2003 20:57
Too late now and would be too hard to add. OOP is probably a real pain to design & program. Besides OOP generally adds a small (but still there notheless) overhead for the program. Besides, for the above example OOP would be an overkill.


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 9th Sep 2003 20:59
Quote: "print on the screen what type they are."


Terrabyte, objects don't work like that. When you create a box object, DarkBASIC doesn't think of it as a box, it just things of it as a series of connected points (verticies) with textures etc. applied.

OBJECT TEXTURE() would make sense though.

Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 9th Sep 2003 21:26
im aware of that rob but i wud have wondered wether maybe dark basic would perhaps store the fact that you started off creating it as an object in memory. and that maybe in one of the later patches they would release a few more commands...i dunno.i was just asking.

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 9th Sep 2003 21:29
@Terrabyte

In which case you could simply store the type when creating the object.

The focus at the moment is on nodetrees and portals, which are basically technologies to speed up your game.

Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 9th Sep 2003 22:08
I thought of this also. It would be handy in situations where your using somebody elses 'load world' function for example and you wish to interface better with the objects loaded. So rather than wedge your code into somebody elses code, you could just poll the objects for it's creation type, it'd be trivial for lee to add a creation type in the object structure.

Kevin Picone
Play Basic - Visible Worlds - Kyruss II
[url]www.underwaredesign.com[/url]
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 9th Sep 2003 22:36
yeah i heard about them.... how much will they be able to speed up a game .. on average... are we talking a couple of frames. or are we talking 10' or even 100's

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
Richard Davey
Retired Moderator
24
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 10th Sep 2003 03:14
Quote: "creation type in the object structure"


So what does it return if the object mesh is modified? Technically it's no longer a sphere.

Same for object textures.. it'd only work on primitives. Load in a model and it could have any number of textures applied to it, none of which have been "loaded" so the command would return nothing useful is the majority of cases.

Besides, U6 has the commands to interrogate objects from which you could count indicies, vertices, etc and determine it from that if you really wanted to.

Cheers,

Rich

"Gentlemen, we have short-circuited the Universe!"
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 10th Sep 2003 04:21
Generally, learning to keep your objects in ranges will help a lot with more complex programming later on.

--Mouse: Famous (Avatarless) Fighting Furball
Read It: http://www.angryflower.com/itsits.gif
Learn It: http://www.angryflower.com/bobsqu.gif
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Sep 2003 12:04
Any chance of allowing the full 32-bit range for objects numbers too !?


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Richard Davey
Retired Moderator
24
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 10th Sep 2003 18:42
You're asking the wrong guy, email it to Lee.

Cheers,

Rich

"Gentlemen, we have short-circuited the Universe!"
Eric T
23
Years of Service
User Offline
Joined: 7th Apr 2003
Location: My location is where I am at this time.
Posted: 10th Sep 2003 18:48
hmmmmm If we were to all E-mail lee, he would have one hell of a day of responding to questions,...lol, just a bit of philosophy.

Working on 4 projects 2 RPG(programming texturing and 3d map), 1 3rd person shooter (Programming), and a special project.
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Sep 2003 18:51
I do it fairly often...


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Eric T
23
Years of Service
User Offline
Joined: 7th Apr 2003
Location: My location is where I am at this time.
Posted: 10th Sep 2003 18:57
and i do sometimes....

and i'm sure there is about 100 moe of us out there...

Working on 4 projects 2 RPG(programming texturing and 3d map), 1 3rd person shooter (Programming), and a special project.
Richard Davey
Retired Moderator
24
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 10th Sep 2003 19:27
If you were to all email him useless questions and requests for commmands that you're too lazy to build functions for - then sure, he'd have a tough time of it.

TCA's request made sense though and was worth bringing to Lee's attention.

Cheers,

Rich

"Gentlemen, we have short-circuited the Universe!"
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 11th Sep 2003 00:21
"hte mesh is changed"
yes but it was still originaly created as a sphere and this infomation was stored at the start and i did say how the object starts off as.
anyway it doesnt matter. i managed to do a routine using arrays...

no another topic... Rich You have blocked me on MSN. what did i ever do to you.

>>TerraByte. Putting the Byte back into Terragramming<< Life is like a sheet sandwich you take a bigger piece everyday.
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 11th Sep 2003 03:10
Rich is busy busy busy making stuff for the new site, maybe you should him work if you want him to get anything done

--Mouse: Famous (Avatarless) Fighting Furball
Read It: http://www.angryflower.com/itsits.gif
Learn It: http://www.angryflower.com/bobsqu.gif
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 11th Sep 2003 18:01
Alas, Lee did not see fit to extend the maximum sprite/object range...


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 11th Sep 2003 20:09
surley you havnt run out of sprite numbers to use....

>>TerraByte. Putting the Byte back into Terragramming<< Life is like a sheet sandwich you take a bigger piece everyday.
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 11th Sep 2003 20:40
I might if I wanted to encode a lot of things into the number...


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 11th Sep 2003 21:15 Edited at: 11th Sep 2003 21:17
All I'm doing so say is:

Dim ObjectType$(NumOfObjects) as string

and:

Make object cube 1,10
ObjectType$(1) = "Cube"


My gran has the mobility of a rusted taiwaneese wheel barrow, and if she'd get off her arse to do that one.

Insiiiiiiiiiiiiiiiiiiiiiiiide!
Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 12th Sep 2003 02:06
Rich:

Quote: " So what does it return if the object mesh is modified? Technically it's no longer a sphere "


sigh, so your saying it's too difficult to set/clear an offset in the object structure ?. I'd say not. When an objects mesh is man handled the type is simply set to custom or mesh type.

Quote: "
Besides, U6 has the commands to interrogate objects from which you could count indicies, vertices, etc and determine it from that if you really wanted to.
"


While you can do that now with memblocks, it's awfully inefficient solution to a byte/word in the structure..

Kevin Picone
Play Basic - Visible Worlds - Kyruss II
[url]www.underwaredesign.com[/url]
Richard Davey
Retired Moderator
24
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 12th Sep 2003 05:07
Quote: "sigh, so your saying it's too difficult to set/clear an offset in the object structure?"


For a measly 7 primitives it's far from vital. As I said object interrogation is present in U6 and doesn't require messing with memblocks to achieve.

Quote: "Terrabye - Rich You have blocked me on MSN. what did i ever do to you."


No idea.. I only block people who never leave me alone There was another person who posted some thread with a paedophile joke in it I blocked too, but that's about it! Unless you were one of those two?

Cheers,

Rich

"Gentlemen, we have short-circuited the Universe!"
Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 12th Sep 2003 20:32
Quote: "For a measly 7 primitives it's far from vital. As I said object interrogation is present in U6 and doesn't require messing with memblocks to achieve."


No, unless the lower object commands have an object type it really doesn't solve this problem. Spheres etc have variable detail settings so you can't assume a face count of X is a indeed a sphere.

While I never said it was vital. The thing that has always been lacking from pro, is indeed the little things.

Kevin Picone
Play Basic - Visible Worlds - Kyruss II
[url]www.underwaredesign.com[/url]
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 13th Sep 2003 19:39
hey
well im not the peedo
i dont always pester you. Last time i spoke to you was to wish you happy birthday.

Your so mean

>>TerraByte. Putting the Byte back into Terragramming<< Life is like a sheet sandwich you take a bigger piece everyday.

Login to post a reply

Server time is: 2026-07-23 15:48:38
Your offset time is: 2026-07-23 15:48:38