C Board  

Go Back   C Board > General Programming Boards > Game Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 06-11-2005, 02:47 PM   #1
Registered User
 
Queatrix's Avatar
 
Join Date: Apr 2005
Posts: 1,342
Allowing theplayer to shoot multi bullets.

I am able to make a man or ship (that you control.) shoot in a direction of you'r choice, but I can't seem to figure out how to make a man or ship shoot more than one shot at a time. Any help?
Queatrix is offline   Reply With Quote
Old 06-11-2005, 03:17 PM   #2
Deo
Registered User
 
Join Date: May 2005
Posts: 73
I have a t.v. I can turn it on and off.. but I can't seem to change the channel.... Any help?

err.. I guess what I'm trying to say is... can u supply some more info as to your exact problem.. I would think making a man or ship have more than one shot at a time would be something rather easy to implement..
Deo is offline   Reply With Quote
Old 06-11-2005, 05:06 PM   #3
 
Join Date: May 2005
Posts: 970
As mentioned this really is a trivial problem. But, if you show some source code or an attempt to solve the problem I'd gladly give my insight into the various methods I have tried.
BobMcGee123 is offline   Reply With Quote
Old 06-11-2005, 07:21 PM   #4
Confused
 
Magos's Avatar
 
Join Date: Sep 2001
Location: Sweden
Posts: 3,125
Make a list of objects instead of a single static object.
__________________
MagosX.com

Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
Magos is offline   Reply With Quote
Old 06-11-2005, 08:57 PM   #5
Super Moderator
 
Bubba's Avatar
 
Join Date: Aug 2001
Posts: 7,819
Umm...

  • Array
  • Linked list
  • Vector

Code:
struct point2D
{
  float x,y;
};

struct Bullet
{
  point2D Position;
  point2D Vector;
  float Speed;
};

#include <vector.h>

std::vector<Bullet> BulletsVector;
Bullet BulletsArray[100];
...
...
__________________
If you aim at everything you will hit something but you won't know what it is.
Bubba is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump


All times are GMT -6. The time now is 09:33 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22