Skip to main content
GameDev.net gamedev.net
🔒 Locked

Extending lesson 10

Started by riekhof Mar 29, 2005 at 5:54 AM 4 replies 2.1k views
Original Post
riekhof
riekhof
Wanted: Hint on how to make lesson 10 stop running thru walls. I've been hacking on lesson 10 for a while now. I'm a newb, but I've managed to add strafing and get it to use different textures for the floor, walls, and ceiling. My next goal is to make it so you can't run through walls, but not sure how to go about this. I looked at lesson 30, but its over my head and doesn't really look like it deals with camera to object collisions. Are there any lessons or tutorials around that would help me on this? Also, at the end of the article the author said he'd be posting another tutorial on this. Is that next tutorial available anywhere?
lc_overlord
lc_overlord
lesson 30 can be applied to this.
But i have to admit that true colition detection is tough as hell.

Using something like ODE could help, but colition detection is something all gameprogramers must learn so it just a matter of hard work and study study study.
Using google helps to.

the easiest an cheapest hack is to use lot's and lot's of if statements that basicly say.
If you move into this area then move back because it is forbidden to go here.
riekhof
riekhof
tx for the info lc_overlord. The best thing I was able to google on this is:

http://www.morrowland.com/apron/article/gl/boundingbox/index.php

So I guess I'll try to come up with some clever data structure that keeps bounding box information on things kind of close to me.

Darrel
Kazade
Kazade
Hey,

Its strange that you should post this, last nite i started working on some code for a tutorial to add collision detection to lesson 10. The collision will allow walking upstairs, sliding along walls etc.

Unfortunately I have my dissertation to work on at the mo so finding time to do it is difficult.

Strangly enough my dissertation is a 3D map editor, which will have an option to export to (you guessed it) lesson 10 format.

So watch this space :D

Luke.
Member of the NeHe team.
leggyguy
leggyguy
The best collision detection tutorials are on gametutorials.com.

Unfortunately, gametutorials.com recently underwent a change, and they now charge for their tutorials, which is awful. But still, the collision detection tutorials are top rate, and I know that I and alot of others learnt alot from these tutorials back when they were free. However, colision detection is complicated, even when using these tutorials, so I think there would be a chance that even after paying for these tutorials, you may not understand them, in which case you wasted good money.

The hack mentioned, whereby we make certain zones inaccessible, is certainly the best workaround I can think of without implementing real colision detection. Certainly for walking around a room, it would be easy to implement and effective.





Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.