Author Topic: Raycaster from Planet Disco  (Read 8726 times)

0 Members and 1 Guest are viewing this topic.

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Raycaster from Planet Disco
« on: February 20, 2012, 12:35:35 pm »
So I decided to make my very own (extremely hard to see) disco-caster for my Flashlight Demo thread. It was actually really easy, from what I already in the the flashlight demo.



(in retrospect I went a little crazy on the psychedelic wall effects)
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: Raycaster from Planet Disco
« Reply #1 on: February 20, 2012, 12:43:29 pm »
Waoufh :crazy:

In what langage did you do that ?

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Raycaster from Planet Disco
« Reply #2 on: February 20, 2012, 12:46:59 pm »
Axe :D
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline nxtboy III

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 795
  • Rating: +26/-1
  • NXT!
    • View Profile
    • Program NXT
Re: Raycaster from Planet Disco
« Reply #3 on: February 20, 2012, 12:48:18 pm »
Axe? Hmm..
A lot of your work is done in ion, right?

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Raycaster from Planet Disco
« Reply #4 on: February 20, 2012, 12:48:40 pm »
Ion? What do you mean?
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: Raycaster from Planet Disco
« Reply #5 on: February 20, 2012, 12:50:10 pm »
Waaaah O.O

That's a bad thing that nobody already made a tuto on raycasting (3D is the ultime goal of an on-calc programmer XD )

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Raycaster from Planet Disco
« Reply #6 on: February 20, 2012, 12:52:46 pm »
hehe you know there are two other raycasters right?\

Runer's:
http://ourl.ca/8272

and Squidgetx's:
http://ourl.ca/8144
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: Raycaster from Planet Disco
« Reply #7 on: February 20, 2012, 12:54:45 pm »
yeah, but that's compressed programs, with ununderstable code (what, I'm a newbie ?)

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Raycaster from Planet Disco
« Reply #8 on: February 20, 2012, 12:55:39 pm »
Compressed programs? Neither of the three have any sort of compression going on (that I know of), it's just regular Axe.
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: Raycaster from Planet Disco
« Reply #9 on: February 20, 2012, 12:59:48 pm »
Yeah, but I meant without any explication of how it work (bad English powaaa)

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Raycaster from Planet Disco
« Reply #10 on: February 20, 2012, 01:37:47 pm »
Lol, that looks like it has some of the same display glitches that mine had...sigh, i never did figure out how to get mine to work properly :P
« Last Edit: February 20, 2012, 04:47:02 pm by squidgetx »

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Raycaster from Planet Disco
« Reply #11 on: February 20, 2012, 02:25:08 pm »
I assume you're refferring to the "fishbowl" type effect, with non-linearly sloped walls and whatnot?
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Raycaster from Planet Disco
« Reply #12 on: February 20, 2012, 02:38:41 pm »
Looks quite nice actually. I was surprised at the speed too. :)

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Raycaster from Planet Disco
« Reply #13 on: February 20, 2012, 04:47:31 pm »
I assume you're refferring to the "fishbowl" type effect, with non-linearly sloped walls and whatnot?

Yeah. I know the theory behind how to deal with it but iirc whenever I tried to implement it it never worked...I should work on that again sometime

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Raycaster from Planet Disco
« Reply #14 on: February 20, 2012, 04:54:59 pm »
I believe to fix the fishbowl effect you just need to multiply the ray distance by the Cos() of the angle between your front view and the angle of the ray.  Obviously this would be a bit tricky in Axe since Cos() returns a number from -127 to 128 so you would need to make sure you handled that properly, or got a hold of a trig routine that returns x256 format, or better yet, make a 96 byte table for the 96 possible cos values.