Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Before I go and build it myself, I have been looking for a library that may help making a grid based first person view similar to: https://www.youtube.com/watch?v=GwmZoCFd4Us I plan to make a web based version of this in a hackathon I am organizing. Would there be something for this in python?

share|improve this question

1 Answer 1

What you are looking for (i guess) is a technique called raycasting. Good examples of the use of raycasting is of course the Doom series or Wolfenstein 3D.

Since it's not used that much anymore (for rendering at least), i'm not sure if you will be able to find a library/engine that would do this for you out of the box.

You may have to do it yourself, what you want to pick then is a standard rendering library such as SFML, SDL etc. The process of raycasting is very simple. If i would have to recommend only one reading about raycasting i would choose this one.


Also if you want to use Python be careful of what tools you decide to use. I would recommend avoiding PyGame for this kind of things. I made a Wolfenstein 3D clone in C that i tried to port in Python using PyGame, the game was terribly slow.

share|improve this answer
    
Sorry but this is not what I was looking for. Noticed that the game I mentioned was grid based. Wolfenstien 3d is not Grid based. What I am making is going to be in HTML with a Python web backend. I was hoping to find something that could help me handle the map, collisions, and rendering in the backend. –  Jason Brower Nov 11 '12 at 19:06
    
@JasonBrower maybe you should precise what you mean by "grid based". Since Wolfenstein 3D mazes are nothing but a grid (or a 2d array), i consider it as grid based. –  nathan Nov 11 '12 at 20:11
1  
I think he means the movement. That said, using the technique of Wolf3d is still a decent idea. Modern games of the genre (like Legend of Grimrock, or even older titles like Stonekeep) don't teleport the player forward by a whole block when he moves; that's disconcerting and makes it easy to get lost or get motion sickness. Smoothly moving forward or smoothly rotating a turn -- even if the results are locked to a grid and cardinal directions -- is much better. That said, doing it with WebGL using normal 3D rendering is easy, probably easier than raycasting manually. –  Sean Middleditch Nov 11 '12 at 20:50
    
Thanks guys. It's gonna be a tough one getting into webgl. I haven't the first clue how things work in 3d. :/ Guess I will have to learn eventually. :) –  Jason Brower Nov 12 '12 at 6:37
    
@SeanMiddleditch the only difference i see with Wolf 3D and the video linked by the OP is the fact that the movement is turn based (grid based...). Such a type of movement is totally compatible with ray casting since ray casting is only for the rendering part. Gameplay/game logic should be totally independent of the rendering part. Used 3D is totally viable but for i have seen so far on the video, i still think using ray casting would be easier. –  nathan Nov 12 '12 at 9:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.