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 / Pleease let us duplicate or store Objects!!!

Author
Message
Reece
16
Years of Service
User Offline
Joined: 29th Aug 2002
Location: UK
Posted: 29th Aug 2002 19:41
Its is utter madness that objects cant be duplicated or stored for copying within DarkBasic V1!!!!

Please tell me this WILL be possible in DBPro!
And don't give me...."dont need to" stuff.
I...neeeeeeeeed to!

Cheers fellow salivating doormat lickers. hmmm. nice.
haggisman
16
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 29th Aug 2002 19:49
do you mean something like the CLONE OBJECT command?

Specs:- 1GHZ athlon, Radeon8500, 192mb ram
Reece
16
Years of Service
User Offline
Joined: 29th Aug 2002
Location: UK
Posted: 29th Aug 2002 19:55
Blimey, quick reply!
Erm...I dont think so.

ie.
load object "poo.x",1
load object "poo.x",2
load object "poo.x",3
load object "poo.x",4

Surely this isnt nessessary!
Accessing my media everytime I need a duplicate object of one that's already in memory. Know what I mean?
Keep in mind I will NEED to do this many times a second.

Still salivating...
denki
16
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 29th Aug 2002 22:01
more of a
Make object from loaded file
command?

denki

Join in on my big DarkBASIC pro RPG - kousen - http://www.darkbasicpro.com/apollo/view.php?t=13&b=1
IAK
16
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 29th Aug 2002 22:13
isnt that what clone object is? kinda like:
load object "bla.x", 1
clone object 1,2
ur cloning a loaded object arent u?

- IAK

http://www.iakstudios.com
denki
16
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 29th Aug 2002 22:38
Lol I guess so...

denki

Join in on my big DarkBASIC pro RPG - kousen - http://www.darkbasicpro.com/apollo/view.php?t=13&b=1
ESC
16
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United States
Posted: 29th Aug 2002 23:15
Yeah, the clone object command should definatly work

"That's not a bug, it's a feature!"
"When all else fails, read the instructions"
-Forsaken02
Reece
16
Years of Service
User Offline
Joined: 29th Aug 2002
Location: UK
Posted: 30th Aug 2002 14:25
Clone Object???????
What on earth? You all sound like you've used this command before, but DBPro isnt out yet.

Hmmmmm.
I am suspecting that DarkBasic V1.11 doesnt have this command.
I only have lite so I cant upgrade to V1.13
(I have ordered DB full upgrade, mainly in order to upgrade to DBPro. Will have to wait)

Why couldnt anyone suggest this before in the DB forums?
Sounds like the perfect solution!
Cheers guys!
DeathShadow
16
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 30th Aug 2002 14:37
Um, why not just use the following:

load object "poo.x",99
make mesh from object 99,99
delete object 99

for i=1 to 4
make object i,99
next i

effectively clones an object by using a mesh!!!

AthlonXP 2000+ (HeatPipe cooled), 512MB DDR, Geforce4Ti4400 128MB, 17" monitor, 5.1 sound, 192GB RAID Disk Space, 1MB/s cable, 400W, 16x48x DVD, 32x12x48 CDRW, 10/100 Ethernet,8 FANS!
denki
16
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 30th Aug 2002 15:21
Cooooool

denki

Join in on my big DarkBASIC pro RPG - kousen - http://www.darkbasicpro.com/apollo/view.php?t=13&b=1
Reece
16
Years of Service
User Offline
Joined: 29th Aug 2002
Location: UK
Posted: 30th Aug 2002 15:34
Nice idea, but I think I would loose colouring/texturing/animation data with that object.
AlecM
16
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Concord, MA
Posted: 30th Aug 2002 20:42
reece: that data is stored in your model file you shouldnt lose anything.

Goto http://www.shellshockede.com
Richard Davey
Retired Moderator
16
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 31st Aug 2002 13:47
Reece - clone object will indeed work as people have suggested. It's a DBPro command and is listed on the commands list on this site. Also those who are on DBDN will have seen it before as well.

In DBV1 you could use the "make mesh" commands but like you pointed out you'll loose texture data (because afterall the texture itself isn't actually stored in the mesh).

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
NTekk
16
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 31st Aug 2002 19:58
Whooa!! ...Sorry Rich but I've been asking for this for
awhile, and like always you've come though. when making
fifty trees..rocks etc, this will surley make life
easier for us....thankyou..thankyou....thanya!
DeathShadow
16
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 31st Aug 2002 20:28
In DB, you can just put it in a for/next loop (if u want to keep the textures and everything!)!

i.e.
For i=1 to 4
load object "poo.x",i
next i

AthlonXP 2100+ (HeatPipe cooled), 512MB DDR, Geforce4Ti4400 128MB, 17" monitor, 5.1 sound, 192GB RAID Disk Space, 1MB/s cable, 400W, 16x48x DVD, 32x12x48 CDRW, 10/100 Ethernet,8 FANS!
Richard Davey
Retired Moderator
16
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 4th Sep 2002 07:45
Sure you can DeathShadow - but who wants to do file I/O right in the middle of a hot action game when you suddenly need to spawn a stack of bad guys? (just an example)

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
DeathShadow
16
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 4th Sep 2002 12:44
You load the objects in the loading sequence at the start, and then simply show and position the objects when you need them!

