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 / Glued objects dissappear?

Author
Message
NTekk
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 3rd Nov 2002 00:06
when I glue objects together and rotate them in
a camera view, if the objects leave the screen
they dissappear when they should come back
around......anybody else ran into this problem?
NTekk
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 3rd Nov 2002 00:07
`This will put up 100 cubes "take a few moments"
`The sqaure's will appear in the upper right corner
`Since the square's are glued they will move as one
`USE THE ARROW KEYS TO ROTATE THE SQUARE'S
`As the squares move out of the camera view
`they will disappear
`soon only a couple squares remain
`This is a very cut down version of the original
`program, but still demonstates the problem

set display mode 640,480,16
sync rate 0
sync on
cls rgb(255,0,0)

b=1
sp1=1
dim sb(100)
for sb=1 to 100
sz=rnd(40)
xp=rnd(100)
make object cube sb,sz
if sb>1 then glue object to limb sb,1,0
position object sb,xp,rnd(100),rnd(100)
color object sb,rgb(rnd(255),rnd(255),rnd(255))
next sb

do
a$=inkey$()
if a$="f" then fix object pivot b
if leftkey()=1 then x#=x#+sp1:gosub rotobj
if rightkey()=1 then x#=x#-sp1:gosub rotobj
if downkey()=1 then y#=y#-sp1:gosub rotobj
if upkey()=1 then y#=y#+sp1:gosub rotobj

color backdrop rgb(0,0,0)
ink rgb(200,200,200),0
frames$=str$(screen fps())
text 240,70, frames$

position camera 0,0,-100
point camera 0,0,0
set camera view 215,0,640,320
sync

loop
NTekk
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 3rd Nov 2002 00:15
`This will put up 100 cubes "take a few moments"
`The sqaure's will appear in the upper right corner
`Since the square's are glued they will move as one
`USE THE ARROW KEYS TO ROTATE THE SQUARE'S
`As the squares move out of the camera view
`they will disappear
`soon only a couple squares remain
`This is a very cut down version of the original
`program, but still demonstates the problem

set display mode 640,480,16
sync rate 0
sync on
cls rgb(255,0,0)

b=1
sp1=1
dim sb(100)
for sb=1 to 100
sz=rnd(40)
xp=rnd(100)
make object cube sb,sz
if sb>1 then glue object to limb sb,1,0
position object sb,xp,rnd(100),rnd(100)
color object sb,rgb(rnd(255),rnd(255),rnd(255))
next sb

do
a$=inkey$()
if a$="f" then fix object pivot b
if leftkey()=1 then x#=x#+sp1:gosub rotobj
if rightkey()=1 then x#=x#-sp1:gosub rotobj
if downkey()=1 then y#=y#-sp1:gosub rotobj
if upkey()=1 then y#=y#+sp1:gosub rotobj

color backdrop rgb(0,0,0)
ink rgb(200,200,200),0
frames$=str$(screen fps())
text 240,70, frames$

position camera 0,0,-100
point camera 0,0,0
set camera view 215,0,640,320
sync

loop

`--------------------------------------------

Rotobj:
inc x
if x#>360 then x#=0
if x#<0 then x#=360
if y#>360 then y#=0
if y#<0 then y#=360
if z#>360 then z#=0
if z#<0 then z#=360

rotate object b,y#,x#,z#
return

`------------------------------------------------

`sorry lost part of the code the first time
NTekk
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 3rd Nov 2002 19:17
Sorry about the double post, but the first one was missing
the Rotobj sub.
The post was pretty much ignored on RGT's forum.
I'm not sure this is a bug or I am doing something wrong.
This program is for DBPro, could someone point out what
I am doing wrong or confirm that they are having this
problem to.
Thanks in advance
Dazzy
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 3rd Nov 2002 21:12
I tried the above code and yes the cubes disappear on here too! can't see anything obvious wrong with ur code, don't really have time to look though!

Dazzy
NTekk
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 3rd Nov 2002 22:46
Thanks Dazzy...really dont think it's the code but...
Dazzy
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 3rd Nov 2002 22:50
I sent the code to Mike, he said he'll look at it when he gets the chance!

Dazzy
NTekk
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 4th Nov 2002 01:06
Thanks again Dazzy, I'm sure Mike will figure out what's
going on. Wasnt sure if this had been reported.
Lee Bamber
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location:
Posted: 15th Nov 2002 02:39
I have fixed this one for Patch 3, and Patch 4 will replace the fix with new code that is even better. Too much to explain, but P4 will be faster

NTekk
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 17th Nov 2002 17:03
Thank You Lee for responding to this problem. I am looking
forward to the use of DBPro and anticipating the future
implemetations of faster routines to make an already
great program even better.

Thanks
NTekk
spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 17th Nov 2002 20:00
Good, I too was having annoying problems with glued objects not always appearing and then suddenly appearing!

I love it when a plan comes together

Login to post a reply

Server time is: 2024-04-25 08:42:41
Your offset time is: 2024-04-25 08:42:41