Particle System (based on ParticleSystem sample), using c/c++

Question

Functional Requirements

  • The program will have a display size of 640x480.
  • A player object with a bitmap that looks like a rocket is displayed (bitmap background must be transparent).
  • The player object has 4 versions of the rocket image for 4 directions and is controlled by keyboard. The rocket moves constantly. Player can only change direction.
  • An array of particles follows the rocket in proper direction. They will be a constant stream of particles coming out at the end of rocket and going backward a little before they disappear. Every particle that disappears, will appear again at the end of rocket to create the constant stream. Direction of this stream is always the opposite of rocket’s direction.
  • All particles have a small random movement in addition to base movement described above.

Implementation Requirements: Use arrays for particles and structures for particles and player. You can use one GameObject structure, or define two for Player and Particle

Evaluation

  • Rocket movement and shape change                         1+1
  • Particle movement and direction                               1+1
  • General program structure and coding                       0.5
  • Objective/Requirements/Algorithm                           0.5
  • consider 4 diagonal directions 2

HERE, THE GAMEOBJECT STRUCTURE GIVEN IS:

struct GameObject {    int x;    int y;

   ALLEGRO_BITMAP* bmp;

   int visible; //0 to 100 percent };

//draw an object void DrawObject(GameObject obj); //calculate distance between two points float Distance(int x1, int y1, int x2, int y2); //calculate distance between two objects float Distance(GameObject o1, GameObject o2);

Details
Purchase An Answer Below

Have a similar question?