Giter VIP home page Giter VIP logo

reis's Introduction

Reis

Like in reislust, which means wanderlust in dutch. Originally implemented in C and pure OpenGL, now in Java with LWJGL, specifically GLFW and JOML. All implementations are kept as decoupled and replaceable as possible.

Idea

The bestselling video game of all time was a voxel-based exploration game that started as a java proof of concept. Many people had a great time playing it, but the amount of time and effort put into the game by its community far outmatched that of its original developers, who did not realize its true potential: the mod community. More and more AAA game titles are released unfinished because they do not see the potential in mod community oriented development; instead of trying and failing to release a full game, release a proof of concept, if it is well received immediately complete a mod API, then implement the entire game with it. The mod community will take care of the unfinished parts for free.

Goals

Create a game client and server, create a voxel and physics engine, finish a mod API, then implement an exploration game with that API. Every part of the engine should be accessible by the API, completely decoupled, and compatible with other client and server implementations, in order to take full advantage of content created by the mod community. Release it for free.

Progress

Client and server:

  • Runtime single player works, no networking or local multiplayer yet.

Engine:

  • Voxel rendering works, but is not performant.
  • Physics enables player movement, floor collision, and friction.

Mod API and game:

  • World and player completed for engine testing, no gameplay yet.

Documentation

The documentation for the client, server, and engine should be simple enough to fit in this readme. The API and game will be separate projects with much longer documentation. Here are descriptions of the classes and methods in the client:


ClientLWJGL

server/client/ClientLWJGL.java

A client implementation in Java using GLFW with LWJGL. It takes input from a keyboard and mouse, and displays output with immediate mode OpenGL.

main

Starts a client in a new thread, reads GLFW events, and centers the cursor.

run

Creates a new keyboard and mouse controller, a new GLFW window, and starts as a server.

quit, input, time, output

Extends org.reis.server using GLFW.

close

Frees memory allocated by GLFW.


ImmediateModeRenderer

server/client/ImmediateModeRenderer.java

Renders org.reis.game.Player, org.reis.game.World, and String debug text.

render

If given no input, clear the output buffer.

If given an org.reis.game.Player input, translate to the position of that player, and rotate to the orientation of that player.

If given an org.reis.game.World input, render the blocks of that world.

If given a String input, print it as a char buffer for debugging.


KeyboardMouseController

server/client/KeyboardMouseController.java

Read the keyboard and mouse with GLFW callbacks, and produce acceleration and inertia vectors.

keyboard, mouse

Methods called by the anonymous methods used as GLFW callbacks, called by glfwWaitEvents in ClientLWJGL.main


Server

server/Server.java

An abstract class that stores and updates the states of players and worlds.

run

Loop that checks if the server has quit, reads input, updates the server based on the amount of time elapsed since the last update, and writes output.

update

Updates all worlds by an interval of time.

quit, input, time, output

Abstract methods used in the loop.

reis's People

Contributors

maycxc avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.