% This procedure initializes the locations of all the coins in the ![]() % map: the array containing the coordinates of all the obstacles % example game, the locations were randomly assigned, but you can locate % This procedure initializes the locations of all the obstacles in the % This procedure prints the player's score neatly at the top of the screen % button was pressed-use this to smooth out the player movement % The number of milliseconds that have passed from the time the RUN % The number of coins remaining for the player to hit before winning % Player 1's score-increase it by 1 with every coin hit % The x and y velocity of player 1's ship (in pixels) % The x and y coordinates of the centre of player 1's ship (in pixels) % same amount of thrust every single time % that pressing the left or right arrow doesn't produce exactly the % The error-margin (in fractions of pixels) in the ship's thrust, so % The ship's thrust left or right (in fractions of pixels) when the % Player 1's color there is only one player at the moment % y (second-dimension index 2) coordinate of that coin's centre, % second dimension gives the x (second-dimension index 1) and % first dimension of the array for each coin onscreen the array's % The position of all the coins onscreen there is one index in the % and y (second-dimension index 2) coordinate of that obstacle's % the array's second dimension gives the x (second-dimension index 1) % in the first dimension of the array for each obstacle onscreen % The position of all the obstacles onscreen there is one index % This is just a two-dimensional game (up/down and left/right) % coins the player must capture before winning the game % The number of obstacles the player must avoid, and the number of % The size of the player and coins the player collects, in pixels % The size of the obstacles the ship can run into, in pixelsĬonst OBSTACLE_WIDTH : int := maxx div 10Ĭonst OBSTACLE_HEIGHT : int := maxy div 10 Setscreen ("graphics:600 600,offscreenonly") % monitor until View.Update is called)-this prevents flickering % when View.Update is called (keep track of all graphical changes off the % Set the screen to be 600 x 600 pixels, and to only repaint the monitor % up, so you you will begin falling in the opposite direction). % key will invert gravity (that is, make up become down and down become % You can move left and right using the arrow keys pressing any other % Capture all the coins to win while avoiding crashing into obstacles or Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) especially order of multidimensional arrays and procedures. I need to fill pre-made parts of the program by using provided procedure names.ĭescribe what you have tried to solve this problem It also should have boundaries and if it goes out of the you lose. ![]() Where the player (small square) can change gravity to all 4 directions (using arrow keys) and collect coins and avoid squares. I need to create game loosely based on Gravity Guy game. Posted: Wed 6:34 pm Post subject: Turing (Gravity Guy Game) HELP Wiki Blog Search Turing Chat Room Members
0 Comments
Leave a Reply. |