• Welcome to Dark Bit Factory & Gravity.
 

How to fix this floor casting bug?

Started by va!n, December 05, 2021

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

va!n

hi guys,
i am trying to code something that looks like a smooth scrolling floor-casting effect (just only horizinal stripes).
seems i have problems with the mod operator and atm no idea, how to calculate the correct rect-high (should be smaller, yet more far away from the eye)
any idea, how to solve this problem? thanks


// t == timer

for (int i = 7; i > 0; --i)
    drawRect( 0, 60+pow(i,2) - t*9 % 10, 150, i )

- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

va!n

i changed the idea a bit, so i finally created and released this 140 char DWITTER entry...

https://www.dwitter.net/d/24500

- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Shockwave

That looks quite effective.
Shockwave ^ Codigos
Challenge Trophies Won:

va!n

- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won: