Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 3D space
Index -> Programming, Python -> Python Submissions
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
shaon




PostPosted: Fri Apr 11, 2008 8:44 pm   Post subject: 3D space

EDIT: correct file has now been uploaded, sorry for the confusion

controls: A = rotate left,
D = rotate right,
W = move forward,
S = move backward,
UP = rotate up,
DOWN = rotate down,
LEFT = rotate the screen by +2 degrees,
RIGHT = rotate the screen by -2 degrees

This is a very simple 3D space program. I'm going to comment it if people ask for commenting, but as of now, I'm just going to post it here anway to be the 2nd person to submit something here.....



3D world.zip
 Description:
controls: A = rotate left,
D = rotate right,
W = move forward,
S = move backward,
UP = rotate up,
DOWN = rotate down,
LEFT = rotate the screen by +2 degrees,
RIGHT = rotate the screen by -2 degrees

Download
 Filename:  3D world.zip
 Filesize:  2.19 KB
 Downloaded:  580 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
McKenzie




PostPosted: Sat Apr 12, 2008 1:35 pm   Post subject: Re: 3D space

Great stuff Shaon!
You should mention that you need pygame installed (most should have it anyways), and that the resolution is set insanely high but very easy to change.
Mackie




PostPosted: Sat Apr 12, 2008 1:50 pm   Post subject: RE:3D space

That's awesome, you should make a tutorial, or at least a space fighter. Razz
shaon




PostPosted: Sat Apr 12, 2008 6:47 pm   Post subject: Re: 3D space

yea, its going to be space fighter, and as for tutorial I found an extremely good site, which describes the calculations needed not just for 3D, but for 2D, texture mapping, etc. I found it to be highly useful, since the person decided to stay away from any programming language and explain the stuff as if though the person wasn't a computer person at all (meaning it is explained in math terms).
Here is the website: http://www.geocities.com/SiliconValley/2151/graphics.html

also how do I change the python file that I uploaded? it says that I can't edit comments which have been replied to, so how do I re-upload the new python file that has a lower res?
Insectoid




PostPosted: Thu Jun 19, 2008 1:02 pm   Post subject: RE:3D space

What is this 'pygame' you speak of? I guess the word is derived from the words 'python' ang 'game'?
Aziz




PostPosted: Thu Jun 19, 2008 2:00 pm   Post subject: RE:3D space

shaon, speak to Dan about changing uploads I think.

insectoid, http://www.pygame.org/news.html

Also, set the video mode down to 1024x768. Double-clicking the .py brings upon a failing command window that closes before one gets to read:

"
Traceback (most recent call last):
File "U:\3D world\3D world.py", line 10, in <module>
screen = display.set_mode(res,FULLSCREEN)
error: No video mode large enough for 1440x900
"

For others who try to run it, edit line 6 so it reads "res = (1024,768)" instead of "res = (1440,900)". (Or whatever resolution you want).

EDIT: Just ran it, it's quiet fun. I'm going to keep this code for reference, thanks!
Insectoid




PostPosted: Thu Jun 19, 2008 2:28 pm   Post subject: RE:3D space

Just tried it- Awesome. Awesome. And just for good measure, Awesome.
Display posts from previous:   
   Index -> Programming, Python -> Python Submissions
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: