Solved

General question about game development in XNA concerning game entities class/framework

Posted on 2008-06-26
1
193 Views
Last Modified: 2013-12-16
I'm designing a 2D game in XNA just to get a feel for things. I know how to load textures and draw sprites and all that, but I'm now attempting to create a way for my game to keep track of it's entities. That would be things like the player's object, the NPC's, and little stuff like the bullets or equipment or whatever. Not so much the UI or different menus, just the actual elements of the gameplay itself.

I've seen several examples of how to do this, but what I'm curious to know is whether or not XNA already has some kind of class created for this purpose, or would I need to create a new class and set it up however I would like? I would rather use something XNA already has developed because it would tie into the rest of the framework, but if not then that's fine. I just don't want to start coding and then realize that I've got to change things up. Thanks for any help on this and keep up the good work experts!

I did notice the gamecomponents class, as well as the drawablecomponent class, but I believe those are more for things like adding UI elements, as well as things like a screen shot taker and FPS viewer, but not so much for a player's position on the screen and stuff like that. Thanks again for any ideas.
0
Comment
Question by:shady1024
1 Comment
 
LVL 11

Accepted Solution

by:
Babycorn-Starfish earned 100 total points
ID: 21881820
Hi,

as a starter, try looking at the sample game that comes with XNA, its a spaceship that shoots rocks from what i remember, see how they implemented the functionality you want.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now