Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
3D space
Author Message
shaon

Posted: 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

Filename:  3D world.zip
Filesize:  2.19 KB

McKenzie

Posted: 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

Posted: 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.
shaon

Posted: 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

Posted: 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

Posted: 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

Posted: 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: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 7 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: