Space Invaders Game Help C++

help with some aspects and ideas to implement a space invaders game

Page 1 of 1

6 Replies - 8869 Views - Last Post: 06 October 2010 - 08:11 AM Rate Topic: -----

#1 El3et   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 05-October 10

Space Invaders Game Help C++

Posted 05 October 2010 - 01:33 AM

Currently making a space invaders game using a game engine framework from my university called EGG. It tackles all the DirectX for me and even has collision detection. All I have to do is add the game code into the framework using c++.

At the moment I'm finding it hard to work out how to spawn multiple enemies, move them across the screen and drop down a line (The shooting and collision ill worry about later).

I'm pretty sure it'll involve creating a enemy class with derived classes for different types of enemies such as invaders and Motherships ect.

This think this is a great game to start with and i want to put my own mark on it and not have it as mirror image of the original.

If anybody can help or offer advice I would appreciate all of it.

Thanks in advance.

Is This A Good Question/Topic? 0
  • +

Replies To: Space Invaders Game Help C++

#2 stayscrisp   User is offline

  • フカユ
  • member icon

Reputation: 1040
  • View blog
  • Posts: 4,325
  • Joined: 14-February 08

Re: Space Invaders Game Help C++

Posted 05 October 2010 - 02:18 AM

Well the moving across and down part is just a matter of increasing or decreasing the invaders x position and once it reaches a certain point increment its y position by a set amount (possibly the invaders height).

A cool way to make it different from the original would be to have some invaders drop power ups that change your weapon load out for a short amount of time.
Was This Post Helpful? 0
  • +
  • -

#3 El3et   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 05-October 10

Re: Space Invaders Game Help C++

Posted 05 October 2010 - 02:41 AM

Thanks mate thats a great idea ill try that and I have tried X and Y co-ord manipulation but ill give it ago with the incrementation.

Really excited about gettin this game going :)

Any idea of how to spawn multiple enemies at once? Am I right with the master class- sub class theory.
Was This Post Helpful? 0
  • +
  • -

#4 stayscrisp   User is offline

  • フカユ
  • member icon

Reputation: 1040
  • View blog
  • Posts: 4,325
  • Joined: 14-February 08

Re: Space Invaders Game Help C++

Posted 05 October 2010 - 03:01 AM

To be honest one enemy class would be fine just as long as you can adjust the data such as speed and health and which sprite to use. Your enemy classes would be so similar that deriving them from a base class would be overkill.

Creating and drawing the enemies would be a case of a nested loop drawing in a grid pattern.
Was This Post Helpful? 0
  • +
  • -

#5 El3et   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 05-October 10

Re: Space Invaders Game Help C++

Posted 05 October 2010 - 03:38 AM

Ok thanks ill just use to one class. But the drawing part about the grid i didn't really understand sorry

Thanks
Was This Post Helpful? 0
  • +
  • -

#6 stayscrisp   User is offline

  • フカユ
  • member icon

Reputation: 1040
  • View blog
  • Posts: 4,325
  • Joined: 14-February 08

Re: Space Invaders Game Help C++

Posted 05 October 2010 - 04:47 AM

Sorry maybe I didn't explain very well, if you take a look at Space Invaders the enemies start in a sort of grid pattern and then all move along in a similar way. When you want to create these enemies in the correct place it would be extremely time consuming to have to individually set the enemy positions yourself.

Good luck with your project :)
Was This Post Helpful? 0
  • +
  • -

#7 Sergio Tapia   User is offline

  • D.I.C Lover
  • member icon

Reputation: 1258
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

Re: Space Invaders Game Help C++

Posted 06 October 2010 - 08:11 AM

I agree with using a single enemy class and just change the speed, armor and weapon type for it. You can even change the bullet sprite they fire creating new zany things.

If you have any other question we're glad to help.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1