Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
#include "Headers/TenisScene.h"
#include "Headers/TenisSceneAISceneImpl.h"

#include "AI/ActionInterface/Headers/AITeam.h"
#include "Geometry/Shapes/Headers/Predefined/Sphere3D.h"
#include "Geometry/Shapes/Headers/Predefined/Quad3D.h"
#include "Rendering/RenderPass/Headers/RenderQueue.h"
#include "Dynamics/Entities/Units/Headers/NPC.h"
#include "Geometry/Material/Headers/Material.h"
#include "Managers/Headers/SceneManager.h"
#include "Core/Math/Headers/Transform.h"
#include "Managers/Headers/AIManager.h"
#include "GUI/Headers/GUIButton.h"
#include "GUI/Headers/GUI.h"

namespace Divide {

REGISTER_SCENE(TenisScene);

static std::atomic_bool s_gameStarted;

void TenisScene::preRender(){
    vec2<F32> _sunAngle = vec2<F32>(0.0f, RADIANS(45.0f));
    _sunvector = vec3<F32>(	-cosf(_sunAngle.x) * sinf(_sunAngle.y),
                            -cosf(_sunAngle.y),
                            -sinf(_sunAngle.x) * sinf(_sunAngle.y));

    _sun->setDirection(_sunvector);
	_currentSky->getNode<Sky>()->setSunProperties(_sunvector, _sun->getDiffuseColor());
}

void TenisScene::processGUI(const U64 deltaTime){
    D32 FpsDisplay = 0.7;
    if (_guiTimers[0] >= FpsDisplay){
        _GUI->modifyText("fpsDisplay", "FPS: %3.0f. FrameTime: %3.1f", 
                         ApplicationTimer::getInstance().getFps(), ApplicationTimer::getInstance().getFrameTime());
        _GUI->modifyText("RenderBinCount", "Number of items in Render Bin: %d", GFX_RENDER_BIN_SIZE);
        _guiTimers[0] = 0.0;
    }
    Scene::processGUI(deltaTime);
}

void TenisScene::processTasks(const U64 deltaTime){


    Scene::processTasks(deltaTime);

    checkCollisions();

    if(s_gameStarted && !_gamePlaying && _scoreTeam1 < 10 && _scoreTeam2 < 10)
        startGame();

    if(_scoreTeam1 == 10 || _scoreTeam2 == 10){
        s_gameStarted = false;
        _GUI->modifyText("Message", "Team %d won!", _scoreTeam1 == 10 ? 1 : 2);
    }
}

void TenisScene::resetGame(){
    removeTask(_gameGUID);
    _collisionPlayer1 = false;
    _collisionPlayer2 = false;
    _collisionPlayer3 = false;
    _collisionPlayer4 = false;
    _collisionNet = false;
    _collisionFloor = false;
    _gamePlaying = true;
    _upwardsDirection = true;
    _touchedTerrainTeam1 = false;
    _touchedTerrainTeam2 = false;
    _applySideImpulse = false;
    _sideImpulseFactor = 0;
    WriteLock w_lock(_gameLock);
    _ballSGN->getComponent<PhysicsComponent>()->setPosition(vec3<F32>((random(0,10) >= 5) ? 3.0f : -3.0f, 
                                                                      0.2f,
                                                                      _lostTeam1 ? -7.0f : 7.0f));
    _directionTeam1ToTeam2 = !_lostTeam1;
    _lostTeam1 = false;
    s_gameStarted = true;
}

void TenisScene::startGame(){
    resetGame();
    Kernel* kernel = Application::getInstance().getKernel();
	Task_ptr newGame(kernel->AddTask(getMsToUs(15), 0, DELEGATE_BIND(&TenisScene::playGame, this, rand() % 5, TYPE_INTEGER)));
	registerTask(newGame);
	newGame->startTask();
    _gameGUID = newGame->getGUID();
}

void TenisScene::checkCollisions(){
    SceneGraphNode* Player1 = _aiPlayer1->getUnitRef()->getBoundNode();
    SceneGraphNode* Player2 = _aiPlayer2->getUnitRef()->getBoundNode();
    SceneGraphNode* Player3 = _aiPlayer3->getUnitRef()->getBoundNode();
    SceneGraphNode* Player4 = _aiPlayer4->getUnitRef()->getBoundNode();
    BoundingBox ballBB      = _ballSGN->getBoundingBoxConst();
    BoundingBox floorBB     = _floor->getBoundingBoxConst();
    WriteLock w_lock(_gameLock);
    _collisionPlayer1 = ballBB.Collision(Player1->getBoundingBox());
    _collisionPlayer2 = ballBB.Collision(Player2->getBoundingBox());
    _collisionPlayer3 = ballBB.Collision(Player3->getBoundingBox());
    _collisionPlayer4 = ballBB.Collision(Player4->getBoundingBox());
    _collisionNet     = ballBB.Collision(_net->getBoundingBox());
    _collisionFloor   = floorBB.Collision(ballBB);
}

//Team 1: Player1 + Player2
//Team 2: Player3 + Player4
void TenisScene::playGame(cdiggins::any a, CallbackParam b){
    bool updated = false;
    stringImpl message;
    if(!_gamePlaying){
        return;
    }

    UpgradableReadLock ur_lock(_gameLock);
    //Shortcut to the scene graph nodes containing our agents
    SceneGraphNode* Player1 = _aiPlayer1->getUnitRef()->getBoundNode();
    SceneGraphNode* Player2 = _aiPlayer2->getUnitRef()->getBoundNode();
    SceneGraphNode* Player3 = _aiPlayer3->getUnitRef()->getBoundNode();
    SceneGraphNode* Player4 = _aiPlayer4->getUnitRef()->getBoundNode();
    //Store by copy (thread-safe) current ball position (getPosition()) should be threadsafe
    vec3<F32> netPosition  = _net->getComponent<PhysicsComponent>()->getPosition();
    vec3<F32> ballPosition = _ballSGN->getComponent<PhysicsComponent>()->getPosition();
    vec3<F32> player1Pos   = Player1->getComponent<PhysicsComponent>()->getPosition();
    vec3<F32> player2Pos   = Player2->getComponent<PhysicsComponent>()->getPosition();
    vec3<F32> player3Pos   = Player3->getComponent<PhysicsComponent>()->getPosition();
    vec3<F32> player4Pos   = Player4->getComponent<PhysicsComponent>()->getPosition();
    vec3<F32> netBBMax     = _net->getBoundingBox().getMax();
    vec3<F32> netBBMin     = _net->getBoundingBox().getMin();

    UpgradeToWriteLock uw_lock(ur_lock);
    //Is the ball traveling from team 1 to team 2?
    _directionTeam1ToTeam2 ? ballPosition.z -= 0.123f : ballPosition.z += 0.123f;
    //Is the ball traveling upwards or is it falling?
    _upwardsDirection ? ballPosition.y += 0.066f : ballPosition.y -= 0.066f;
    //In case of a side drift, update accordingly
    if(_applySideImpulse) ballPosition.x += _sideImpulseFactor;

    //After we finish our computations, apply the new transform
    //setPosition/getPosition should be thread-safe
    _ballSGN->getComponent<PhysicsComponent>()->setPosition(ballPosition);
    //Add a spin to the ball just for fun ...
    _ballSGN->getComponent<PhysicsComponent>()->rotate(vec3<F32>(ballPosition.z,1,1));

    //----------------------COLLISIONS------------------------------//
    //z = depth. Descending to the horizon

    if(_collisionFloor){
        if(ballPosition.z > netPosition.z){
            _touchedTerrainTeam1 = true;
            _touchedTerrainTeam2 = false;
        }else{
            _touchedTerrainTeam1 = false;
            _touchedTerrainTeam2 = true;
        }
        _upwardsDirection = true;
    }

    //Where does the Kinetic  energy of the ball run out?
    if(ballPosition.y > 3.5) _upwardsDirection = false;

    //Did we hit a player?

    bool collisionTeam1 = _collisionPlayer1 || _collisionPlayer2;
    bool collisionTeam2 = _collisionPlayer3 || _collisionPlayer4;

    if(collisionTeam1 || collisionTeam2){
        //Something went very wrong. Very.
        //assert(collisionTeam1 != collisionTeam2);
        if(collisionTeam1 == collisionTeam2){
            collisionTeam1 = !_directionTeam1ToTeam2;
            collisionTeam2 = !collisionTeam1;
            D_ERROR_FN("COLLISION ERROR");
        }

        F32 sideDrift = 0;

        if(collisionTeam1){
            _collisionPlayer1 ? sideDrift = player1Pos.x : sideDrift = player2Pos.x;
        }else if(collisionTeam2){
            _collisionPlayer3 ? sideDrift = player3Pos.x : sideDrift = player4Pos.x;
        }

        _sideImpulseFactor = (ballPosition.x - sideDrift);
        _applySideImpulse = !IS_ZERO(_sideImpulseFactor);
        if(_applySideImpulse) _sideImpulseFactor *= 0.025f;

        _directionTeam1ToTeam2 = collisionTeam1;
    }

    //-----------------VALIDATING THE RESULTS----------------------//
    //Which team won?
    if(ballPosition.z >= player1Pos.z && ballPosition.z >= player2Pos.z){
        _lostTeam1 = true;
        updated = true;
    }

    if(ballPosition.z <= player3Pos.z &&  ballPosition.z <= player4Pos.z){
        _lostTeam1 = false;
        updated = true;
    }
    //Which team kicked the ball in the net?
    if(_collisionNet){
        if(ballPosition.y < netBBMax.y - 0.25){
            if(_directionTeam1ToTeam2){
                _lostTeam1 = true;
            }else{
                _lostTeam1 = false;
            }
            updated = true;
        }
    }

    if(ballPosition.x + 0.5f < netBBMin.x || ballPosition.x + 0.5f > netBBMax.x){
        //If we hit the ball and it touched the opposing team's terrain
        //Or if the opposing team hit the ball but it didn't land in our terrain
        if(_collisionFloor){
            if((_touchedTerrainTeam2 && _directionTeam1ToTeam2) || (!_directionTeam1ToTeam2 && !_touchedTerrainTeam1)){
                _lostTeam1 = false;
            }else{
                _lostTeam1 = true;
            }
            updated = true;
        }
    }

    //-----------------DISPLAY RESULTS---------------------//
    if(updated){
        if(_lostTeam1)	{
            message = "Team 2 scored!";
            _scoreTeam2++;
        }else{
            message = "Team 1 scored!";
            _scoreTeam1++;
        }

        _GUI->modifyText("Team1Score","Team 1 Score: %d",_scoreTeam1);
        _GUI->modifyText("Team2Score","Team 2 Score: %d",_scoreTeam2);
        _GUI->modifyText("Message",(char*)message.c_str());
        _gamePlaying = false;
    }
}

void TenisScene::processInput(const U64 deltaTime){
}

bool TenisScene::load(const stringImpl& name, CameraManager* const cameraMgr, GUI* const gui){
    s_gameStarted = false;
    //Load scene resources
    bool loadState = SCENE_LOAD(name,cameraMgr,gui,true,true);

    //Add a light
	_sun = addLight(LIGHT_TYPE_DIRECTIONAL)->getNode<DirectionalLight>();
	_currentSky = addSky(CreateResource<Sky>(ResourceDescriptor("Default Sky")));

//	ResourceDescriptor tempLight1("Light omni");
//	tempLight1.setEnumValue(LIGHT_TYPE_POINT);
//	light1 = CreateResource<Light>(tempLight1);
//	addLight(light1);

    //Position camera
    //renderState().getCamera().setEye(vec3<F32>(14,5.5f,11.5f));
    //renderState().getCamera().setRotation(10/*yaw*/,-45/*pitch*/);

    //------------------------ Load up game elements -----------------------------///
    _net = _sceneGraph->findNode("Net");
    //for(SceneGraphNode::NodeChildren::value_type& it : _net->getChildren()){
        //it.second->setReceivesShadows(false);
    //}
    _floor = _sceneGraph->findNode("Floor");
    _floor->getComponent<RenderingComponent>()->castsShadows(false);

    AI::AIManager::getInstance().pauseUpdate(false);
    return loadState;
}

bool TenisScene::initializeAI(bool continueOnErrors){
    bool state = false;
    SceneGraphNode* player[4];
    //----------------------------ARTIFICIAL INTELLIGENCE------------------------------//
    player[0] = _sceneGraph->findNode("Player1");
    player[1] = _sceneGraph->findNode("Player2");
    player[2] = _sceneGraph->findNode("Player3");
    player[3] = _sceneGraph->findNode("Player4");
    player[0]->setSelectable(true);
    player[1]->setSelectable(true);
    player[2]->setSelectable(true);
    player[3]->setSelectable(true);

    _aiPlayer1 = MemoryManager_NEW AI::AIEntity(player[0]->getComponent<PhysicsComponent>()->getPosition(), "Player1");
    _aiPlayer2 = MemoryManager_NEW AI::AIEntity(player[1]->getComponent<PhysicsComponent>()->getPosition(), "Player2");
    _aiPlayer3 = MemoryManager_NEW AI::AIEntity(player[2]->getComponent<PhysicsComponent>()->getPosition(), "Player3");
    _aiPlayer4 = MemoryManager_NEW AI::AIEntity(player[3]->getComponent<PhysicsComponent>()->getPosition(), "Player4");
    _aiPlayer1->addSensor(AI::VISUAL_SENSOR);
    _aiPlayer2->addSensor(AI::VISUAL_SENSOR);
    _aiPlayer3->addSensor(AI::VISUAL_SENSOR);
    _aiPlayer4->addSensor(AI::VISUAL_SENSOR);

    _aiPlayer1->addAISceneImpl(MemoryManager_NEW AI::TenisSceneAISceneImpl(_ballSGN));
    _aiPlayer2->addAISceneImpl(MemoryManager_NEW AI::TenisSceneAISceneImpl(_ballSGN));
    _aiPlayer3->addAISceneImpl(MemoryManager_NEW AI::TenisSceneAISceneImpl(_ballSGN));
    _aiPlayer4->addAISceneImpl(MemoryManager_NEW AI::TenisSceneAISceneImpl(_ballSGN));

    _team1 = MemoryManager_NEW AI::AITeam(1);
    _team2 = MemoryManager_NEW AI::AITeam(2);

    if(state || continueOnErrors){
        state = AI::AIManager::getInstance().registerEntity(0, _aiPlayer1);
    }
    if(state || continueOnErrors) {
        state = AI::AIManager::getInstance().registerEntity(0, _aiPlayer2);
    }
    if(state || continueOnErrors) {
        state = AI::AIManager::getInstance().registerEntity(1, _aiPlayer3);
    }
    if(state || continueOnErrors) {
        state = AI::AIManager::getInstance().registerEntity(1, _aiPlayer4);
    }
    if(state || continueOnErrors){
    //----------------------- AI controlled units (NPC's) ---------------------//
        _player1 = MemoryManager_NEW NPC(player[0], _aiPlayer1);
        _player2 = MemoryManager_NEW NPC(player[1], _aiPlayer2);
        _player3 = MemoryManager_NEW NPC(player[2], _aiPlayer3);
        _player4 = MemoryManager_NEW NPC(player[3], _aiPlayer4);

        _player1->setMovementSpeed(1.45f);
        _player2->setMovementSpeed(1.5f);
        _player3->setMovementSpeed(1.475f);
        _player4->setMovementSpeed(1.45f);
    }

    if(state || continueOnErrors) Scene::initializeAI(continueOnErrors);
    return state;
}

bool TenisScene::deinitializeAI(bool continueOnErrors){
    AI::AIManager::getInstance().pauseUpdate(true);

    AI::AIManager::getInstance().unregisterEntity(_aiPlayer1);
    AI::AIManager::getInstance().unregisterEntity(_aiPlayer2);
    AI::AIManager::getInstance().unregisterEntity(_aiPlayer3);
    AI::AIManager::getInstance().unregisterEntity(_aiPlayer4);
    MemoryManager::DELETE( _aiPlayer1 );
    MemoryManager::DELETE( _aiPlayer2 );
    MemoryManager::DELETE( _aiPlayer3 );
    MemoryManager::DELETE( _aiPlayer4 );
    MemoryManager::DELETE( _player1 );
    MemoryManager::DELETE( _player2 );
    MemoryManager::DELETE( _player3 );
    MemoryManager::DELETE( _player4 );
    MemoryManager::DELETE( _team1 );
    MemoryManager::DELETE( _team2 );
    return Scene::deinitializeAI(continueOnErrors);
}

bool TenisScene::loadResources(bool continueOnErrors){
    //Create our ball
    ResourceDescriptor ballDescriptor("Tenis Ball");
    _ball = CreateResource<Sphere3D>(ballDescriptor);
    _ball->getMaterialTpl()->setDiffuse(vec4<F32>(0.4f, 0.5f, 0.5f, 1.0f));
    _ball->getMaterialTpl()->setAmbient(vec4<F32>(0.5f, 0.5f, 0.5f, 1.0f));
    _ball->getMaterialTpl()->setShininess(0.2f);
    _ball->getMaterialTpl()->setSpecular(vec4<F32>(0.7f, 0.7f, 0.7f, 1.0f));
    _ball->setResolution(16);
    _ball->setRadius(0.3f);
    _ballSGN = _sceneGraph->addNode(_ball, "TenisBallSGN");
    _ballSGN->getComponent<PhysicsComponent>()->translate(vec3<F32>(3.0f, 0.2f ,7.0f));
    _ballSGN->setSelectable(true);
    GUIElement* btn = _GUI->addButton("Serve", "Serve",
                                      vec2<I32>(renderState().cachedResolution().width-220,60),
                                      vec2<U32>(100,25),
                                      vec3<F32>(0.65f,0.65f,0.65f),
                                      DELEGATE_BIND(&TenisScene::startGame,this));
    btn->setTooltip("Start a new game!");

    _GUI->addText("Team1Score",vec2<I32>(renderState().cachedResolution().width - 250,
                  renderState().cachedResolution().height/1.3f),
                  Font::DIVIDE_DEFAULT,vec3<F32>(0,0.8f,0.8f), "Team 1 Score: %d",0);

    _GUI->addText("Team2Score",vec2<I32>(renderState().cachedResolution().width - 250,
                  renderState().cachedResolution().height/1.5f),
                  Font::DIVIDE_DEFAULT,vec3<F32>(0.2f,0.8f,0), "Team 2 Score: %d",0);

    _GUI->addText("Message",vec2<I32>(renderState().cachedResolution().width - 250,
                  renderState().cachedResolution().height/1.7f),
                  Font::DIVIDE_DEFAULT,vec3<F32>(0,1,0), "");

    _GUI->addText("fpsDisplay",              //Unique ID
                  vec2<I32>(60,60),          //Position
                  Font::DIVIDE_DEFAULT,      //Font
                  vec3<F32>(0.0f,0.2f, 1.0f),//Color
                  "FPS: %s",0);              //Text and arguments

    _GUI->addText("RenderBinCount",
                  vec2<I32>(60,70),
                  Font::DIVIDE_DEFAULT,
                  vec3<F32>(0.6f,0.2f,0.2f),
                  "Number of items in Render Bin: %d",0);
    _guiTimers.push_back(0.0); //Fps
    return true;
}

bool TenisScene::onKeyUp(const Input::KeyEvent& key){
    return Scene::onKeyUp(key);
}

bool TenisScene::mouseMoved(const Input::MouseEvent& key){
    return Scene::mouseMoved(key);
}

bool TenisScene::mouseButtonReleased(const Input::MouseEvent& key, Input::MouseButton button){
    return Scene::mouseButtonReleased(key,button);;
}

};

