mirror of
https://github.com/smealum/SPACECRAFT.git
synced 2025-06-19 09:15:46 -04:00
README.md
This commit is contained in:
parent
98a5031b30
commit
640944288a
40
README.md
40
README.md
@ -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.
|
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
|
##Unit tests
|
||||||
|
|
||||||
In order to run the few unit tests we wrote, you should use the following command :
|
In order to run the few unit tests we wrote, you should use the following command :
|
||||||
|
@ -274,9 +274,6 @@ void Application::loop()
|
|||||||
globalGalaxy->step(*camera,contentHandler,globalTime,deltaTime);
|
globalGalaxy->step(*camera,contentHandler,globalTime,deltaTime);
|
||||||
Input::update(window);
|
Input::update(window);
|
||||||
TileTexture::getInstance().update();
|
TileTexture::getInstance().update();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
camera->update();
|
camera->update();
|
||||||
|
|
||||||
//---------------------
|
//---------------------
|
||||||
@ -298,15 +295,16 @@ void Application::loop()
|
|||||||
|
|
||||||
if(Input::isKeyHold(GLFW_KEY_LEFT_SHIFT))
|
if(Input::isKeyHold(GLFW_KEY_LEFT_SHIFT))
|
||||||
{
|
{
|
||||||
if(Input::isKeyHold(GLFW_KEY_P))globalTime+=0.1f;
|
if(Input::isKeyHold(GLFW_KEY_P))globalTime+=1.0f*deltaTime;
|
||||||
if(Input::isKeyHold(GLFW_KEY_M))globalTime-=0.1f;
|
if(Input::isKeyHold(GLFW_KEY_M))globalTime-=1.0f*deltaTime;
|
||||||
}else{
|
}else{
|
||||||
if(Input::isKeyHold(GLFW_KEY_P))globalTime+=0.001f;
|
if(Input::isKeyHold(GLFW_KEY_P))globalTime+=0.1f*deltaTime;
|
||||||
if(Input::isKeyHold(GLFW_KEY_M))globalTime-=0.001f;
|
if(Input::isKeyHold(GLFW_KEY_M))globalTime-=0.1f*deltaTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Input::isKeyPressed(GLFW_KEY_V))testBool1^=1;
|
if(Input::isKeyPressed(GLFW_KEY_V))testBool1^=1;
|
||||||
if(Input::isKeyPressed(GLFW_KEY_B))testBool2^=1;
|
if(Input::isKeyPressed(GLFW_KEY_B))testBool2^=1;
|
||||||
|
if(Input::isKeyPressed(GLFW_KEY_0))globalTime=0.0f;
|
||||||
|
|
||||||
// printf("test %d\n",testVal);
|
// printf("test %d\n",testVal);
|
||||||
testVal=0;
|
testVal=0;
|
||||||
@ -325,7 +323,6 @@ void Application::loop()
|
|||||||
|
|
||||||
glfwSwapBuffers(window);
|
glfwSwapBuffers(window);
|
||||||
glfwPollEvents();
|
glfwPollEvents();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Application::~Application()
|
Application::~Application()
|
||||||
|
@ -99,7 +99,6 @@ void Galaxy::generateVBO()
|
|||||||
|
|
||||||
program.setBuffers(vao, vbo, 0);
|
program.setBuffers(vao, vbo, 0);
|
||||||
program.use();
|
program.use();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -110,7 +109,7 @@ void Galaxy::step(Camera& camera, ContentHandler& contentHandler, float globalTi
|
|||||||
currentSolarSystem->update(globalTime);
|
currentSolarSystem->update(globalTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
time+=deltaTime;
|
time+=deltaTime*0.1f;
|
||||||
|
|
||||||
// on saute des frames:
|
// on saute des frames:
|
||||||
{
|
{
|
||||||
|
BIN
worlddata/0/0_7_279136_262528
Normal file
BIN
worlddata/0/0_7_279136_262528
Normal file
Binary file not shown.
BIN
worlddata/0/0_7_279328_262496
Normal file
BIN
worlddata/0/0_7_279328_262496
Normal file
Binary file not shown.
BIN
worlddata/0/0_7_279328_262528
Normal file
BIN
worlddata/0/0_7_279328_262528
Normal file
Binary file not shown.
BIN
worlddata/0/0_7_279360_262496
Normal file
BIN
worlddata/0/0_7_279360_262496
Normal file
Binary file not shown.
BIN
worlddata/0/0_7_279360_262528
Normal file
BIN
worlddata/0/0_7_279360_262528
Normal file
Binary file not shown.
BIN
worlddata/0/3_9_384000_177792
Normal file
BIN
worlddata/0/3_9_384000_177792
Normal file
Binary file not shown.
BIN
worlddata/0/3_9_384000_177824
Normal file
BIN
worlddata/0/3_9_384000_177824
Normal file
Binary file not shown.
BIN
worlddata/0/3_9_384032_177792
Normal file
BIN
worlddata/0/3_9_384032_177792
Normal file
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user