Humiliating loss screen and promted to retry. If they are hit with a bubble and they have lost their last life, the player is shamed with a If the player has more than 0 lives left, If a bubble and the player intersect, the display must reset to it's starting coordinates. This proceess is repeated until the level is cleared or Removed from the bubble list and replaced with two bubbles of one lesser size. If a bubble greater than that of 'size 1' is popped, that bubble is IfĪ bubble of 'size 1' is popped, it is removed from the bubble list. The smallest bubbles, of defined 'size 1' are the smallest bubbles that can exist in this game. If the bubble is not the last bubble in the list, we then must The level has been cleared and the player may advance to the next level. If this bubble is the last bubble in our defined bubble-list list, If a bubble and the hook intersect, there are 2 possible outcomes. These bounds that intesect are determined by the size of each bubble, the bounded box of the player, and the dimensions of the Player and the position of all bubbles is checked every cycle because if the player and a bubble intersect, the player should lose a Update cycle because if the hook and a bubble intersect, the bubble should either split into two or disappear. The position of the hook and all bubbles is checked every The position of certain objects are checked every time the world updates. Updated, and by analyzing where each object is we are able to tell what is going on and how to react to key situations. Every time the world that weĬreated gets update, it updates our 3 object classes: the player, the balls, and the hook. This is because we are using the universe libraryĪnd in order to animate our game, we had to pass objects into the library functions that allow us to do so. Architecture DiagramĪs noted in the Architecture diagram, our propgram starts through updating each frame. We know we are successful since we were able to recreate the first level in "Bubble Trouble". There is no way to go back to a previous level without restarting the game, though. There is a replay button that allows the user to play the level again We now have a playable demo of the first five levels desgined. We were attempting to emulate the classic flash game 'Bubble trouble 2'įrom scratch in order to understand and reinforce the concepts learned in this class in an applicative way. We did not use data sets or other source materials. Not differ when the same action is performed. When the hook is deployed,Ī bubble is popped, or the player is hit by a bubble a specific sound that is associated with each action is prodcued. Our project generated sound, because the original flash game produces sounds as well. (foldl cons (posn-bubble-list bubble-list) (foldl ( lambda (bubble rest-list) (cons (bubble 'draw) rest-list)) '() my-bubbles)) (list (p1-sprite) (draw-chain) (hook-sprite) (draw-HUD) (num-list)))) (foldl cons (draw-bubble-list bubble-list) (foldl ( lambda (bubble rest-list) (cons (bubble 'my-posn) rest-list)) '() my-bubbles)) Filterįilter was used to delete "popped" bubbles on the list by checking a flag that was set within each bubble object during hook-bubble collision detection. if the left arrow key is held, the player will move 10 units to the left (set! x (- x 10)). state modification will be used within each object to update the location, for example. To check whether collisions occurred (either hook hits bubble, or bubble hits player) we mapped over the objects x/y positions. To manipulate these objects, we used data abstraction to update the x/y variables, and filter to delete objects from the universe. We used object orientation to hold our "bubble" objects, "player" object, "hook" object that will be shot from the player to pop bubbles. We hope to learn how to apply some of the concepts we learned in class to a project that has a clear result of what we want to see in the end. It's interesting to us because we both played it in elementary/middle school so it's nostalgic. It's interesting because we learn how to use racket libraries and implement and manipulate different objects with a functional language. Our project is a racket remake of the flash game "Bubble Trouble".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |