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 / can some one tell me what i am doing wrong??

Author
Message
finalfantasymythology
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location: United States
Posted: 8th Apr 2003 08:48
sync on
hide mouse

`---------------
`create a matrix
`---------------
`the matrix will be 100 units square and be split up into 100 squares (10*10)
make matrix 1,100,100,10,10


`----------------------
`set the matrix texture
`----------------------
`load matrix texture
load image "floor1.bmp",1
`prepare the matrix texture
prepare matrix texture 1, 1, 2,2

`loop through matrix tiles
for xTile=0 to 9
for zTile=0 to 9
`set the matrix tile texture
`the texture is a random value
set matrix tile 1,xTile,zTile,rnd(3)+1
next zTile
next xTile

`update the matrix after it has been changed
update matrix 1

`main loop
do

`update the screen
sync
`make a temporary player object
make object sphere 1,5
position object 1,250,1,250

`---------
`MAIN LOOP
`---------
main:
do

yAng=object angle y(1)

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

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

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

`update the camera
chase_cam(1)

`update the screen
sync



loop
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 8th Apr 2003 09:32
maybe your code was cut off.

I can see your using commands and not closing them or using them correctly.

instead of a do /loop use a while /endwhile dont forget to destroy your media that you create if u want to restart your game for level ascending etc.

use the [ c o d e ] your code [ / c o d e ] tags to post code.
remove the spaces I placed them there so u could read it


You also forget to mention wat your trying to acheive.

Spend more time formulating your problems and dont expect people to know what your thinking.


be specific so people can help you and not get crossfire results.





Login to post a reply

Server time is: 2024-11-24 08:40:13
Your offset time is: 2024-11-24 08:40:13