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.

3 Dimensional Chat / skyboxes please help

Years of Service
User Offline
Joined: 26th Jan 2003
Location: Cyberspace
Posted: 17th Feb 2003 11:54
im trying to load a sky box into my code ive been having trouble for a while now getting it in could you take a look at this please and tell me how should i do it.does backdrop have to be turned off? what should i scale the box to

Sync On
Sync Rate 25
Hide Mouse
autocam off

Backdrop on
Set camera range 1,1500

Fog on
Fog distance 1000
Fog color RGB(0,0,0)
Color Backdrop RGB(0,0,32)
ink rgb(0,0,255),rgb(0,0,0)
set cursor 320,240

Rem make matrix
Make matrix 1,10000,10000,20,20

Rem texture matrix
Load image "grass09.bmp",1
load image "stone05.bmp",3
Prepare matrix texture 1,1,1,1

rem music/sound
load sound "inlight.wav",3
load sound "earth slow.wav",1
set sound speed 1,12000
set sound pan 1,0

load 3dsound "moan.wav",2
loop sound 2
pause sound 2

rem make walls/front
make object cube 4,20
position object 4,4800,0,4300
scale object 4,5000,500,50
scale object texture 4,7.50,0.50
texture object 4,3
set object collision to boxes 4
rem right side
make object cube 5,20
rotate object 5,0,90,0
position object 5,4300,0,4796
scale object 5,5000,500,50
scale object texture 5,7.50,0.50
texture object 5,3
set object collision to boxes 5
rem back side
make object cube 6,20
position object 6,4800,0,5300
scale object 6,5000,500,50
scale object texture 6,7.50,0.50
texture object 6,3
set object collision to boxes 6
rem left side
make object cube 7,20
rotate object 7,0,90,0
position object 7,5300,0,4796
scale object 7,5000,500,50
scale object texture 7,7.50,0.50
texture object 7,3
set object collision to boxes 7

rem Load object
Load object "swatidle.X",2
loop object 2
scale object 2,2000,2000,2000
position object 2,5000,Get Ground Height(1,5000,5500),5000
set object collision to spheres 2

load object "thugmove.x",3
loop object 3
set object speed 3,10
scale object 3,2000,2000,2000
position object 3,5100,get ground height(1,5000,5500),5000
set object collision to boxes 3
rem Add walk animation data to your object appending to frame 100
append object "swatmove.x",2,100
append object "attack1.x",2,130

load object "tree.3ds",8
position object 8,4600,0,4700
set object collision to polygons 8

rem Set new speed for your model
set object speed 2,15

rem Set object to interpolate to a new frame at a speed of 25%

remstart resume sound 2
resume sound 2

loop sound 3

Rem Main loop
set cursor 0,0
print xpos#
print ypos#
print zpos#

yAng=object angle y(2)

move object 3,-1

rem move object across matrix/controls
yAng=object angle y(2)
if rightkey()=1 then yrotate object 2,wrapvalue(yang+5)
if leftkey()=1 then yrotate object 2,wrapvalue(yang-5)
if upkey()=1
xtest# = newxvalue(xpos#,object angle y(2),-8)
ztest# = newzvalue(zpos#,object angle y(2),-8)
if xtest#>0 and xtest#0 and ztest#0 then position object 2,xpos#,ypos#,zpos#

rem refresh screen
sync rate 25

rem If walk animation required, make sure can perform animation
if animpause=0
if upkey()=1
if animstate=0
rem then slowly interpolate to the first walk frame
loop sound 1
loop object 2
set object frame 2,100
stop object 2
if animstate=1
rem else slowly interpolate to the first idle frame
stop sound 1
stop object 2
set object frame 2,0
rem Count down until the interpolation has finished
if animpause=0
if animstate=0 then loop object 2,0,20
if animstate=1 then loop object 2,100,125

`work out the height of the character
xPos#=object position x(2)
zPos#=object position z(2)
yPos#=get ground height(1,xPos#,zPos#)

`update the objects position
position object 2,xPos#,yPos#,zPos#

`update the camera

`update the screen

rem chase function
function chase_cam(1)

`work out the angle of the object being chased
yAng#=wrapvalue(object angle y(2)+360)

`grab the objects current position
xPos#=object position x(2)
yPos#=object position y(2)
zPos#=object position z(2)

`other variables

`work out new position

`work out camera height
yCamPos#=get ground height(1,xCamPos#,zCamPos#)+camHeight
if yCamPos#
John H
Retired Moderator
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 17th Feb 2003 17:31
Turn the backdrop off

Scale it to however big it will fit around your matrix

Id fake it (with plains) then texture each one individually (make sure the textures are seamless!)


Current - RPG: Eternal Destiny
Dont ask those questions! Read the help files lazy!

Login to post a reply

Server time is: 2024-02-24 22:57:47
Your offset time is: 2024-02-24 22:57:47