1 /*============================================================================= 2 Blobby Volley 2 3 Copyright (C) 2006 Jonathan Sieber (jonathan_sieber@yahoo.de) 4 Copyright (C) 2006 Daniel Knobe (daniel-knobe@web.de) 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 =============================================================================*/ 20 21 #include <cmath> 22 23 // Difficulty Settings 24 const float BALL_SPEED_FACTOR = 1.00; 25 26 // Border Settings 27 const float LEFT_PLANE = 0; 28 const float RIGHT_PLANE = 800.0; 29 // These numbers should include the blobbys width, but in the original game 30 // the blobbys can go a bit into the walls too. 31 32 33 // Blobby Settings 34 const float BLOBBY_HEIGHT = 89; 35 //const float BLOBBY_WIDTH = 75; // what is the meaning of this value ??????? 36 const float BLOBBY_UPPER_SPHERE = 19; 37 const float BLOBBY_UPPER_RADIUS = 25; 38 const float BLOBBY_LOWER_SPHERE = 13; 39 const float BLOBBY_LOWER_RADIUS = 33; 40 41 // Ground Settings 42 const float GROUND_PLANE_HEIGHT_MAX = 500; 43 const float GROUND_PLANE_HEIGHT = GROUND_PLANE_HEIGHT_MAX - BLOBBY_HEIGHT / 2.0; 44 45 46 // This is exactly the half of the gravitation, i checked it in 47 // the original code 48 const float BLOBBY_MAX_JUMP_HEIGHT = GROUND_PLANE_HEIGHT - 206.375; // GROUND_Y - MAX_Y 49 const float BLOBBY_JUMP_ACCELERATION = 15.1; 50 51 // these values are calculated from the other two 52 const float GRAVITATION = BLOBBY_JUMP_ACCELERATION * BLOBBY_JUMP_ACCELERATION / BLOBBY_MAX_JUMP_HEIGHT; 53 const float BLOBBY_JUMP_BUFFER = GRAVITATION / 2; 54 55 56 // Ball Settings 57 const float BALL_RADIUS = 31.5; 58 const float BALL_GRAVITATION = 0.287 * BALL_SPEED_FACTOR * BALL_SPEED_FACTOR; 59 const float BALL_COLLISION_VELOCITY = std::sqrt(0.75 * RIGHT_PLANE * BALL_GRAVITATION); /// \todo work on a full-fledged physics spec 60 61 62 // Volley Ball Net 63 const float NET_POSITION_X = RIGHT_PLANE / 2; 64 const float NET_POSITION_Y = 438; 65 const float NET_RADIUS = 7; 66 //const float NET_SPHERE = 154; // what is the meaning of this value ??????? 67 const float NET_SPHERE_POSITION = 284; 68 69 const float STANDARD_BALL_HEIGHT = 269 + BALL_RADIUS; 70 71 const float BLOBBY_SPEED = 4.5; // BLOBBY_SPEED is necessary to determine the size of the input buffer 72 const float STANDARD_BALL_ANGULAR_VELOCITY = 0.1; 73