6 Replies - 861 Views - Last Post: 30 April 2013 - 08:14 AM Rate Topic: -----

#1 B0rn2c0de  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 11-April 13

enemy waves space shooter

Posted 30 April 2013 - 06:35 AM

ok so i created the player ship it moves around and fires bullets but how do i make enemy with some ai and use it to create enemy waves for different level
relaay stuck here guyz please help
using c++ visual studio 2008 with sfml
Is This A Good Question/Topic? 0
  • +

Replies To: enemy waves space shooter

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9573
  • View blog
  • Posts: 36,253
  • Joined: 12-June 08

Re: enemy waves space shooter

Posted 30 April 2013 - 07:12 AM

You built a user class, right? Then build an enemy class.. In the enemy class put what ever rudimentary AI you want in there to process on the update... draw as needed.. repeat.
Was This Post Helpful? 0
  • +
  • -

#3 B0rn2c0de  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 11-April 13

Re: enemy waves space shooter

Posted 30 April 2013 - 07:40 AM

I was thinking of creating a enemy class and then a vector to enemy which i would have to update in every wave
For example in the vector capacity is 20 and initial size is 0 enemy would spawn and pushed back into vector and they approach towards me in a specific pattern say a shm wave or say the enemies revolving in a circle with a bigger enemy in center .. And then for the second wave they change their pattern and speed how could i do that .. Or is there some other way
Also i am really new to game programming nd i am having real difficulty in structuring and organising my code .. Could u give some tips plzz ??
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9573
  • View blog
  • Posts: 36,253
  • Joined: 12-June 08

Re: enemy waves space shooter

Posted 30 April 2013 - 07:41 AM

I have zero idea how you structure you code now, your goals, aims, or what not. That's the joy of programming on your own - you set the boundaries and you apply the rules!

Sure.. what you said sounds moderately interesting - how about you go and try it?
Was This Post Helpful? 0
  • +
  • -

#5 B0rn2c0de  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 11-April 13

Re: enemy waves space shooter

Posted 30 April 2013 - 07:53 AM

Well i created the enemy class and the ai is basic they just move left or right relative to the users position and will fire one out of three chances .. Then in the main cpp i have the enemy vector and for 1st wave they just move down continuosly and thats it .. But just cant get on how to create these patterns and boss sequences .. Been thinking for a day couldnt find a solution
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9573
  • View blog
  • Posts: 36,253
  • Joined: 12-June 08

Re: enemy waves space shooter

Posted 30 April 2013 - 08:07 AM

Can you make three enemy objects - spaced out and horizontally aligned - and move them in unison left and right?

It's about placement and just thinking through their control.

Heck - draw it out on paper and determine the movement pattern.. I do that all the time.
Was This Post Helpful? 0
  • +
  • -

#7 B0rn2c0de  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 11-April 13

Re: enemy waves space shooter

Posted 30 April 2013 - 08:14 AM

Hmm ok ill give it a try once again :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1