Jump to content
  • Advertisement
Sign in to follow this  
LEdxP37

delete

This topic is 4828 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
The www.gametutorials.com bsp tutorials had one with full collision detection and gravity/jumping/stepping. But they started charging for stuff, so I don't know if you can get hold of that tutorial now. But for decals, try this site: http://members.net-tech.com.au/alaneb/decals.html (decals = temporary marks)

Hope that helps.

-Bobo the Clown

Share this post


Link to post
Share on other sites
For your weapon, render your world/monsters/anything else first. Then switch to glOrtho(), switch of depth testing and draw your weapon last.

Share this post


Link to post
Share on other sites
For the weapon you can switch of depth tests with glDisable(GL_DEPTH_TEST). Then it will be drawn over everithing else. The collition detection should also make sure you don't get too close to walls.

Share this post


Link to post
Share on other sites
Quote:
Original post by GamerSg
For your weapon, render your world/monsters/anything else first. Then switch to glOrtho(), switch of depth testing and draw your weapon last.


3D models in a 2D view tend to look funny. The only time you'd ever need to switch to the orthographical view, would be when you were drawing a 2D GUI/HUD (or a 2D weapon). ;)

Share this post


Link to post
Share on other sites
If you want some good ideas on how to do this stuff, why not grab the quake2 source code? I'm not sure of the best place to get it, but if you get stuck, pm me and I'll email you it or something. It's GREAT fun to play around with that code, and it'll give you some nice ideas on how to do things (and how NOT to do them too :))

Share this post


Link to post
Share on other sites
Quote:
Original post by Boruki
If you want some good ideas on how to do this stuff, why not grab the quake2 source code? I'm not sure of the best place to get it, but if you get stuck, pm me and I'll email you it or something. It's GREAT fun to play around with that code, and it'll give you some nice ideas on how to do things (and how NOT to do them too :))

Get it here (ftp).

Share this post


Link to post
Share on other sites
Quote:

For the weapon you can switch of depth tests with glDisable(GL_DEPTH_TEST). Then it will be drawn over everithing else. The collition detection should also make sure you don't get too close to walls.

Rendering unsorted polygons without the depth test could cause some weird artifacts. I think the best way would be to draw your scene, clear the depth buffer and then draw your gun.

[edited for clarity]

Share this post


Link to post
Share on other sites
I've got the 2nd beta of VS 2005, and I found it was missing some DirectX include files. They're probably deprecated but I also have Dev-C++ installed, and got it to compile by adding Dev-C++'s include directory (which has those files) to the end of VS's include path. You might be able to do that, or download an older (version 7 maybe) DirectX SDK and do the same there. Although the includes are missing, the functions within them are still in the DirectX libraries.

Of course if that isn't your problem, we'll need more information. Error messages would help.

[Edited by - Nathan Baum on May 28, 2005 3:39:57 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by The Rug
Rendering unsorted polygons without the depth test could cause some weird artifacts. I think the best way would be to draw your scene, clear the depth buffer and then draw your gun.

That might be a bit slow. If you don't mind losing a bit of depth precision, it would be faster to use glDepthRange. glDepthRange defines the mapping between depth in world coordinates and depth in screen coordinates.


// The scene will be 'squeezed' into the first 70% of depth-buffer depth.
// |#######---|
glDepthRange(0, 0.7);
drawScene();
// The gun will be 'squeezed' into the remaining 30% of depth-buffer depth.
// |-------###|
glDepthRange(0.7, 1);
drawGun();


You will also want to move the far plane close to the end of your gun, otherwise you may get depth aliasing problems.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!