README.md

This commit is contained in:
smea 2014-06-18 21:52:12 +02:00
parent 98a5031b30
commit 640944288a
12 changed files with 46 additions and 10 deletions

View File

@ -76,6 +76,46 @@ Once compiled, you may also run it using :
Under Mac OS X, you might have no choice but to use that first option as we do not use a .app directory.
##Controls
As this is an engine prototype rather than an actual game, the controls are very awkward and complicated to use.
There are two modes of control : no-clip flying camera, and player mode. The former can be used in any situation, while the latter should only be used to navigate planets' surfaces.
No-clip flying camera controls :
```
W/S : move forward/backwards
A/D : move left/right
Q/E : move up/down
I/K : control pitch
J/L : control yaw
U/O : control roll
SPACE : toggle mouse-look mode
```
Player mode controls :
```
W/S : move forward/backwards
A/D : move left/right
I/K : control pitch
J/L : control yaw
SPACE : jump
T : toggle mouse-look mode
LEFT CLICK / C : place block
RIGHT CLICK / X : remove block
```
Common controls :
```
P/M : control time
SHIFT + P/M : control time faster
```
##Unit tests
In order to run the few unit tests we wrote, you should use the following command :

View File

@ -274,9 +274,6 @@ void Application::loop()
globalGalaxy->step(*camera,contentHandler,globalTime,deltaTime);
Input::update(window);
TileTexture::getInstance().update();
camera->update();
//---------------------
@ -298,15 +295,16 @@ void Application::loop()
if(Input::isKeyHold(GLFW_KEY_LEFT_SHIFT))
{
if(Input::isKeyHold(GLFW_KEY_P))globalTime+=0.1f;
if(Input::isKeyHold(GLFW_KEY_M))globalTime-=0.1f;
if(Input::isKeyHold(GLFW_KEY_P))globalTime+=1.0f*deltaTime;
if(Input::isKeyHold(GLFW_KEY_M))globalTime-=1.0f*deltaTime;
}else{
if(Input::isKeyHold(GLFW_KEY_P))globalTime+=0.001f;
if(Input::isKeyHold(GLFW_KEY_M))globalTime-=0.001f;
if(Input::isKeyHold(GLFW_KEY_P))globalTime+=0.1f*deltaTime;
if(Input::isKeyHold(GLFW_KEY_M))globalTime-=0.1f*deltaTime;
}
if(Input::isKeyPressed(GLFW_KEY_V))testBool1^=1;
if(Input::isKeyPressed(GLFW_KEY_B))testBool2^=1;
if(Input::isKeyPressed(GLFW_KEY_0))globalTime=0.0f;
// printf("test %d\n",testVal);
testVal=0;
@ -325,7 +323,6 @@ void Application::loop()
glfwSwapBuffers(window);
glfwPollEvents();
}
Application::~Application()

View File

@ -99,7 +99,6 @@ void Galaxy::generateVBO()
program.setBuffers(vao, vbo, 0);
program.use();
}
@ -110,7 +109,7 @@ void Galaxy::step(Camera& camera, ContentHandler& contentHandler, float globalTi
currentSolarSystem->update(globalTime);
}
time+=deltaTime;
time+=deltaTime*0.1f;
// on saute des frames:
{

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.