Giter Site home page Giter Site logo

killbox's Introduction

KillBox

Top Language Code Size License

A multiplayer FPS game that I made with friends during college (2015) using LWJGL. It is distributed under the GNU GPL v3.

alt tag

System requirements:

  • Java 1.7 (JRE and JDK).
  • The latest version of LWJGL version 2 (not version 3). LWJGL 2.9.3 is included.
  • Your computer must support OpenGL.

How to run on Linux

Install the latest Java from Oracle's website. Go in the KillBox master directory (which has GridLevelMaker and license.txt), then in the "KillBox" directory. Copy the files from the "src" directory into the current directory.

Compile using:

javac *.java -cp res/lwjgl.jar:res/lwjgl_util.jar

Launch the game using:

java -cp res/lwjgl.jar:res/lwjgl_util.jar:. -Djava.library.path="./res" Game

Alternatively, use the script compile-and-run.sh that's located in the res folder.

Run on Windows

  1. Go to your "KillBox" directory which contains "res" and "src".
  2. Copy the files from "src" into the current directory.
  3. Copy the files (not the folders) from the "res" directory into the current directory.
  4. Run the batch file named "compile-and-run.bat".
  5. If it doesn't work, make sure that "java" and "javac" are in your PATH, then try step 4 again.

Screenshots

KillBox running on Ubuntu MATE (map: Citadel)

citadel

KillBox running on Windows 7 (map: Demo)

demo

KillBox running on Ubuntu (map: Houses)

houses

KillBox running on Debian (map: Manor)

manor

killbox's People

Contributors

axdoomer avatar gri49 avatar mastersquirrel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

killbox's Issues

Implement the lightning on walls

Walls can have a "light" value. They can also have different colors.

There is code for this right now, but it's not finished as it is missing a lot of pieces.

The game load the "light" property and saves it, but the renderer doesn't apply the lightning on the wall.
Planes have RGB properties, but they are not used.

Some sounds are not played at the right volume

When the sound volume is set to 0, the sounds can still be heard.

The weapon pickup sound and the pistol sound will both play at a very low volume. Other sounds will play at the "normal" volume and are very loud.

Port to LWJGL version 3 else the game won't start with Java 11

LWJGL 2.9 doesn't work with Java 11.

The game has to be ported to LWJGL 3.0, else the game won't start and displays the following error message:

Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!

Add damage direction indicators

These are not fully implemented in the engine, there was work to make them (the code is there), but it is incomplete.

Doom 3 has some that can be taken has a model.
screenshot-5

Fix mouse grabbing when in test mode

When in test mode, grab mouse doesn't work.

Start the game with -test. It sets HeadCamera.TestingMap to true. A check should be added in Camera.java in the condition that checks if the mouse should be grabbed or not.

No Doppler effect

The Doppler effect is not implemented and the 3D mode from sound has not been tested.

Hitscan optimization

The hitscans are slow in large areas where bullets can have a long reach.

Right now, the bullets check for walls and for players on each steps. It can be optimized so it finds the moment when it will hit a wall (throw a long vector, if it hits, check with smaller vectors until it doesn't hit a wall), then on each steps, it will only have to check for players.

Players don't slide against walls

When a player enters in collision against a wall, it blocks him. Based on the angle, the player should slide against it at a reduced speed instead of getting "stuck".

Optimize the map generator so polys that are outside of the map are not generated

The map generator (GridLevelMaker) generates a map using a grid. This grid is used to create blocks. Blocks are made of 4 polys (maybe 6 if they have a floor or a ceiling, but they won't be visible, so why?).

If a poly is not touching the floor or the ceiling, it may be outside of the map, or the user may be just not using floor and ceilings.

Add an option to the map generator so polys that will not be expected to be seen in normal play will be removed.

This will speed up the rendering and the collision detection. Of course, the grid must be correctly designed so that extra polys are not inserted into the map. No floor should be put under a block.

Let's call it "-optimize". It won't be enable by default. This feature will add complexity to the map generator.

Don't clear all the sound sources at the same time

In the sound code, when the game reaches the maximum number of sounds it can play at the same time, it fully clears the whole list of sources all at the same time.

Instead, a single source should be removed at a time when a new source is needed and the game has already reached its maximum number of sources.

Texture wrap around: edge pixel bleeding on the opposite side

A black line may appear above the gun or under the letters on the title screen. It will show up depending on the resolution.

Full screen window (1920x1080):
blackline
Zoom:
blackline

Full screen window (1920x1080):
blacklines
Zoom:
blacklines

This is not caused by filtering. It seems to be the pixel from the top or the bottom being duplicated on the opposite side of the texture. The exact cause is unknown.

Game can desynch when changing weapons

When there is a lot of action, if a player produces a lot of input at the same time and changes his weapon, the weapon may not change in the other game or it may not change correctly in his game. When it happens, the player ends up with the wrong weapon, but the sprite may remain unchanged. It will play the sound of another gun when firing, this will result in a cascade effect and will cause a desync, because weapons have different properties. It is hard to reproduce and it may happen when the player tries to change his weapon while he his firing.

Possibility to get DeltaTime using a command line parameter

DeltaTime is the difference in ms between two complete game loops. It could be printed to the console as it would be useful to know when the game requires more time to complete a single loop.

It would also make it possible to know the framerate. The maximum frame rate is 30. It would allow to know the maximum theoretical frame rate that the game could run up to if the frame rate was not locked.

At times where there is collision detection, the delay to execute a frame would go up (the fps would drop) and it would be useful to know when testing to see if the changes that were made make the game slower.

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.