Giter Site home page Giter Site logo

axdoomer / meshglide Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 2.0 11.27 MB

MeshGlide is an experimental 3D engine for a FPS, it's written in C++ and was previously a prototype for KillBox.

License: GNU General Public License v3.0

C++ 94.34% C 4.73% Shell 0.40% Makefile 0.53%
c-plus-plus opengl fps-game multiplayer-game 3d-engine linux

meshglide's Introduction

MeshGlide

Top Language Code Size License Codacy Badge CircleCI

A simple FPS engine that uses GLFW 3 for the graphics and input. It's distributed under the GPLv3.

The early version of the engine was used as a prototype to test the feasibility of a homemade OpenGL engine for KillBox.

It's now under development. The goal is to create a new engine that's better than the KillBox engine.

It's called the MeshGlide engine. It's due to the way it's optimized. The player "glides" from polygon to polygon. The data structures are simple and the game runs very fast due to the tiny amount of calculations that have to be made in order to keep track of the player.

Development

Installation

Packages that need to be installed under Debian and Ubuntu are: libglfw3-dev libsdl2-image-dev libsdl2-dev libczmq-dev.

Under Open Suse 15 Leap, these packages need to be installed: libglfw-devel freeglut-devel libSDL2_image-devel cppzmq-devel.

Compile

Compile on Linux: g++ *.cpp -std=c++14 -lglfw -lGL -lGLU -lSDL2 -lSDL2_image -lzmq -o MeshGlide

It's preferable to compile and run the program using the run.sh script because it's tested, but this should work too.

Creating new levels

MeshGlide has a native format, but also supports the OBJ format (with slight modifications). Refer to this wiki page for more details.

Credits

The following files were taken from the Freedoom project. See their license.

  • Player sprites: playa1.png, playa2.png, playa3.png, playa4.png, playa5.png, playa6.png, playa7.png, playa8.png
  • Shotgun sprite: shota0.png
  • Rocket launcher sprite: launa0.png
  • Minigun sprite: mguna0.png
  • Bullet puff: puffa0.png, puffb0.png, puffc0.png, puffd0.png
  • Door texture: door9_1.png
  • Blood sprites: bluda0.png, bludb0.png, bludc0.png
  • Plasma sprite: aplsa0.png

MeshGlide uses code from CollisionDetection written by Jeff Thompson. The code is used in line.h. Permission has been granted to use and redistribute it under the GNU GPLv3 which is the same license as MeshGlide. The original license for this code was CC BY-NC-SA 3.0.

Screenshots

Version 0.47

screenshot_2018-09-02_22-38-51

Version 0.39

screenshot at 2018-05-10 21-06-32

From an older version

screenshot at 2017-12-18 19-50-42

meshglide's People

Contributors

axdoomer avatar codacy-badger avatar mikefaille avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

meshglide's Issues

Skip when the view angle wraps around from the back (like an overflow/underflow)

( when angles are going from 16383 to -16384 or from -16384 to 16383 )

In AngleTurn(short AngleChange)

// Our internal representation of angles goes from -16384 to 16383, 
// so there are 32768 different angles possible. 
if (AngleChange < 16383 && AngleChange > -16384)
{
    Angle += AngleChange;

    if (Angle + AngleChange > 16383)
    {
        Angle = Angle + AngleChange - 32768 - 100;  // 32850
    }
    else if (Angle + AngleChange < -16384)
    {
        Angle = Angle + AngleChange + 32768 + 100;
    }
}

The addition of 100 (the angle turn speed) to the possibility of values 32768 when wrapping around seems to fix the bug. Let's see if there's a better way to fix this.

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.