Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Trouble conceptualizing power-ups


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 JDCAce   Members   -  Reputation: 146

Like
0Likes
Like

Posted 07 October 2012 - 01:04 AM

I've built a basic pong game, but I'd like to add powerups that will increase or decrease paddle size or ball speed, or do other stuff. However, I'm having trouble coming up with how to implement them in a object-oriented way. Should I make a Powerup class? How do I make different instances have different effects? Should I create a separate class for each type of Powerup?

Sponsor:

#2 kd7tck   Members   -  Reputation: 719

Like
0Likes
Like

Posted 07 October 2012 - 04:48 AM

Have the powerups tied to an entity system, the powerup would be a subtype of entity for game elements like the ball or paddle.

Google entity system for C#, to find out how to make one.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS