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.

Newcomers DBPro Corner / NEW GUY COUPLE OF PROBLEMS PLEASE HELP

Author
Message
koolaid
21
Years of Service
User Offline
Joined: 26th Jan 2003
Location: Cyberspace
Posted: 1st Feb 2003 20:14
IM NEW TO DARKBASIC AND AM STILL TRYING TO LEARN VARIOUS THINGS THAT GO INTO MAKING A GAME.ITS MUCH EASIER IF SOMEONE SHOWED ME WHERE IN MY CODE WOULD THINGS BE PLACED.
FOLLOWED BELOW IS WHAT I HAVE SO FAR.
HERES WHAT I NEED TO KNOW:
1.INSERTING SKYBOXES OR SKYSPHERES FROM DARKMATTER INTO THIS TO SURROUND MY MATRIX.
2.I DONT WANT THE MATRIX TO BE ALL ONE TEXTURE I WANT TO PUT DIFFERENT TEXTURES ON DIFFERENT TILES I CANT EXACTLY MAKE IT WORK RIGHT.
3.THERES TWO OBJECTS IN THE CODE(SWAT,THUG)BOTH MODELS FROM DARKMATTER.I KNOW HOW TO DO OBJECT COLLISION WITH SIMPLE STUFF SAY MAKING A COUPLE OF CUBES BUT I CANT DO IT WITH THIS WHEN I MOVE SWAT OBJECT IT RUNS RIGHT THROUGH THUG OBJECT.
4.BOTH OF THOSE OBJECT MODELS HAVE ANIMATIONS WITH THEM WHEN I MOVE SWAT THE ANIMATION IS PLAYING HIM MOVING HIS LEGS BUT HOW CAN I GET IT TO CORRESPOND TO ME MOVING IT.WHEN I MOVE IT ACROSS THE MATRIX I WANT IT TO APPEAR TO BE MOVING ITS LEGS.(APPEND LIMBS)?

ANYONE WHO CAN HELP WITH ANY OF THESE PROBLEMS PLEASE RESPOND AND LET ME KNOW WHERE IN THIS CODE WOULD I DO SO.

Sync On
Sync Rate 30
Hide Mouse
autocam off


Backdrop on
Set camera range 1,5000

Fog on
Fog distance 4000
Fog color RGB(128,128,128)
Color Backdrop RGB(128,128,128)

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

Rem texture matrix
Load image "grass09.bmp",1
Prepare matrix texture 1,1,1,1
Fill matrix 1,0,1

rem music
load music "endless.mid",1
play music 1

rem Load object
Load object "SWATmove.X",2
load object "thugmove.x",3
loop object 2
scale object 3,2000,2000,2000
scale object 2,2000,2000,2000
position object 3,4960,get ground height(1,5000,5500),5500
position object 2,5000,Get Ground Height(1,5000,5500),5500

Rem Main loop
Do
yAng=object angle y(2)

`the following is temporary. There will be more but it will made later
`get keyboard input for movement
if upkey()=1 then move object 2,-4
if downkey()=1 then move object 2,+4
if leftkey()=1 then yrotate object 2,wrapvalue(yAng-4)
if rightkey()=1 then yrotate object 2,wrapvalue(yAng+4)

`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
chase_cam(1)

`update the screen
sync
loop

rem chase function
function chase_cam(1)

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

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

`other variables
camDist=60
camHeight=30

`work out new position
xCamPos#=newxvalue(xPos#,yAng#,camDist)
zCamPos#=newZvalue(zPos#,yAng#,camDist)

`work out camera height
yCamPos#=get ground height(1,xCamPos#,zCamPos#)+camHeight
if yCamPos#
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 1st Feb 2003 21:07
Please dont TYPE IN ALL CAPS its really annoying, and makes it very hard to read your post.

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
koolaid
21
Years of Service
User Offline
Joined: 26th Jan 2003
Location: Cyberspace
Posted: 2nd Feb 2003 08:07
Okay tHeN Rp gAmEr nO suGGestionS FoR ME?

Daz
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location: United Kingdom
Posted: 2nd Feb 2003 12:20
Oooh, another scarcastic d00d, can't wait to hear from you, koolaid.

DarkBASIC Professional is the best programming utility.
8/10 Housewives agree!
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 3rd Feb 2003 01:18
For acting like that? Nope sorry not gonna help. Hint- all of that can be found in the manual. Thats all I say.

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
Arrow
21
Years of Service
User Offline
Joined: 1st Jan 2003
Location: United States
Posted: 3rd Feb 2003 01:21
Be respectful to those whom your asking help from, we don't get payed to do this.

Am I a butterfly dreaming I'm a man?
Or a bowling ball dreaming I'm a plate of samishi?
Never assume that what you see or feel is real.

Login to post a reply

Server time is: 2024-11-23 23:26:40
Your offset time is: 2024-11-23 23:26:40