Re: Earwax

@44
Reading through the raycast algorithm I found, it seems like it's simply iterating out in a straight line from the player to find stuff that's blocking it. Is that right?

Could I simply do:

x, y = (4, 4)
heading = 0
distance = 1.0
while True:
    x, y = coordinates_in_direction(distance, heading)
    if object_at_coordinates(x, y) is not None:
        # Return object.

Is it really that simple? or am I missing something? I get that coordinates won't always be that simple, and I won't always have the luxury of the player facing absolutely north, but is this the general idea?

Also, are there any specific articles or papers you'd recommend I read on this stuff? I don't expect you to go digging for me, I'd just rather not look at multiple sources on Google - not knowing whether what I'm looking at is good or not - if you have something you personally think is good and informative.



-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Jayde via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : ironcross32 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Jayde via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Jayde via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Jayde via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Jayde via Audiogames-reflector

Reply via email to