Commits for Divide-Framework/trunk/Source Code/Scenes/TenisScene/TenisScene.cpp

Diff revisions: vs.
Revision Author Commited Message
331 Diff Diff IonutCava picture IonutCava Sat 06 Dec, 2014 20:53:45 +0000

[Ionut]
- Limited line length to 132 characters to improve readability and diff-comparisons
- Refactored memory allocation/deallocation functions
- Fixed a few compatibility issues with HashMap.h
- Fixed a bug in GPU Skinning shaders (cast a float to int)

330 Diff Diff IonutCava picture IonutCava Fri 10 Oct, 2014 17:19:11 +0000

[Ionut]
- New rendering algorithm :
— Perform second pass for visible nodes gathering all render commands and uploading them to an indirect draw buffer
— Render geometry with indirect draw commands
— Removed per-node range binding of the node buffer. Instead, bind the entire buffer once and index data in shaders
— Use “baseInstance” parameter from IndirectDrawCommand as a node buffer index
— Prefer DSA extensions for updating buffer data where applicable
- Moved all rendering specific code from SceneGraphNode to a new RenderingComponent
- Optimized “toString” utility function

328 Diff Diff IonutCava picture IonutCava Sat 04 Oct, 2014 18:03:36 +0000

[Ionut]
- Added per SceneGraphNode material instances. (Cloned from the SceneNode’s material)
- Improved shader loading for materials

