Got the sightrange display working


Pyweek is a wonderful excuse to expand knowledge. This time, it's Opengl.


Give this entry an award


Ratings (show detail)

Overall: 2.9
Fun: 2.9
Production: 2.9
Innovation: 3.1

1% of respondents wished to disqualify the entry.
Respondents: 34


File Size Uploader Date
Desided to go with "slightly transparent" over "over the top of everything"
121.7 KB evilmrhenry 2006/09/09 22:42
Final, I think.
121.7 KB evilmrhenry 2006/09/09 22:26
almost done...
121.2 KB evilmrhenry 2006/09/09 21:28
version 0.05; most gameplay accounted for
97.5 KB evilmrhenry 2006/09/08 06:18
Got most of the vision tracing done. (Some nasty algorithms for that.)
62.7 KB evilmrhenry 2006/09/07 08:26
Got the sightrange display working
213.8 KB evilmrhenry 2006/09/06 22:20
Version 0.03. Framerate's a bit low, but the basic algorithms work.
59.6 KB evilmrhenry 2006/09/06 22:17
Monster's Tower, non-working lights version
52.8 KB evilmrhenry 2006/09/04 23:25
Initial version/backup
302.5 KB evilmrhenry 2006/09/04 08:19
basic environment completed
71.8 KB evilmrhenry 2006/09/03 07:50

Diary Entries


Well, I gave up on opengl lights. I think I would get them working properly, but that would take too long.

What I have done instead, is have two textures for the floor (light and dark textures). Normally, the dark texture shows, but when an enemy is looking in a direction, I overlay it with a light texture. Some interesting math in, if that's your thing...

Finally, you can't see it very well, but the sight triangle is actually cone-shaped, and can be partially blocked by walls.

1 comment


Well, it turns out that opengl lights are significantly harder than I thought. Basically, I think I'm doing everything right, but no lights show up. After close examination of both the nehe tutorials, and the opengl docs, I'm giving up for now. If somebody actually "gets" opengl lights, a pointer or two could be useful...

Anyway, I'm going to get the level editor working instead.

Add a comment

The Monster's Tower

Your tower has been invaded by horrible humans. Devour all of them to be freed from the menace. But stay out of their sight...

Top down view, all enemies have a marked field of view (flashlight style). Get close enough, and you can devour a human.

Should be interesting...