AthlonXP 2100+ (HeatPipe cooled), 512MB DDR, Geforce4Ti4400 128MB, 17" monitor, 5.1 sound, 192GB RAID Disk Space, 1MB/s cable, 400W, 16x48x DVD, 32x12x48 CDRW, 10/100 Ethernet,8 FANS!
Fallout
16
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 4th Sep 2002 14:22
The principle is this DeathShadow ....

I want 50 bad guys, who're all exactly the same to come at me with baseball bats and spread my brains and other internal organs along the floor. Each model contains a bunch of textures that takes up say 500kb of texture graphics card memory. There is also a bunch of mesh info, animation info etc. (all quite small) that goes into main memory.

Using your idea, I'd set up a for loop and load the same model into 50 different object numbers. This would result in my loading the mesh, animation and texture info 50 times into different areas of memory. 500kb x50 = 25MB. That's 25MB of texture memory taken up by the same 500kb textures.

By cloning an option you load up one instance of the object into memory. Each clone would then have it's own entity data, but would share the same texture data, model data, animation data etc. and therefore for the same 50 models, you'd only need the 500kb of texture memory taken up.

The only negative point is if you want to be able to do mesh deformation, or texture editing etc etc. on one model. I believe with clone object, editing one model in this way would effect all of the other models.

Machine: P4 2200, 512MB, GeForce4 64MB, Audigy Platinum

There's a junglist inside every coder. http://www.kontact-kru.com for my own personal breakbeat terrorism.
Reece
16
Years of Service
User Offline
Joined: 29th Aug 2002
Location: UK
Posted: 4th Sep 2002 17:53
Yes..yes...yes!
The ideas are flooding, problems being solved and now I can once again...sleep.
Can't wait until DBProfessional comes out! Life will be sooo much easier!
Clone Object, like Instance in 3DMAX, brilliant.

The folding functions is also tastey, but if only there could be this option with Gosubs (yes I'm still using them)
Fallout
16
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 4th Sep 2002 18:12
Does DBPro not use Gosubs then?

Not that I'm bothered if it doesn't. Functions are much tidier.

Machine: P4 2200, 512MB, GeForce4 64MB, Audigy Platinum

There's a junglist inside every coder. http://www.kontact-kru.com for my own personal breakbeat terrorism.
Reece
16
Years of Service
User Offline
Joined: 29th Aug 2002
Location: UK
Posted: 4th Sep 2002 21:29
No I'm sure it does. I meant the option to FOLD Gosubs like you can with Functions and Procedures in programming editors

I have to face turning my many many Gosub routines into Functions and making sure all variables are passed through successfully. Its gonna take me hours, but then doesnt everything?
Fallout
16
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 4th Sep 2002 23:05
How many gosubs have you got to change?

Machine: P4 2200, 512MB, GeForce4 64MB, Audigy Platinum

There's a junglist inside every coder. http://www.kontact-kru.com for my own personal breakbeat terrorism.
NTekk
16
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 5th Sep 2002 00:36
Very well put Fallout...I totaly agree, nothing like the
smell of fresh organs in the mourning!

remember gosubs can speed up your program.
Fallout
16
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 5th Sep 2002 01:15
They did in db, but who knows if they do in dbpro?

Machine: P4 2200, 512MB, GeForce4 64MB, Audigy Platinum

There's a junglist inside every coder. http://www.kontact-kru.com for my own personal breakbeat terrorism.
waffle
16
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 9th Sep 2002 16:23
gosub are always a bit faster than functions because
functions must save pointers to all refrenced parameters
before and after a function call, while a gusub need only
save the start address.

but;
the savings are minor when compared to tidyness.
also, how can you fold a gusub, the return could be anywhere? At least in theory. Functions have a more rigid syntax and can only be created a certain way.

Reece
16
Years of Service
User Offline
Joined: 29th Aug 2002
Location: UK
Posted: 9th Sep 2002 16:56
Hi Fallout, NTekk & Waffle!
Good points! And all very relevant.
I've got what feels like hundreds of Gosubs in my program. So you can imagine the length, and you must be able to appreciate the difficulty in navigating through such a huge program without any form of 'folding'.

How do you get by?
Sure, the new editor will make life a lot easier, especially for Functions. But since 'Folding' is only an editing thing, why couldnt there be an option to do a split second search of all Gosubs/Returns and allow you to fold those too?
Or at least something that makes life infinitely easier!

You know?
Yeah?
hmm?

I'm now in two minds about changing all my Gosubs to Functions, as Waffle has said...."the savings are minor when compared to tidyness."
This sounds like a Ben Kenobi quote, could go down in history!

Login to post a reply

Server time is: 2019-04-22 21:19:04
Your offset time is: 2019-04-22 21:19:04