Any example code of simple fps?

Hi all,

Are there any examples of coding a simple FPS (first person shooter)?

Thanks in advance.

Short answer: No…

Long answer:

I don’t think it would help you very much. Since completed games are very complex, there isn’t much you could learn from them, if you’re just beginning with Panda&Python…
You can get some advanced ideas from completed games, but if you don’t already know the basics, the source won’t be understandable.

There are however plenty of samples that could help you figure out, how to write one on your own. Like the roaming Ralph tutorial for example. It has the wrong camera perspective, but that can be changed.

Start to read/write some code and you’ll come up with specific question that either have already been answered on this forum, or can be answered.

But as of now, there’s no example of a real FPS (at least as far as I know), just samples that have something in common with FPS games.

Yeah, you are right!
Thanks a lot.

not to step on legions toes, but there are some fps examples for panda3d.
like this… … e=SteelWar

best of all its pretty simple and great to learn by, shows basic camera movement with the mouse fps style and shows attaching nodes to the camera,no coliltion detection though but a great base to start with.
you’ll need a svn client though to download it, theres no zip/rar on his site

Hi vonCrabbitz,

Thank you for your recommendation.


  1. Do I need to download subversion 1.4.4 in order to use the code?
    (I am used to use zip/rar file) … temID=1891

  2. … e=SteelWar
    What is the lauguage used (dutch/french)?

  3. … teelwarPy/
    Do we need to download all files before running?

Thanks in advance. :smiley:

your best bet is to use TortoiseSVN
it will integrate into windows, when you right click in a folder a svn checkout option will appear then you put in the the link on the site. you can unistall it afterwards if you dont want to keep it

a SVN is kinda like a downloader it will automaticlly download all those files for you, so no you don’t have to manually download them.

the site in italian but that doesn’t effect the code, its still python

here is my little “reversed engineered version”…

simple as it gets code to show a fps movement

Thanks a lot.

Hi vonCrabbitz,

While running “FPS_camera_template”, I found that there are some extra lines on the top of bamboo. Why? How do I remove them?

Thanks in advance.

Those lines are the bottom line of each texture used there. Sure it ends up that way because the texture’s wrap mode are set to repeat (tiled). Open your .egg file using your code editor, look for wrapu & wrapv entries, and change the “repeat” mode to “clamp”. You should change all texture’s wrap mode, except the ground texture.