Jump to content

View more

Image of the Day

Working on an auto spawn system. #gamedev #indiedev #screenshotsaturday https://t.co/Mm2kfekz7b
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Trouble conceptualizing power-ups

4: Adsense

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   

147
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?

#2 kd7tck   Members   

735
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.