Compare commits
No commits in common. "2d28957eaa2b5f7be684c4c7aac0c9d609d08008" and "d9ce3fd3ab7abea637a75c82078144f09c5d8b46" have entirely different histories.
2d28957eaa
...
d9ce3fd3ab
29
README.md
29
README.md
@ -1,30 +1,3 @@
|
|||||||
|
|
||||||
# Pseudo-3D hyperbolic engine
|
# Pseudo-3D hyperbolic engine
|
||||||
|
|
||||||
My school project
|
My school project
|
||||||
|
|
||||||
## Loading games
|
|
||||||
|
|
||||||
You can load a game by passing the name of the game as an argument:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
python3 main.py triangle
|
|
||||||
```
|
|
||||||
|
|
||||||
Game can be loaded only if it is located in the games/ directory.
|
|
||||||
If no game is specified then "squareroom" will be loaded.
|
|
||||||
|
|
||||||
|
|
||||||
## Controls
|
|
||||||
|
|
||||||
| Descripton | Key |
|
|
||||||
|----------------------------------------|:---:|
|
|
||||||
| Move forward | W |
|
|
||||||
| Move backwards | D |
|
|
||||||
| Strafe left | Q |
|
|
||||||
| Strafe right | E |
|
|
||||||
| Turn 180 degrees | R |
|
|
||||||
| Toggle FPS cap | F1 |
|
|
||||||
| Create a wall | F2 |
|
|
||||||
| Toggle debug info | F3 |
|
|
||||||
| Print current position to the terminal | F4 |
|
|
||||||
| Save level to `./levels` folder | F5 |
|
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
import importlib.resources as impr
|
|
||||||
import sys
|
|
||||||
import json
|
|
||||||
|
|
||||||
def init(serialize):
|
|
||||||
curm = sys.modules[__name__]
|
|
||||||
files = impr.files(curm)
|
|
||||||
level = None
|
|
||||||
with files.joinpath("triangle.json").open('r') as leveldir:
|
|
||||||
level = json.loads(leveldir.read(), object_hook=serialize.object_hook)
|
|
||||||
return level
|
|
@ -1 +0,0 @@
|
|||||||
[{"__type__": "objSegment", "isFinite": true, "pointA": {"__type__": "complex", "real": 0.38529100476842437, "imag": 0.0}, "pointB": {"__type__": "complex", "real": -0.2372040619364459, "imag": 0.36629343026935063}, "color": [255, 0, 0]}, {"__type__": "objSegment", "isFinite": true, "pointA": {"__type__": "complex", "real": -0.2372040619364459, "imag": 0.36629343026935063}, "pointB": {"__type__": "complex", "real": -0.22354939429564802, "imag": -0.26820653903460523}, "color": [0, 255, 0]}, {"__type__": "objSegment", "isFinite": true, "pointA": {"__type__": "complex", "real": -0.22354939429564802, "imag": -0.26820653903460523}, "pointB": {"__type__": "complex", "real": 0.39868528559672944, "imag": 0.017873216691274733}, "color": [0, 0, 255]}]
|
|
2
main.py
2
main.py
@ -114,7 +114,7 @@ def mainLoop():
|
|||||||
alert.start_hide_thread(alerts, delay)
|
alert.start_hide_thread(alerts, delay)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
game = import_module('games.' + sys.argv[1])
|
game = import_module(sys.argv[1])
|
||||||
except IndexError:
|
except IndexError:
|
||||||
game = import_module("games.squareroom")
|
game = import_module("games.squareroom")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user