Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    12
  • comments
    6
  • views
    6198

Sprites and Entities

Sign in to follow this  
caseyd

213 views

I am working on a set of classes to handle Sprites and Entities but I am having trouble separating the different parts and I believe that I am now referring to the same thing by two different names. What my original idea was to have a class that contains only the image characteristics and another to contain the location and movement characteristics. My Sprite class was built to handle only the actual Image that is loaded. I extend this to AnimatedSprite that adds in Animation controls. This is where I am confusing every thing. I am not sure of the best way to incorporate these things.

I want to have objects that are Animated and some that aren't. I also want to be able to create different types of these "entities" so I can change behaviors. For example if I was creating a Breakout clone but wanted different bricks to have different behaviors when hit by the ball ( animations, explode sequences etc..) I could simply create a new class for that brick that extends a base class. While typing this up I am realizing that part of my problem is I don't have clear definitions of what each of these things are. It was my original understanding that a Sprite is a graphic, animated or not, that can be moved or moves around the screen. Perhaps it would be better to simply include the location and movement data in the Sprite class? I am going to spend some time working out different design schemes and will hopefully have a working one today so I can move on to other things.

Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!