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

Username:   Password: 
 RegisterRegister   
 I need some tips with 3D graphics/coding
Index -> General Programming
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Danjen




PostPosted: 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? Razz
Sponsor
Sponsor
Sponsor
sponsor
Nick




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

was this the wikipedia page you read?
http://en.wikipedia.org/wiki/Bitwise_operation
Danjen




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




PostPosted: 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]




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




PostPosted: 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. Smile
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




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




PostPosted: 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?
Sponsor
Sponsor
Sponsor
sponsor
HeavenAgain




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

add the same index? o.o
Saad




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




PostPosted: 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. Wink
abcdefghijklmnopqrstuvwxy




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




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




PostPosted: 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. Laughing

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




PostPosted: 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:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 24 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: