Menu

Startup

Benedict Jäggi

Installation and Run : How To

Installation

  1. Download the repository into your destined folder. Here it's /home/beni
cd /home/beni
git clone https://git.code.sf.net/p/openmining/code openmining
  1. Maybe adjust the HOME_PATH:
cd openmining
nano MAIN.py

change the line with the HOME_PATH to the folder of this repository.
(BASE.HOME_PATH or APP_BASE.HOME_PATH)

(Ctrl-S, Ctrl-X)

If you want to use the server, you need to do the same in SERVERMAIN.py
It's located in openmining/SERVER/SERVER_OpenMining.

cd openmining/SERVER/SERVER_OpenMining
nano SERVERMAIN.py

change the line with the HOME_PATH to the same path as above. (To the directory with MAIN.py in it.)

e.g. HOME_PATH = "/home/beni/openmining/"

Dependencies

You need to have OpenGL and pygame installed, and of course python3.

Running

You can use the client without server but it won't save anything then.

Maybe you need to adjust the HOST_NAME and HOST_PORT in Apps/Games/APP_GAME_OpenMining.py and in SERVERMAIN.py. It's set to accept all connections (server) and for connecting to my local server(192.168.0.12) (client). I will add command line options later.

So, first start the server:

cd openmining/SERVER/SERVER_OpenMining
python3 SERVERMAIN.py

Now, in another Terminal or on another computer:

cd openmining
python3 MAIN.py

And have Fun!

Server saves all x seconds. That can change with each commit, so look closely at WORLDDATA_SAVE_INTERVAL in SERVERMAIN.py
Actually it's either 10 seconds or 300 seconds (5min), Idk.

Client usage

Use WASD or the Arrow keys to move forward, backwards and sidewards.
Use the mouse to look around.
If you don't have a mouse, you can use Q and E to look sidewards and R, F to look up and down.
Press the SPACE BAR to set a block or to unset an already set block. Blocks will be sent to the server and the answer from the server actually sets or unsets the block. If you are not connected to a server, it just sets or unsets the block locally.
Use L to lock or unlock character movement in the Y direction (Up and Down).
Press ESC to exit the client.

Server usage

Right now you can do nothing but watch. You can exit the server with Ctrl-X.


MongoDB Logo MongoDB