pygame is
Simple DirectMedia Layer is
Site Swing
3d engine

3d engine - v0.1

Peter Nosgoth (nightwishphantom)



This is an attempt to write a 3d engine. It is very early in development and is not yet usable. To test it just start the script. You should be seeing a coordinate system and a spinning house. Use the keys WASD to fly around. The up and down arrow keys get you up and down. Use the mouse like in an ego shooter to look around. Although this looks impressive to me as far as it goes the engine has some problems. Try flying through the house, and the house will reappear in front instead of staying behind you. If you look closely enough you will see that the coordinate axes do not cross in one point as they should. To fix that the function conv_3d_to_2d needs to be improved. I would apreciate some help with the math. Another problem is importing pictures. For that a function is needed that can stretch an image to any dimension. (pygame.transform.scale() cannot do that) If you have any comments, ideas or improvements mail me at "". mfg nwp.




click to view original size


3d engine - v0.1 - Jul 9, 2006 account Comments

If you wish to leave a comment with your account, please sign in first.

July 31, 2007 12:56am - Broolio - nickname: (broolio)
>The problem is that im using sine, cosine and tangens which makes the positions absolute numbers.

try math.atan2(y,x)
June 13, 2007 9:40am - Justin Drobey - nickname: (ssjnarutovash) - 3/5
The concept looks good, but I get problems (it won't run...). If I try to run the source code that you presented directly, I get the following errors:

mfg nwp.
: command not found
: command not foundw: line 17:
./3d_engine_v0.1.pyw: line 18: import: command not found
from: can't read /var/mail/pygame.locals
from: can't read /var/mail/pygame
'/3d_engine_v0.1.pyw: line 21: syntax error near unexpected token `
'/3d_engine_v0.1.pyw: line 21: `pygame.init()

However, by adding the following line to the top of the source code:

#!/usr/bin/env python

The error I get is the following:

: No such file or directory

Nothing else but that... And the program still does not work... What seems to be the problem?
August 17, 2006 4:30pm - Peter Nosgoth - nickname: (nightwishphantom)
centering the center point?
The problem is that im using sine, cosine and tangens which makes the positions absolute numbers.
August 2, 2006 4:06pm - Anonymous - nickname: () - 2/5
it's an engine, and your scored a two for making it work. i may be wrong, but you may be centering the center point, thus making the camera turn around when you go through the house.

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
Jan 31, 2017

Jan 24, 2017

Jan 19, 2017

Jan 18, 2017

Jan 7, 2017

Dec 30, 2016

Dec 8, 2016

Nov 28, 2016

Nov 27, 2016

... more!
for pygame related questions, comments, and suggestions, please see help (lists, irc)