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 Discussion / Oy, there's something about positions I just WILL not get, will I?

Author
Message
Yoshiman1
21
Years of Service
User Offline
Joined: 12th May 2004
Location:
Posted: 3rd Dec 2004 07:55
Is there a way to always have an object positioned according to another object without lag?

I have an object always positioned to certain coordinates according to a 2nd object. When I run it, it'll stay in that position. But when I start having the 2nd object run really fast or jump and fall, the first object lags behind.

The jumping and falling code consists of y placing the 2nd object, so I tried copying the code for the first object, and it just screwed up royally.

Like I said, any way to position an object to another without lag when travelling fast?
Yoshiman1
21
Years of Service
User Offline
Joined: 12th May 2004
Location:
Posted: 3rd Dec 2004 07:56
Gah, where's the edit button on these posts?

I forgot to mention I'm using DB Classic, so none of these new fancy-dancy terms used only in DB Pro.
andrew11
22
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 3rd Dec 2004 08:44 Edited at: 3rd Dec 2004 08:44
This is probably due to positioning the first object after the second one has been displayed.

Example (Pseudo-code):

Do
Position object 1
Position object 2

Sync
Loop

Just change it to

Do
Position object 2
Position object 1

sync
loop


"All programmers are playwrites and all computers are lousy actors" -Anon
Yoshiman1
21
Years of Service
User Offline
Joined: 12th May 2004
Location:
Posted: 4th Dec 2004 06:44
That doesn't fix it.
dared
20
Years of Service
User Offline
Joined: 20th Nov 2004
Location:
Posted: 4th Dec 2004 18:13
Are you sure the object numbers are different?
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 5th Dec 2004 03:56
its your code, I can have several hundred objects all move at the same time with no lag



works fine here, 400 cubes all update their positions at the same time, no visible lag, you must have a code error somewhere is all, try doing the same thing a different way in code, sometimes something you think is logicaly correct has a subtle error that you can remove by altering the code to something that does the same thing a different way.

Mentor.

PC1: P4 3ghz, 1gig mem, 3x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.

Login to post a reply

Server time is: 2025-05-24 19:07:58
Your offset time is: 2025-05-24 19:07:58