Old 4th September 2009, 18:56   #1
Warrior of the Light
Forum King
 
Warrior of the Light's Avatar
 
Join Date: Aug 2002
Location: The Netherlands
Posts: 4,077
strange behaviour in Movement

reference: thread in GD

See attached preset, Here's a screenshot for comparing reasons.

Someone wants to run AVS on a 50x10 LED display and wanted suggestions as for which presets to use.

For that purpouse, I made this mosaic-like filter that would create a 50x10 grid to put at the bottom of a preset. (I omitted the y-axis for testing reasons.)

What happens, is that everything between x=.12 and x=0, x=0 and 0.4, and x=-0.4 and x=-0.8 are bundeled.

Does this only happen on my machine? If not, does anyone have a suggestion? Is my code faulty?
Attached Files
File Type: zip wotl - 50x10.zip (596 Bytes, 252 views)

Jesus loves you [yes, you] so much, he even died for you so that you will not need to die, but live forever
Warrior of the Light is offline   Reply With Quote
Old 4th September 2009, 20:52   #2
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
i have no idea, but i have to say i kinda like that preset. remove that white line, make it much slower and maybe some random mirrors
Yathosho is offline   Reply With Quote
Old 4th September 2009, 21:27   #3
Warrior of the Light
Forum King
 
Warrior of the Light's Avatar
 
Join Date: Aug 2002
Location: The Netherlands
Posts: 4,077
All the colors are created by the Colorfade and the Water filter (basically my default testing background). I slowed it a bit down but the Colorfade isn't really tunable in the way I'd really wish. The step-size of the sliders isn't big enough for this use.

Disabling the second EL significantly boosts the FPS

Added some other crap too. Enjoy it.
Attached Files
File Type: zip wotl - tiled heroes.zip (1.0 KB, 259 views)

Jesus loves you [yes, you] so much, he even died for you so that you will not need to die, but live forever
Warrior of the Light is offline   Reply With Quote
Old 4th September 2009, 23:49   #4
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
love that second version, man! the first version created an urge to play super mario kart on the snes
Yathosho is offline   Reply With Quote
Old 7th September 2009, 12:59   #5
jheriko
Forum King
 
jheriko's Avatar
 
Join Date: Aug 2002
Location: a twist in the fabric of space
Posts: 2,150
Send a message via ICQ to jheriko
Your code looks correct (if a bit silly, all those if function calls), but its easy to slip up with huge statements like these.

I'd recommend something that actually rounds all x's to the nearest 0.04 or whatever... but thats not really the best way to do a mosaic either. Something like x=floor(x*25)/25; should do the trick though.

-- Jheriko

'Everything around us can be represented and understood through numbers'
jheriko is offline   Reply With Quote
Old 7th September 2009, 13:45   #6
Warrior of the Light
Forum King
 
Warrior of the Light's Avatar
 
Join Date: Aug 2002
Location: The Netherlands
Posts: 4,077
I guessed there would be a better solution, but lazy as I am I went for the straightforward option.
I tested it your method, and it works fine if you use

x=floor(x*25)*.04;
y=floor(y*5)*.2

That fixes the problem for testing presets for a LED display, but I'm still wondering what could cause the shown behaviour in the first version.

Ah, well.. there are more (important) bugs in AVS.

Thanks, J

Jesus loves you [yes, you] so much, he even died for you so that you will not need to die, but live forever
Warrior of the Light is offline   Reply With Quote
Old 9th September 2009, 07:09   #7
jheriko
Forum King
 
jheriko's Avatar
 
Join Date: Aug 2002
Location: a twist in the fabric of space
Posts: 2,150
Send a message via ICQ to jheriko
I took a fresh look at the code and managed to spot the problem:

if(above(x,.8),.10,
if(above(x,.4),.6,
if(above(x,0),.2,
if(above(x,-.4),-.2,
if(above(x,-.8),-.6,

.6 should be .06, .2 should be .02, etc...

Classic. Its always these kinds of mistakes which are hardest to debug. I scanned over that bit of code at least four times before I realised this...

If it makes you feel any better I spent three hours at work a couple of weeks ago debugging something which was just missing a "!" (not) from a boolean condition. Its not the first time thats happened to me either...

There is a lesson here though, don't write really long code where a couple of lines suffice - it increases the probability of human errors slipping in. Although I guess it doesn't help much if you don't know the rounding "trick".

-- Jheriko

'Everything around us can be represented and understood through numbers'
jheriko is offline   Reply With Quote
Old 9th September 2009, 13:50   #8
Warrior of the Light
Forum King
 
Warrior of the Light's Avatar
 
Join Date: Aug 2002
Location: The Netherlands
Posts: 4,077
... I can't count.

Thanks for finding it.
These are, indeed, the hardest to find.

The positive side here: The preset above looks like crap with a correct Movement.

Jesus loves you [yes, you] so much, he even died for you so that you will not need to die, but live forever
Warrior of the Light is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Visualizations > AVS > AVS Troubleshooting

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump