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 / Matrix shift commands are wierd

Author
Message
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 2nd Feb 2003 23:57
I can't fathom out the matrix shift commands. They correctly shift the textures but the heights are inverted! Also the first row or column is filled with image 2 from prepared texture instead of wrapping from other end of matrix.

i.e. if you have a mountain, it becomes a big pit on the first shift, then back to mountain on second shift, then a pit, e.t.c.

Try snippet below and you will get my drift. Move around with cursors, space bar to activate shift.

Please help!

I love it when a plan comes together
wargamer
22
Years of Service
User Offline
Joined: 7th Jan 2003
Location: United Kingdom
Posted: 3rd Feb 2003 22:24
I posted on this myself recently. The inversion thing is an "undocumented feature" (ie bug). Best trick before it's fixed is to do 2 shifts at a time before doing an UPDATE MATRIX or SYNC.

You get an extra row/col of tiles with SHIFT MATRIX after the first shift. This is a bit hard to explain but its so you don't lose a row/col of height data (ie the bottom row of heights doesn't just overwrite the former top row, for example. (ok, I said this was hard to explain).

In this respect they work slightly differently to the DB Classic SHIFT MATRIX commands, so beware, if porting!

AMD Athlon 1600+, 256MB, GeForce 3
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 4th Feb 2003 01:28
Thanks for the reply. I don't have any plans to actually use the shift commands but am still going through all DBPro's commands one by one and the odd command just makes me tear my hair out!

Come to think of it, I can't think of any practical use or game I would want to use it!

I love it when a plan comes together

Login to post a reply

Server time is: 2025-05-17 14:11:59
Your offset time is: 2025-05-17 14:11:59