HOME
School
Java Games (CSIS 4491)
KSU Webpage Setup
KSU Email Forwarding
Shell Extension Projects
Other Projects
Tech. Reference
Links
Codeproject
Google
HTML Tutorial
MSFN (forums)
DonationCoder
LifeHacker
About
|
CSIS 4491 - Game Programming in Java
updated: Mar 13th, 2007:
Lab 3 - Moving Sprites with JavaBeans
This lab builds on the elements from Lab 2. However, this time the sprites are now drawn on a JPanel contained by the applet as opposed to directly onto the JApplet's contentPane (as the previous lab did). The sprite movement patterns, which are detailed below, are implemented using JavaBeans. All of the sprites that define boundaries use strict enforcement of the boundaries. In other words, the shape can not pass even small (and often unnoticable) distances over the border during updates.
Motion Patterns
- Bouncing (Green Rectangle) - This motion pattern simply bounces the sprite off the edges of the screen.
- Boogie (Red Circle) - This pattern has the sprite 'dance' up, right, left, then back down; making it do a boogie.
- Waltz (Blue Rectangle) - This motion pattern makes the sprite 'dance' around in a triangle.
- X-Move (Yellow Circle) - This pattern has the sprite move along the x-axis and wrap-around the screen after it disappears past an edge.
- Y-Move (Magenta Circle) - Same as above, but along the y-axis instead.
|
|