GithubHelp home page GithubHelp logo

classicvalues / hs-quake-3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ocharles/hs-quake-3

0.0 1.0 0.0 9.86 MB

Quake 3 map viewer written in Haskell

License: BSD 3-Clause "New" or "Revised" License

Haskell 97.13% GLSL 1.04% Nix 1.83%

hs-quake-3's Introduction

hs-quake-3

Hello, welcome to the hs-quake-3 repository! This project re-implements various parts of the Quake 3 game in Haskell.

image

Features currently supported:

  • Most shader operations work. Most texture modulation functions work, multiple passes with blending, alpha testing and sorting are implemented.
  • BSP file parsing, and use of the PVS data to perform occlusion culling.

Still to be done:

  • Sky boxes
  • Fog
  • Vertex deformation
  • Curved surfaces
  • Entities

Map

To give you an overview of the project:

  • Quake3.Shader.Parser is responsible for parsing Quake 3 shader files into an AST.
  • Quake3.Shader.TypeCheck "type checks" the result of parsing. At this stage, we register known shader opcodes and their parameters, and type check into a considerably richer data structure.
  • Quake3.Shader.GL takes the result of type-checking, and can transform shaders into a graph of OpenGL calls. This graph is described by RenderGraph.
  • RenderGraph allows one to describe a rendering pipe-line out of smaller components. The idea behind the render graph is to collect and sort common operations - state changes in OpenGL are expensive, so we want to avoid them wherever possible. RenderGraph currently contains nodes necessary for rendering (most of) Quake 3 - nodes to bind texture stages, set shader parameters, enable multiple passes, and so.

    This module is independent of Quake 3, and may well be usable in other projects.

  • GLObjects is a light wrapper around objects offered by OpenGL. Here we have what are essentially newtype wrappers around textures, vertex array objects, and helper functions to create/upload data.
  • Wires.* contains the logic of the game. Wires.Game is responsible for taking the camera position, determining which clusters are visible to deliver a final render. Wires.Camera implements a rudimentary first-person camera, interpreting SDL keyboard and mouse events as matrix transformations.
  • UI/Main forms the initialization process.

hs-quake-3's People

Contributors

ocharles avatar

Watchers

 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.