1 / 5

Rollerslam Environment Model

Explore the Rollerslam game environment, focusing on the implementation of the Visitor design pattern. This robust system includes interfaces for various game objects, such as Worlds, Players, Balls, and Animated Objects. The OutTrack dimensions are set at 188,000 width by 138,000 height. Each game object can accept a visitor, allowing for dynamic interactions, including collision detection and rendering. The objective of the project is to design an extensible framework where new game objects and behaviors can easily be integrated without modifying existing code.

louvain
Download Presentation

Rollerslam Environment Model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Rollerslam Environment Model

  2. <<interface>> Visitor + visit (obj : World) + visit (obj : WorldObject) + visit (obj : AnimatedObject) + visit (obj : Ball) + visit (obj : OutTrack) + visit (obj : Player) <<enumeration>> PlayerTeam TEAM_A TEAM_B OutTrack + WIDTH : Integer = 188000 + HEIGHT : Integer = 138000 + Create ( ) + accpet (visitor : Visitor) Ball + Create ( ) + Create (psx : Integer, psy : Integer) + accpet (visitor : Visitor) <<interface>> Visitable + accept (visitor : Visitor) World + outTrack : OutTrack + ball : Ball + playersA : Player[2] + playersB : Player[2] + create() + accept (visitor : Visitor) AnimatedObject + vx : Integer = 0 + vy : Integer = 0 + ax : Integer = 0 + ay : Integer = 0 + Create ( ) + Create (psx : Integer, psy : Integer, pwidth : Integer, pheight : Integer) + accpet (visitor : Visitor) WorldObject + sx : Integer = 0 + sy : Integer = 0 + width : Integer = 0 + height : Integer = 0 + Create ( ) + Create (psx : Integer, psy : Integer, pwidth : Integer, pheight : Integer) + collidesWith (obj : WorldObject) : Boolean + accpet (visitor : Visitor) Player + team : PlayerTeam + WIDTH : Integer = 1000; + HEIGHT : Integer = 1000; + Create ( ) + Create (psx : Integer, psy : Integer, t : PlayerTeam) + accpet (visitor : Visitor)

  3. WorldObject + sx : Integer = 0 + sy : Integer = 0 + width : Integer = 0 + height : Integer = 0 + collidesWith (obj : WorldObject) : Boolean + accept (visitor : Visitor) <<enumeration>> PlayerTeam TEAM_A TEAM_B <<interface>> Visitable + accept (visitor : Visitor) Ball + accept (visitor : Visitor) AnimatedObject + vx : Integer = 0 + vy : Integer = 0 + ax : Integer = 0 + ay : Integer = 0 + accept (visitor : Visitor) OutTrack + WIDTH : Integer = 188000 {readonly} + HEIGHT : Integer = 138000 {readonly} + accept (visitor : Visitor) Goal + WIDTH : Integer = ??? {readonly} + HEIGHT : Integer = ??? {readonly} + accept (visitor : Visitor) Basket + WIDTH : Integer = ??? {readonly} + HEIGHT : Integer = ??? {readonly} + accept (visitor : Visitor) Player + team : PlayerTeam + WIDTH : Integer = 1000 {readonly} + HEIGHT : Integer = 1000 {readonly} + accept (visitor : Visitor)

  4. <<interface>> Visitable + accept (visitor : Visitor) World + accept (visitor : Visitor) OutTrack 1 +outTrack Player 1 1 +playersA 20 1 1 20 +ball 1 1 +playersB Ball 1 +goalA 1 Basket Goal 1 3 1 +goalB +baskets

  5. :)

More Related