Got the sightrange display working

Evilmrhenry

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

Awards

Give this entry an award

Scores

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

Files

File Uploader Date
monsters-tower0.10a.tar.gzfinal
Desided to go with "slightly transparent" over "over the top of everything"
evilmrhenry 2006/09/09 22:42
monsters-tower0.10.tar.gzfinal
Final, I think.
evilmrhenry 2006/09/09 22:26
monsters-tower0.06.tar.gzfinal
almost done...
evilmrhenry 2006/09/09 21:28
monsters-tower0.05.tar.gzfinal
version 0.05; most gameplay accounted for
evilmrhenry 2006/09/08 06:18
monsters-tower0.04.tar.gz
Got most of the vision tracing done. (Some nasty algorithms for that.)
evilmrhenry 2006/09/07 08:26
monsters_screen.png
Got the sightrange display working
evilmrhenry 2006/09/06 22:20
monsters-tower0.03.tar.gz
Version 0.03. Framerate's a bit low, but the basic algorithms work.
evilmrhenry 2006/09/06 22:17
monsters-tower0.02.tar.gz
Monster's Tower, non-working lights version
evilmrhenry 2006/09/04 23:25
monsters_tower0.01.tar.gz
Initial version/backup
evilmrhenry 2006/09/04 08:19
pyweek.jpg
basic environment completed
evilmrhenry 2006/09/03 07:50

Diary Entries

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...

3 comments

Progress?

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

Progress!

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 display.py, 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