326 Diff Diff IonutCava picture IonutCava Tue 30 Sep, 2014 21:11:32 +0000

[Ionut]
- Fixed more memory leaks
- Simplified Task interface and timing System
- Improved compatibility between Boost, STL and EASTL with random combinations of vectors, strings and maps
- Simplified Light class by removing the “slot” member
- Random optimizations

325 Diff Diff IonutCava picture IonutCava Wed 17 Sep, 2014 20:06:13 +0000

[Ionut]
- Reworked transform system:
— Parent transform chain system moved from Transform class to the PhysicsComponent
— PhysicsComponent now returns all transform values needed both global and local (still needs heavy optimization and caching)

- Reworked SceneGraph node management:
— Proper ref counting of SceneNodes and proper removing of resource (ResourceCache is now empty on destruction, as it should be)
— Removed parent transform tracking as that’s the PhysicsComponent’s responsibility
— Only nodes loaded via the ResourceCache are allowed to be added to the SceneGraph (added proper loaders for Impostors, Sky, etc)

- Optimized some of the math classes (mat4, mat3)

322 Diff Diff IonutCava picture IonutCava Sat 06 Sep, 2014 20:33:47 +0000

[Ionut]
- Refactored most of Boost related code to be C++11 based
— Boost is only used for ThreadPool, Mutex handling, XML parsing and networking (ASIO)
— Function binds, threads, regex, NonCopyable base, Hashing algorithms and more are now using C++11 libraries
- Replaced all FOR_EACH calls with standard, range, “for” calls

321 Diff Diff IonutCava picture IonutCava Wed 03 Sep, 2014 22:05:15 +0000

[Ionut]
- Added support (and enabled by default) for the EASTL library (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html / https://github.com/paulhodge/EASTL)
— Strings, vectors and hash_maps can be combined from EASTL, STL and Boost (not all combinations work. e.g. EASTL strings with STL/Boost containers due to the lack of a proper hash function)

320 Diff Diff IonutCava picture IonutCava Sun 31 Aug, 2014 21:45:33 +0000

[Ionut]
- More AI work (entity captures flag and returns it to base)

318 Diff Diff IonutCava picture IonutCava Sat 30 Aug, 2014 17:35:53 +0000

[Ionut]
- Wrapped the entire code in a “Divide” namespace
- VertexBuffers now call “shrink_to_fit” on all internal data storage
- Improved some vector performance by preferring “emplace_back” instead of “push_back” + proepr usage of reserve / resize
- Wrapped OIS specific types and classes in Divide::Input namespace
- Added the messageBox.layout file (forgot it in the previous few commits)

316 IonutCava picture IonutCava Mon 25 Aug, 2014 22:04:03 +0000

[Ionut]
- Cleaned up AI classes
- Added basic Order <-> Goal system