Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12019


Ignore:
Timestamp:
May 30, 2018, 2:48:17 PM (7 years ago)
Author:
patricwi
Message:

Merged Hover

Location:
code/branches/PresentationFS18
Files:
4 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/PresentationFS18

  • code/branches/PresentationFS18/data/levels/Hover.oxw

    r11495 r12019  
     1<!--LevelInfo Zeilen 45-66 Waende Ebene 1
     2Zeilen 69-88 Waende Ebene 2
     3Zeilen 91-112 Waende Ebene 3
     4Zeilen 116-119 Roehre 1
     5Zeilen 121-124 Roehre 2
     6Zeilen 127-128 Rampe 1
     7Zeilen 130-131 Rampe 2
     8133 Boden 3
     9137-143 Boden 1
     10145-149 Boden 2
     11Probleme noch bei Rampen und Roehren
     12Gravity von spaceship ist in z Richtung darum alles um -90 grad um y-achse gedreht mit pitch-->
     13
    114<LevelInfo
    2  name = "Hover level"
     15 name = "Hover"
    316 description = "Level for Minigame Hover"
    417 tags = "minigame"
     
    1831?>
    1932
    20 <?lua
    21 MAZE_NUM_CELLS = 10
    22 MAZE_CELL_SIZE = 100
    23 MAZE_CELL_HEIGHT = 30
    24 MAZE_SIZE = MAZE_NUM_CELLS*MAZE_CELL_SIZE
    25 ?>
    26 
    2733<Level
    2834plugins = hover
     
    4046  >
    4147
    42     <StaticEntity position="0,0,0" collisionType="static">
     48
     49    <StaticEntity position="0,0,0" pitch="-90" collisionType="static">
     50
    4351      <attached>
    44         <HoverOrigin
    45           numCells="<?lua print(MAZE_NUM_CELLS)?>"
    46           cellSize="<?lua print(MAZE_CELL_SIZE)?>"
    47           cellHeight="<?lua print(MAZE_CELL_HEIGHT)?>"
    48         />
    49         <Model
    50           position="<?lua print(MAZE_SIZE/2)?>,-16,<?lua print(MAZE_SIZE/2)?>"
    51           scale3D="<?lua print(MAZE_SIZE/2)?>,16,<?lua print(MAZE_SIZE/2)?>"
    52           mesh="CubeGround.mesh"
    53         />
    54       </attached>
     52<Model mesh="Hover.mesh" position="-1020.544,397.472,2372.286" scale="200" />
     53</attached>
    5554      <collisionShapes>
    56         <BoxCollisionShape
    57           position="<?lua print(MAZE_SIZE/2)?>,<?lua print(MAZE_CELL_HEIGHT+1)?>,<?lua print(MAZE_SIZE/2)?>"
    58           halfExtents="<?lua print(MAZE_SIZE/2)?>,1,<?lua print(MAZE_SIZE/2)?>"
    59         />
    60         <BoxCollisionShape
    61           position="<?lua print(MAZE_SIZE/2)?>,-1,<?lua print(MAZE_SIZE/2)?>"
    62           halfExtents="<?lua print(MAZE_SIZE/2)?>,1,<?lua print(MAZE_SIZE/2)?>"
    63         />
    64       </collisionShapes>
     55
     56<BoxCollisionShape position="-1019.9999999999999, -1122.528, 2572.286" halfExtents="1600.0, 80.0, 200.0" />
     57<BoxCollisionShape position="500.0, 397.472, 2572.286" halfExtents="80.0, 1600.0, 200.0" />
     58<BoxCollisionShape position="-2544.0, 397.472, 2572.286" halfExtents="76.0, 1600.0, 200.0" />
     59<BoxCollisionShape position="-1100.0, 1997.4720000000002, 2572.286" halfExtents="1520.0, 0.0, 200.0" />
     60<BoxCollisionShape position="30.0, 1445.472, 2572.286" halfExtents="43.32, 400.0, 200.0" />
     61<BoxCollisionShape position="-514.0, 1386.472, 2572.286" halfExtents="500.0, 51.0, 200.0" />
     62<BoxCollisionShape position="130.0, 1105.472, 2572.286" halfExtents="143.32, 60.0, 200.0" />
     63<BoxCollisionShape position="-754.0, 790.472, 2572.286" halfExtents="60.0, 254.99999999999997, 200.0" />
     64<BoxCollisionShape position="-1568.0, 1210.112, 2572.286" halfExtents="900.0, 57.76, 200.0" />
     65<BoxCollisionShape position="-1144.0, 1473.872, 2572.286" halfExtents="475.0, 206.0, 200.0" />
     66<BoxCollisionShape position="-1855.9999999999998, 854.3519999999999, 2572.286" halfExtents="68.0, 302.0, 200.0" />
     67<BoxCollisionShape position="-2039.9999999999998, -642.528, 2572.286" halfExtents="71.333, 400.0, 200.0" />
     68<BoxCollisionShape position="20.0, -547.9580000000001, 2572.286" halfExtents="400.0, 61.370000000000005, 200.0" />
     69<BoxCollisionShape position="-320.0, -647.9580000000001, 2572.286" halfExtents="60.0, 161.37, 200.0" />
     70<BoxCollisionShape position="198.0, -186.588, 2572.286" halfExtents="51.0, 300.0, 200.0" />
     71<BoxCollisionShape position="20.0, 626.97, 2572.286" halfExtents="400.0, 64.132, 200.0" />
     72<BoxCollisionShape position="-172.0, 162.838, 2572.286" halfExtents="48.0, 400.0, 200.0" />
     73<BoxCollisionShape position="-638.0, -642.528, 2572.286" halfExtents="46.989999999999995, 400.0, 200.0" />
     74<BoxCollisionShape position="-1248.0, 23.472, 2572.286" halfExtents="62.5, 500.0, 200.0" />
     75<BoxCollisionShape position="-974.0, -69.50800000000001, 2572.286" halfExtents="711.881, 533.02, 200.0" />
     76<BoxCollisionShape position="-1620.0, -139.52800000000002, 2572.286" halfExtents="65.625, 463.0, 200.0" />
     77<BoxCollisionShape position="-1920.0, 263.47200000000004, 2572.286" halfExtents="365.625, 60.0, 200.0" />
     78
     79<BoxCollisionShape position="2310.0, 873.574, 1384.082" halfExtents="106.4, 2240.0, 200.0" />
     80<BoxCollisionShape position="176.0, 3001.574, 1384.082" halfExtents="2239.999, 112.00000000000001, 200.0" />
     81<BoxCollisionShape position="-1952.0, 873.574, 1384.082" halfExtents="112.0001, 2240.0, 200.0" />
     82<BoxCollisionShape position="176.0, -1260.026, 1384.082" halfExtents="2239.9991, 106.4, 200.0" />
     83<BoxCollisionShape position="834.0, 474.69, 1384.082" halfExtents="890.0, 150.0, 200.0" />
     84<BoxCollisionShape position="1634.0, 124.68999999999998, 1384.082" halfExtents="90.001, 500.0, 200.0" />
     85<BoxCollisionShape position="1604.0, -461.228, 1384.082" halfExtents="599.999, 85.918, 200.0" />
     86<BoxCollisionShape position="463.99999999999994, -955.626, 1384.082" halfExtents="121.295, 198.0, 200.0" />
     87<BoxCollisionShape position="1504.0, 1183.673, 1384.082" halfExtents="699.999, 89.785, 200.0" />
     88<BoxCollisionShape position="882.0, 1583.673, 1384.082" halfExtents="78.75, 489.785, 200.0" />
     89<BoxCollisionShape position="1538.0, 1873.458, 1384.082" halfExtents="105.001, 600.0, 200.0" />
     90<BoxCollisionShape position="1792.0000000000002, 2098.428, 1384.082" halfExtents="147.926, 66.182, 200.0" />
     91<BoxCollisionShape position="470.0, 2389.574, 1384.082" halfExtents="59.239, 500.0, 200.0" />
     92<BoxCollisionShape position="-88.0, 2495.674, 1384.082" halfExtents="500.0, 67.34400000000001, 200.0" />
     93<BoxCollisionShape position="-1030.0, 2489.574, 1384.082" halfExtents="90.04299999999999, 400.0, 200.0" />
     94<BoxCollisionShape position="-1040.0, 1161.106, 1384.082" halfExtents="800.0, 90.972, 200.0" />
     95<BoxCollisionShape position="-320.0, 1561.107, 1384.082" halfExtents="80.0, 490.97299999999996, 200.0" />
     96<BoxCollisionShape position="-1146.0, 770.134, 1384.082" halfExtents="99.0, 300.0, 200.0" />
     97<BoxCollisionShape position="-1282.0, -548.626, 1384.082" halfExtents="98.25, 605.0, 200.0" />
     98<BoxCollisionShape position="-584.0, -366.126, 1384.082" halfExtents="600.0, 112.5, 200.0" />
     99
     100<BoxCollisionShape position="0.0, 2799.765, 200.0" halfExtents="2900.0, 100.23500000000001, 200.0" />
     101<BoxCollisionShape position="-2814.0, 0.0, 200.0" halfExtents="85.244, 2900.0, 200.0" />
     102<BoxCollisionShape position="0.0, -2802.87, 200.0" halfExtents="2900.0, 97.13000000000001, 200.0" />
     103<BoxCollisionShape position="2800.0, 0.0, 200.0" halfExtents="99.593, 2900.0, 200.0" />
     104<BoxCollisionShape position="2148.0, 2099.53, 200.0" halfExtents="74.97399999999999, 600.0, 200.0" />
     105<BoxCollisionShape position="1636.0, 1919.53, 200.0" halfExtents="436.798, 0.0, 200.0" />
     106<BoxCollisionShape position="334.0, 2295.578, 200.0" halfExtents="78.569, 403.95200000000006, 200.0" />
     107<BoxCollisionShape position="-1430.0, 1940.614, 200.0" halfExtents="1300.0, 90.414, 200.0" />
     108<BoxCollisionShape position="-1108.0, 1150.2, 200.0" halfExtents="146.36499999999998, 700.0, 200.0" />
     109<BoxCollisionShape position="-2030.0, 694.365, 200.0" halfExtents="700.0, 83.68100000000001, 200.0" />
     110<BoxCollisionShape position="-1742.0000000000002, 945.4259999999999, 200.0" halfExtents="411.89099999999996, 334.742, 200.0" />
     111<BoxCollisionShape position="-2104.0, -1505.74, 200.0" halfExtents="83.16, 1200.0, 200.0" />
     112<BoxCollisionShape position="2100.0, -282.036, 200.0" halfExtents="600.0, 83.284, 200.0" />
     113<BoxCollisionShape position="1582.0, 373.88, 200.0" halfExtents="81.929, 572.6320000000001, 200.0" />
     114<BoxCollisionShape position="1952.0, 863.876, 200.0" halfExtents="288.122, 82.636, 200.0" />
     115<BoxCollisionShape position="1500.0, -1742.4410000000003, 200.0" halfExtents="1200.0, 62.007, 200.0" />
     116<BoxCollisionShape position="1800.0, -2031.4969999999998, 200.0" halfExtents="73.028, 227.049, 200.0" />
     117<BoxCollisionShape position="911.9999999999999, -180.435, 200.0" halfExtents="70.824, 1499.999, 200.0" />
     118<BoxCollisionShape position="396.0, 802.4839999999999, 200.0" halfExtents="444.908, 91.25, 200.0" />
     119<BoxCollisionShape position="-320.0, -765.87, 200.0" halfExtents="1160.473, 57.668, 200.0" />
     120<BoxCollisionShape position="-786.0, -1423.538, 200.0" halfExtents="102.982, 600.0, 200.0" />
     121<BoxCollisionShape position="294.0, -296.027, 200.0" halfExtents="78.744, 412.17499999999995, 200.0" />
     122
     123<BoxCollisionShape position="-822.0000000000001, 80.15, 1856.1" halfExtents="120.0, 10.0, 516.186" />
     124<BoxCollisionShape position="-712.0, 190.15, 1856.1" halfExtents="10.0, 120.0, 516.186" />
     125<BoxCollisionShape position="-822.0000000000001, 300.15, 1856.1" halfExtents="120.0, 10.0, 516.186" />
     126<BoxCollisionShape position="-932.0, 190.15, 1856.1" halfExtents="10.0, 120.0, 516.186" />
     127
     128<BoxCollisionShape position="-1472.0, 2300.828, 752.929" halfExtents="160.0, 10.0, 437.275" />
     129<BoxCollisionShape position="-1622.0, 2450.828, 752.929" halfExtents="10.001, 160.0, 437.275" />
     130<BoxCollisionShape position="-1472.0, 2600.828, 752.929" halfExtents="160.0, 10.0, 437.275" />
     131<BoxCollisionShape position="-1322.0, 2450.828, 752.929" halfExtents="10.0, 160.0, 437.275" />
     132
     133<BoxCollisionShape position="-401.99999999999994, 603.5120000000001, 1220.598" halfExtents="140.0, 140.0, 20.0" />
     134<BoxCollisionShape position="-401.99999999999994, -836.4879999999999, 564.133" halfExtents="140.0, 1300.0, 676.4649999999999" />
     135
     136<BoxCollisionShape position="1080.0, -802.528, 1792.286" halfExtents="799.999, 100.0, 620.0" />
     137<BoxCollisionShape position="180.0, -802.528, 2392.286" halfExtents="100.0, 100.0, 20.0" />
     138
     139<BoxCollisionShape position="0.0, 0.0, -9" halfExtents="2900.0, 2900.0, 1" />
     140
     141
     142
     143<BoxCollisionShape position="-822.0000000000001, 190.15, 2372.285" halfExtents="100.0, 100.0, 0.001" />
     144<BoxCollisionShape position="-1019.9999999999999, -1052.53, 2372.285" halfExtents="1600.0, 149.99800000000002, 0.001" />
     145<BoxCollisionShape position="-1270.0, -802.528, 2372.285" halfExtents="1350.0, 100.0, 0.001" />
     146<BoxCollisionShape position="-72.0, 647.472, 2372.285" halfExtents="650.7850000000001, 1350.0, 0.001" />
     147<BoxCollisionShape position="-1772.0, 647.472, 2372.285" halfExtents="849.215, 1350.0, 0.001" />
     148<BoxCollisionShape position="-822.0000000000001, -306.189, 2372.285" halfExtents="100.0, 396.339, 0.001" />
     149<BoxCollisionShape position="-822.0000000000001, 1143.811, 2372.285" halfExtents="100.0, 853.661, 0.001" />
     150
     151<BoxCollisionShape position="-1472.0, 2450.828, 1190.203" halfExtents="139.999, 140.0, 0.001" />
     152<BoxCollisionShape position="542.0, 612.201, 1190.203" halfExtents="1874.539, 1978.6269999999997, 0.001" />
     153<BoxCollisionShape position="401.99999999999994, 2852.201, 1190.203" halfExtents="2014.538, 261.373, 0.001" />
     154<BoxCollisionShape position="-1838.0, 873.574, 1190.203" halfExtents="225.461, 2240.0, 0.001" />
     155<BoxCollisionShape position="462.0, 1527.1699999999998, 1190.203" halfExtents="2074.538, 783.658, 0.001" />
     156
     157
     158       
     159 
     160
     161
     162</collisionShapes>
     163
    65164    </StaticEntity>
     165
     166
     167
     168
     169
     170
     171
     172
    66173
    67174    <Light
     
    75182    <SpawnPoint
    76183      team=0
    77       position="50,20,50"
    78       lookat="100,20,100"
     184      position="-600,1300,-200"
     185      lookat="-100,0,-1000"
    79186      spawnclass=HoverShip
    80187      pawndesign=spaceshiphover
     
    84191</Level>
    85192
     193
     194
     195       
     196     
  • code/branches/PresentationFS18/data/levels/templates/spaceshipHover.oxt

    r11495 r12019  
    1818   reloadwaittime      = 0.5
    1919
    20    primaryThrust     = 200
     20   primaryThrust     = 10000
    2121   auxilaryThrust    = 30
    2222   rotationThrust    = 25
     
    3333
    3434   collisionType     = "dynamic"
    35    mass              = 100
     35   mass              = 10
    3636   linearDamping     = 0.2
    3737   angularDamping    = 0.9999999
     
    7979   boostfactor    = 2
    8080
    81    speedfront     = 90
     81   speedfront     = 200
    8282   speedback      =  40
    8383   speedleftright =  40
  • code/branches/PresentationFS18/src/modules/hover/CMakeLists.txt

    r11495 r12019  
    22  Hover.cc
    33  HoverShip.cc
    4   HoverWall.cc
    54  HoverOrigin.cc
    65  HoverFlag.cc
    76  TimeHUD.cc
    87  FlagHUD.cc
    9   MazeGenerator.cc
    108)
    119
  • code/branches/PresentationFS18/src/modules/hover/Hover.cc

    r11495 r12019  
    3535
    3636#include "HoverOrigin.h"
    37 #include "HoverWall.h"
    3837#include "HoverFlag.h"
    39 #include "MazeGenerator.h"
    4038#include "core/CoreIncludes.h"
    4139
     
    5957        SUPER(Hover, tick, dt);
    6058
    61         if(this->firstTick_ && this->origin_)
    62         {
    63             this->firstTick_ = false;
    64 
    65             int numCells = this->origin_->getNumCells();
    66             int cellSize = this->origin_->getCellSize();
    67             int cellHeight = this->origin_->getCellHeight();
    68 
    69             MazeGenerator generator(numCells);
    70             generator.generateMaze();
    71             generator.renderMaze();
    72 
    73             int* levelcode = generator.getLevelcode();
    74 
    75             //Outer Walls
    76             for(int i = 0; i<numCells; i++){
    77                 (new HoverWall(origin_->getContext()))->init(0,        i+1,      cellSize, cellHeight, 1);
    78                 (new HoverWall(origin_->getContext()))->init(numCells, i+1,      cellSize, cellHeight, 1);
    79                 (new HoverWall(origin_->getContext()))->init(i+1,      0,        cellSize, cellHeight, 2);
    80                 (new HoverWall(origin_->getContext()))->init(i+1,      numCells, cellSize, cellHeight, 2);
    81             }
    82 
    83             //Generate inner Walls according to levelcode
    84             for(int y=0; y<numCells; y++){
    85                 for(int x=0; x<numCells; x++){
    86                     switch(levelcode[ y * numCells + x ]){
    87                         case 1: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 1);
    88                                 break;
    89                         case 3: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 1);
    90                         case 2: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 0);
    91                         default: break;
    92                     }
    93                 }   
    94             }
    95 
    96             //Generate 5 flags randomly
    97             for ( int i = 0; i < 5; i++ )
    98             {
    99                 HoverFlag* flag = new HoverFlag(origin_->getContext());
    100                 flag->init(rand()%numCells, rand()%numCells, cellSize);
    101                 flags_.push_back(flag);
    102             }
    103 
    104         }//firsttick end
    105 
    106         // Check if ship collided with one of the flags
    107         for ( unsigned int i = 0; i < flags_.size(); i++ ){
    108             if(flags_[i]->getCollided()){
    109                 flags_[i]->destroyLater();
    110                 flags_.erase (flags_.begin()+i);
    111             }
    112         }
    113         numberOfFlags_ = flags_.size();
    11459    }
    11560}
Note: See TracChangeset for help on using the changeset viewer.