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.

2D All the way! / matrix tiles/segments problem?

Author
Message
mmmm_
20
Years of Service
User Offline
Joined: 31st Aug 2005
Location:
Posted: 10th Sep 2005 23:27
is there any way to give matrix tiles/segments seperate identities. I am trying to make a 2d rpg/top down perspective game and I need diferent tiles to behave differently (I.E different tiles need different terrain)


example: (paste into db)

[CODE]
`SETTING UP---------------------------------------
sync on : sync rate 45
backdrop on
randomize timer()
color backdrop 0
`SETTING UP---------------------------------------


make object box 1,10,10,10

make matrix 1,640,640,64,64

position object 1,5,0,5








do


objectposX = object position X (1)
objectposY = object position Y (1)
objectposZ = object position Z (1)
objectangleY = object angle Y





`------------------------MOVEMENT---------------------------------
if upkey() = 1 and countU = 0 then moveup = 1
if downkey() = 1 and countD = 0 then movedown = 1
if upkey() = 0 then countU = 99
if downkey() = 0 then countD = 99
if moveup = 1 then move object 1,10
if movedown = 1 then move object 1,-10

moveup = 0
movedown = 0

countU = countU + 1
if countU = 100 then countU = 0
countD = countD + 1
if countD = 100 then countD = 0




if rightkey() = 1 and countR = 0 then moveright = 1
if leftkey() = 1 and countL = 0 then moveleft = 1
if rightkey() = 0 then countR = 99
if leftkey() = 0 then countL = 99
if moveright = 1 then move object right 1,10
if moveleft = 1 then move object left 1,10

moveright = 0
moveleft = 0

countR = countR + 1
if countR = 100 then countR = 0
countL = countL + 1
if countL = 100 then countL = 0
`------------------------MOVEMENT---------------------------------






Xrotate camera 90
set camera to follow objectposX,objectposY,objectposZ,objectangleY,0,250,1,10

sync
loop
[/CODE]



If this isn't possible, is there another way I could go about doing it?


p.s i am new to dark basic


Thanks

Login to post a reply

Server time is: 2026-07-09 01:29:43
Your offset time is: 2026-07-09 01:29:43