Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
I need some tips with 3D graphics/coding
Author Message
Danjen

Posted: Sun Dec 30, 2007 6:58 pm   Post subject: I need some tips with 3D graphics/coding

Now, I haven't been in a programming class for almost 1.5 years, and have not really programmed for almost as long, but recently, I wanted to get back into it. I have some general, more abstract questions related to full-3D games that are language independant.

I asked my math teacher how I should use 3d mathematics and he said to use vectors. I have no knowledge/experience with those yet, but if everything is relative to a point, what happens when a line or point has one axis with the same value as the relative point? Would that not produce a divide by 0 error, or is that where limits come in?

Also, in the tip of the day thread, Martin said to learn how to use bitshifts. Wikipedia did not provide why to use them. Any insights?

Nick

Posted: Sun Dec 30, 2007 7:10 pm   Post subject: RE:I need some tips with 3D graphics/coding

http://en.wikipedia.org/wiki/Bitwise_operation
Danjen

Posted: Sun Dec 30, 2007 7:19 pm   Post subject: Re: I need some tips with 3D graphics/coding

Yes, that was. I couldn't really make sense of the bitshift part, but the rest of it was completely logical.

Edit: Ahh, never mind I never really looked at it. It seems that bitshifting left/right appears to double or half the binary number. Still though, why should I learn / care how to do bitwise operations?
OneOffDriveByPoster

Posted: Mon Dec 31, 2007 1:23 am   Post subject: Re: I need some tips with 3D graphics/coding

Danjen @ Sun Dec 30, 2007 7:19 pm wrote:
Still though, why should I learn / care how to do bitwise operations?
http://en.wikipedia.org/wiki/Bit_manipulation
http://en.wikipedia.org/wiki/Bitboard
http://en.wikipedia.org/wiki/Bit_array
...
etc.
[Gandalf]

Posted: Mon Dec 31, 2007 4:12 am   Post subject: RE:I need some tips with 3D graphics/coding

Or right here on CompSci.ca, zylum's Turing Bitwise Operators tutorial, which should be easy enough to apply to whichever language you choose. Bit manipulation is definitely useful, but you might want to consider that it's not a prerequisite to learning 3D graphics.
Danjen

Posted: Mon Dec 31, 2007 5:09 pm   Post subject: Re: I need some tips with 3D graphics/coding

Quote:
Bit manipulation is definitely useful, but you might want to consider that it's not a prerequisite to learning 3D graphics.

Oh, of course I know that, but I was just curious.
But I will definitely need help with the mathematics... Like for instance, how do you calculate the angle of an angle with 3 dimensions (x,y,z)?
Clayton

Posted: Mon Dec 31, 2007 5:36 pm   Post subject: RE:I need some tips with 3D graphics/coding

Add two vectors at a time.
Danjen

Posted: Mon Dec 31, 2007 8:39 pm   Post subject: Re: I need some tips with 3D graphics/coding

So like, if point A was (0,4,-2) and point B was (2,1,3), the vector angle would be (2,5,1)?? How would this translate into Turing?

HeavenAgain

Posted: Mon Dec 31, 2007 9:37 pm   Post subject: RE:I need some tips with 3D graphics/coding

add the same index? o.o

Posted: Mon Dec 31, 2007 11:12 pm   Post subject: Re: I need some tips with 3D graphics/coding

Instead of asking how to do it, search around in Google. It will probably be more helpful to you to find a bigger resource rather can constantly asking how to do it.
This is a good resource for 3D Math. Also I suggest you look into matrices if you want to make a 3d engine.
Danjen

Posted: Tue Jan 01, 2008 12:12 am   Post subject: Re: I need some tips with 3D graphics/coding

Thanks, just looking for a push in the right direction.
abcdefghijklmnopqrstuvwxy

Posted: Tue Jan 08, 2008 7:39 pm   Post subject: Re: I need some tips with 3D graphics/coding

Whatever you do, don't make a 3d engine. Use one that's already available.
md

Posted: Tue Jan 08, 2008 7:55 pm   Post subject: Re: I need some tips with 3D graphics/coding

abcdefghijklmnopqrstuvwxy @ 2008-01-08, 7:39 pm wrote:
Whatever you do, don't make a 3d engine. Use one that's already available.
Why? Writing your own is how you learn! You get to see why things are written the way they are and what the pitfalls of different designs are.

Using code someone else has written will never teach you anything.
Tony

Posted: Tue Jan 08, 2008 8:14 pm   Post subject: Re: I need some tips with 3D graphics/coding

abcdefghijklmnopqrstuvwxy @ Tue Jan 08, 2008 7:39 pm wrote:
Whatever you do, don't make a 3d engine. Use one that's already available.

In fact, don't bother writing anything! Just pick up the latest version of Halo from the local Wallmart's electronics department, and frag some noobs.

I'm with md on this one -- there is a lot that can be learned, even from the very basics of a 3D engine.
Tony's programming blog. DWITE - a programming contest.
abcdefghijklmnopqrstuvwxy

Posted: Wed Jan 09, 2008 2:34 am   Post subject: RE:I need some tips with 3D graphics/coding

You might learn a few things, but not as much as you'd learn actually making a game. Making an engine without any experience (for instance, not even knowing what a vector is) will get you nowhere. You will never succeed in making anything even half as useful as you would have if you'd spent time focusing on making a game and then crafting tools to help with specific things you need for your game. This was how engines were born in the first place. Someone did not just wake up with the design for an engine. It happened over a great length of time and process.

Create an engine if you want, you've been warned.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 2  [ 24 Posts ]
Goto page 1, 2  Next
 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: