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.

Bug Reports / Shift Matrix Right causes textures on matrix to "slip"

Author
Message
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 18th May 2005 13:00
I was tying to make an "endless" terrain using the Scroll Matrix ~ commands and a height map. After hours of trying to figure out why the map wasn't lining up with the texture, I discovered that the texture was "slipping", even though the help says this:

Quote: "The shift ensures that the height and tile data
that represent the matrix contents are wrapped around to allow continuous shifting of the landscape."


Here's the code and attached media. It has to cycle through the matrix about twice before the texture slipping becomes noticable.



"Droids don't rip your arms off when they lose." -H. Solo
REALITY II

Attachments

Login to view attachments
spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 18th May 2005 18:57
First of all, program would not compile for me and crashed out. THis was because the 'point' command was trying to get colour of pixel outside bitmap bounds. x and y were going up to 500 but max is 499. So I just put x-1 and y-1 instead.

Ran program and made it loop round and round loads of times and noticed no slippage at all.

I too use shift matrix in doing endless terrains and have never had a problem.

Maybe you should post a screenshot of what problem looks like, or maybe even knock up a smaller less complicated example that shows problem easier.


spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 18th May 2005 19:00
Here's an old snippet of mine that I was using to test the shift matrix commands. Let me know if it works for you.




RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 19th May 2005 06:32
Quote: "First of all, program would not compile for me and crashed out. THis was because the 'point' command was trying to get colour of pixel outside bitmap "

No problems here. Are you using 5.8 (I think 5.8 fixed this issue)? Also, I don't have any plug-ins.

Here's the screen shot. This took about 5-7 loops to get this exaggerated.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II

Attachments

Login to view attachments
spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 19th May 2005 07:17
Ah yes, I can see problem now, and there does seem to be a slippage problem. I am pulling apart your code now...


spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 19th May 2005 08:04
Yep, definitely broken! Try this simple code below. It is simple 8 by 8 matrix, and you would expect hitting space 8 times should do one complete shift, but the texture shifts correctly and wraps correctly, but the heights do not wrap correctly and are always one behind. This is because they do not wrap on the matrix edge properly and so take 9 shifts to wrap instead of 8.

This command used to work perfectly I'm sure as I did lots of bug checking in previous patches for these commands.

My game has extensive use of shift matrix commands but works perfectly because I actually update matrix edge textures, heights and normals, from an array.



Let's hope someone confirms this bug so it gets fixed in next patch.


spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 19th May 2005 08:12 Edited at: 19th May 2005 08:12
For now, stick this after shift matrix command and it will fix your problem. It basically copies heights from right hand side to left hand side.




RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 19th May 2005 08:21 Edited at: 19th May 2005 08:32
Thanks a TON spooky.

Edit: With that, I made a few minor other adjustments and now everything lines up perfectly. Looks great now! I think I had it all right at first, then the slipping thing threw me way off. I didn't see the problem until I tried debugging the thing a million times (okay a slight exaggeration).

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 9th Jun 2005 04:22
Is this going to get confirmed. It occurs to me that this might seem like a resolution was given; and thanks to Spooky, a work-around was provided. But it still is a bug - and one I would like to see fixed. Thanks.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 27th Feb 2006 15:02
* Fixed SCROLL MATRIX commands to wrap height data perfectly in all four directions, does not skip a line of data now

"Small, smart, and running around the legs of dinosaurs to find enough food to survive, bedroom programmers aren't extinct after all "
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 14th Oct 2011 04:47
this one gives me info about waves

thanks RiiDii for posting
and thanks to LeeBamber for fixing the bug

now if only the forum would send me a copy of my message
when I post to a post by some one else

If a thought is Just a thought ~ so whats the main thought ?

Login to post a reply

Server time is: 2024-04-16 05:38:45
Your offset time is: 2024-04-16 05:38:45