TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
David
NA
1
14.3k
Creating and Managing game objects?
Jan 17 2011 4:08 PM
Hello everyone. I've been desperately trying to learn and understand this missing link to really get my game development started and I haven't found an ounce of help or useful information. I'm using XNA 3.1 and i'm trying to start off by first making a flat level of blocks with an HP value. So far, this is the code in my head (in simple format):
class level
{
createlevel()
createboundingbox()
int levelheight
int levelwidth
int leveldepth
}
level.createlevel()
{
for (int y = 0; y < levelheight; y++)
for (int x = 0; x < levelwidth; x++)
for (int z = 0; z < leveldepth; z++)
[create vertices for each box using a vertexpositionnormaltexture list]
[after a box is created, create a bounding box for this block and assign it an HP value using a boundingbox list that has an int value by calling it's code with createboundingbox() (or is this not allowed? i mean calling a class's method inside one of it's methods?)]
}
Using this, would I be able to do a mouse pointer ray collision test that I could have a HUD display information for?
How do I setup the bounding box list properly so it's data can be called to the HUD via the collision test? How do I access the right bounding box when I perform the ray collision test? Can I even create a bounding box list using new Vector3(new Vector3(x1,y1,z1), new Vector3(x2,y2,z2), new int)?
I know i'm just missing this one thing to really get started, and I'm really trying to learn :(
If it helps with your answer, I'm basically just trying to make a block, and when I click on it, it will tell me how much HP it has. I want to do this thousands of times with random HP values. Thanks.
Reply
Answers (
0
)
Talk about how to implememt the spells(skills) in the MMO game on the server-side?
Need help with text file import in C# xna