Go Back   RunUO - Ultima Online Emulation > Developer's Corner > Programming > XNA

XNA Tutorials and support for game development using Microsoft's XNA Game Studio framework.

Reply
 
Thread Tools Display Modes
Old 11-14-2007, 11:25 AM   #1 (permalink)
Forum Expert
 
Join Date: Jul 2003
Location: Arizona
Age: 18
Posts: 3,149
Send a message via AIM to Storm33229 Send a message via Yahoo to Storm33229
Default What is?

the next tutorial covering?
__________________
Quote:
Originally Posted by Radwen
You should crush your pills and sniff them.
Storm33229 is offline   Reply With Quote
Old 11-14-2007, 11:53 AM   #2 (permalink)
ConnectUO Creator
 
Jeff's Avatar
 
Join Date: Jan 2004
Location: In your mom
Age: 27
Posts: 4,762
Default

Quote:
Originally Posted by Storm33229 View Post
the next tutorial covering?
not sure yet, need to think about it. Any ideas?
__________________
Jeff Boulanger
ConnectUO - Core Developer

Want to help make ConnectUO better? Click here to submit your ideas/requests
Use your talent to compete against other community members in RunUO hosted coding competitions

If you know XNA (even if its just a little) or are a good artist(2d or 3d) and are interested in making games for a hobby send me a pm or drop by #xna in irc.runuo.com. I'm looking to put together a small game development team.


Please do not pm me for support. If you are having issues please post in the appropriate forum. Thanks for your continued support of both ConnectUO and RunUO
Jeff is offline   Reply With Quote
Old 11-14-2007, 12:24 PM   #3 (permalink)
Forum Expert
 
Join Date: Jul 2003
Location: Arizona
Age: 18
Posts: 3,149
Send a message via AIM to Storm33229 Send a message via Yahoo to Storm33229
Default

Quote:
Originally Posted by Jeff View Post
not sure yet, need to think about it. Any ideas?
This is the site I'm currently looking at:
Blue Rose Games - XNA 101 Tutorials
__________________
Quote:
Originally Posted by Radwen
You should crush your pills and sniff them.
Storm33229 is offline   Reply With Quote
Old 11-14-2007, 10:58 PM   #4 (permalink)
Forum Expert
 
FingersMcSteal's Avatar
 
Join Date: Mar 2006
Location: North East, England, UK
Posts: 827
Send a message via ICQ to FingersMcSteal Send a message via MSN to FingersMcSteal
Arrow

Be interested to see how to define 3 dimensional shapes, start with a simple cube and build from that small program you did to explain the spinning triangle... while i'm here can you explain this part please...

Code:
 
//Vertices of our primitive
vertices = new VertexPositionColor[3];
//Top left vertex
vertices[0].Position = new Vector3(-1, 1, 0);
//Top right vertex
vertices[1].Position = new Vector3(0, 2, 1);
//Bottom left vertex
vertices[2].Position = new Vector3(1, -1, 0);
//Setup the colors of each vertex
vertices[0].Color = Color.Red;
vertices[1].Color = Color.Blue;
vertices[2].Color = Color.Green;
//Index of each corner
indices = new int[] { 0, 1, 2 };
//Position of our primitive
position = Vector3.Zero;
If i'm getting this right (probably not but anyway...),

The 3D world is the matrix,
Vector3 is that particular triangle,
And thats defined here...

Code:
 
//Top left vertex
vertices[0].Position = new Vector3(-1, 1, 0);
//Top right vertex
vertices[1].Position = new Vector3(0, 2, 1);
//Bottom left vertex
vertices[2].Position = new Vector3(1, -1, 0);
The RED are x,y,z in 3D space??? (or am i way off) and what are they relative to?

And

Code:
 
//Index of each corner
indices = new int[] { 0, 1, 2 };
What roll does this line play in it?

The way i think it works is,
You have a primative (Your shape/object),
Which is made up of vertices,
Each vertice has a Vector3(-1, 1, 0) type definition ???, which are called indices???

Like... A Primative made up of vertices (Refrenced by Vector3?) and the indices are what make your shape?

Anyway... now i have a headache thinking about this i'll leave it in your hands .
__________________
We can be found on joinUO.com or listUO.com, come try us out.
FingersMcSteal is offline   Reply With Quote
Old 11-15-2007, 12:55 AM   #5 (permalink)
Newbie
 
Join Date: Nov 2007
Age: 22
Posts: 63
Default

Primative = A line (two vertices), point (one vertex), or triangle (three vertices).

A Vector is used to tell the graphics card where to draw a vertex (a group of vertexs are called vertices).

Vector3(X, Y, Z)

Indices are used when you have more then one vertex in the same spot, instead of using 2 vertices you can use indices to tell the graphics card something like "use the vertex at position X in the vertex buffer when drawing this vertex."

That should be right, but Jeff knows much more then I do and might be able to explain better.
Chase.XNA is online now   Reply With Quote
Old 11-15-2007, 01:44 PM   #6 (permalink)
Forum Expert
 
FingersMcSteal's Avatar
 
Join Date: Mar 2006
Location: North East, England, UK
Posts: 827
Send a message via ICQ to FingersMcSteal Send a message via MSN to FingersMcSteal
Arrow

Ok, thanks... i kind of get it now.
__________________
We can be found on joinUO.com or listUO.com, come try us out.
FingersMcSteal is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5