Game Editor
GameContainer
- Savable, Loadable
- (Nameable) this can be in the Game Window Sprite
- Contains
- Game Window (a Sprite, JPanel, No Collision), thus it can be changed the same way as every other sprite, the GUI is specific to this sprite though.
- The Window should be drawn first
- This may have to share the list of Sprites with the container
- Sprites List (current sprites in the game)
- Menu? (such as a Button Control Panel or Menu Bar to be appended to the outside of the Main Game Window)
- Said Menu could be created with Panels and Buttons that are types of objects.
- Framerate
- Game Window (a Sprite, JPanel, No Collision), thus it can be changed the same way as every other sprite, the GUI is specific to this sprite though.
Sprite
- Initialization Properties
- Initial ShapeProperties
- ShapeProperties (Position, Velocity, Rotation, Color, Scale)
- Velocity, Shape, Name, doCollision (bool), CollidesWith (list of types to collide with), SpriteType (User-created to classify certain types of sprites)
- Rotational Velocity?
- Events, special commands to execute the desired command(s)
- Use macro command?
- When an OnCollision event is added to the sprite, it should be separated from the other events as collision is inside the sprite and other input is outside of the sprite
- If there is to be distinction between object types, the OnCollision event *must* be passed the type of object that it is colliding with
- There can be multiple OnCollision events in this case, they could be stored in a MacroCommand
- Possible additions for later
- Give Objects Health, have SetHealth, ChangeHealth commands, or add a health object for automatic destruction
SpriteType
- Uses NameTable for unique naming certainty.
- Holds a Name for the type
- On first creation, save default sprite for the type, each time the user wants to use this type, ask if they want the default sprite
- also allow for over-write of default sprite
- use Copy-Constructor for Sprite
Shape - abstract
Shares ShapeProperties with the Sprite containing it.
ShapeProperties should only need to hold Position, Velocity, Rotation, and Color, and Scale
Have a collision method that runs through the list of points, does collision.
- Image
- It's an image, has a square bounding box probably
- Polygon (any polygon, we could eventually implement polygon editor for user to create their own polygons)
- Circle
- it's a circle, acts like a many-sided poly?
- Rectangle
- the thing with four sides

- the thing with four sides
- Circle
- Button

- Panel
putting these in here makes it possible to have moving buttons, moving panels.
Commands
- Sprite - in order of importance
- AddSprite
- RemoveSprite
MoveSpriteTransformSprite (should also do rotation)- SetSpriteVelocity
- SetSpriteRotationalVelocity?
- SetSpriteColor
- SetSpriteShape
- SetSpriteType
- Events - in order of importance, probably...?
- OnKeyPress
- OnMouseMotion
- OnMouseDragged
- OnCollision (can be sprite type based?)
- OnClicked (mouse click over hitbox for buttons)
- General
- Save?
- Load?
- TogglePause?
- Reset?
- GUI
- SelectSprite
- SetProperties
- SelectPoint (for polygon editing)
- Shape
- MovePoint (takes point index, new position, for altering polygons)
- SetScale (changes scale of objects)
NameTable - singleton
- Class to keep track of used names, so there are no duplicate names of sprites.
- List of names for each thing that will be nameable
- SpriteTypes
- Sprites
- Shapes (for saving user created polys)
Add Comment