Skip to content

zpervan/BlockJump

Repository files navigation

Game(Ubuntu) Game(Windows) Server(Ubuntu) Server(Windows)

BlockJump

A simple jump-and-run platform game with the possibility of creating custom maps and playing multiplayer online games.

Current state of the game:

Current state of the map editor:

Development setup

Prerequisites

Used libraries:

Ubuntu

  1. Install Bazel 5.4.0. Installation instructions can be found here.
  2. Open your terminal and install the following dependencies
$ sudo apt install bazel libgl-dev freeglut3-dev libopenal1
  1. Install the needed protoc 21.6 - build it then add the built binary (bin file) to your PATH environment.
  2. Install the following protobuf dependencies for Go. Position your terminal in the Server folder and execute the following:
$ go install google.golang.org/protobuf/cmd/protoc-gen-go
$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc

Windows

  1. Install Bazel 5.4.0. Installation instructions can be found here.

  2. Install Microsoft Visual Studio 19 - Community edition environment. Not sure about other MSVC version.

  3. Install the needed protobuf generator

  4. Install the following protobuf dependencies for Go. Position your terminal in the Server folder and execute the following:

$ go install google.golang.org/protobuf/cmd/protoc-gen-go
$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc

NOTE: Debug mode should work fine in both cases

Generating server files

In order to successfully launch the server, you need to generate the gRPC files from the ProtoMessages/server folder. Make sure you have installed the environment successfully. Navigate to the root of the project in your terminal and do the following:

$ protoc --go_out=Server --go-grpc_out=Server ProtoMessages/server/*.proto

For more information, you can have a look this blog post.

Run

To run the game, use the following command for Ubuntu:

$ bazel run //:main --config=linux # or --config=linux_debug for debug mode

And on Windows:

> bazel run //:main --config=windows

Running the server:

$ cd Server
$ go run .