Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a simple game that has the user control a space ship that shoots small circular projectiles. However, I'm not sure how to render these. Right now I know how to make a LPDIREC3DSURFACE for a sprite and render it onto a LPDIRECT3DDEVICE9, but that's only for a single sprite. I assume I don't need to constantly create new surfaces and devices.

How should projectile generation/rendering be handled?
Thanks in advance.

share|improve this question

closed as not a real question by Le Comte du Merde-fou, Byte56, Josh Petrie, Laurent Couvidou, Ali.S Dec 9 '12 at 6:59

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

This question is more of a "how do I get started" question and as such is overly broad; you're better off finding a D3D9 tutorial and following that rather than asking here. – Le Comte du Merde-fou Oct 13 '12 at 23:48

You seem to be beginning with game development. For beginners I would always suggest starting with a game engine. Once you have few simple games under your belt, you will have much better idea about how 'expensive' certain operations are etc. and you can give a go at your own engine if you wish.

There are many way of rendering objects. But your question is flawed. You should be asking how do I render things with acceptable speed. Once you get to several hundred objects, unless you have properly setup your rendering pipeline, you will quickly hit performance bottleneck. The idea behind performance is to queue as many operations as possible and then hand them over to the GPU for rendering. So for practice, it does not matter what you render, chose your projectiles for example, but then setup a test where you render 5000 of them, and make sure you can get a good framerate (60fps minimum). Unless you can hit this milestone, there is no point coding other stuff. Once this works, then instead of rendering 5000 identical images, use the same principle but render what you want.

Once again, you see how this is getting complicated quickly. I suggest you use a game engine like Orge, Allegro etc.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.