Author Topic: How to fix this floor casting bug?  (Read 3954 times)

0 Members and 1 Guest are viewing this topic.

Offline va!n

  • Pentium
  • *****
  • Posts: 1431
  • Karma: 109
    • View Profile
    • http://www.secretly.de
How to fix this floor casting bug?
« on: December 05, 2021 »
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

Code: [Select]
// 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:

Offline va!n

  • Pentium
  • *****
  • Posts: 1431
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: How to fix this floor casting bug?
« Reply #1 on: December 14, 2021 »
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:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17394
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: How to fix this floor casting bug?
« Reply #2 on: May 15, 2023 »
That looks quite effective.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline va!n

  • Pentium
  • *****
  • Posts: 1431
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: How to fix this floor casting bug?
« Reply #3 on: June 03, 2023 »
thanks
- 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: