Code Monkey home page Code Monkey logo

sharpquake's Introduction

SharpQuake

GitHub license PRs Welcome

Description

SharpQuake is a GLQuake reimplementation in C# using the OpenTK library and the .NET Core platform.

Roadmap

  • Code cleanup:

    • Change Init / Shutdown pattern for IDisposable pattern (Ongoing)
    • Move type definitions out of core code and into a Framework library (Ongoing)
    • Use PascalCase for properties, fields, function names, class names & structs (Ongoing)
    • Use inheritance and polymorphism where classes handle multiple object types (Ongoing)
    • Use camelCase for local variables (Ongoing)
    • Rename type definitions to .NET style variations (Ongoing)
    • Support for external map textures (Ongoing)
    • Adapt mesh routines to use Vertex and Index buffers
    • Refactor into a structure similar to Quake 3 (cgame, game, quake3, ui)
    • Add 16:9, 16:10 and 21:9 support
    • Add PK3 (ZIP) support
    • Convert static classes to instance classes where static is unnecessarily used
    • Remove code duplication via file loading and handling in many non-filesystem related classes
    • Abstract OpenGL code from core engine code
  • Features planned:

    • Port geometry rendering to a GLSL shading system
    • Implement central messaging system like those in engines like idtech3 and idtech4
    • Add support for Quake 3 BSPs and potentially Quake 3 shaders
    • Upgrade lighting system/introduce Normal Map and specular map support
    • Add support for MD3 and more modern model formats
    • Develop configurable UI system (Similar to FAKK2/MOHAA)
  • Maybe if we're lucky (Would be nice):

    • Port q3map compiler to C# .NET (Why? Why not?)
    • Implement PBR and custom BSP format (With light mapping like Bakery - GPU Lightmapper for Unity)
  • Please take a look into this

Dependencies

  • OpenTK 3.3.1
  • NVorbis 0.10.5
  • .NET 6
  • OpenAL (Windows) / libopenal on Linux
  • SDL2 (Windows and macOS) / libsdl2-2.0 on Linux (Runtime binaries)

Building

Project is built against and tested for Visual Studio 2019 on .NET Core 3.1

  1. Install these nuget packages

    • Install-Package OpenTK -Version 3.3.1
    • Install-Package NVorbis -Version 0.10.5
    • Install-Package NVorbis.OpenTKSupport -Version 1.4.0
    • Update-Package –reinstall
  2. Initialize git submodules

  3. Add dependencies for your target architecture in your output directory (defaults to <project root>/Quake).

    • See links under dependencies header above
  4. Add ld1, hipnotic, and rogue (minimum ld1) data directories to <project root>/Quake.

    • You only need the <mod>\pak0.pak, etc. and <mod>\config.cfg files of each directory if copying from a steam install.
  5. Build solution.

Running

In case you don't own a copy of Quake you can purchase it on GOG.com, Steam or use the shareware version.

As Linux is case-sensitive make sure your folder and file names look like that Id1 and PAK0.PAK and PAK1.PAK (in case you own the full version).

To play with soundtrack add it to Id1/music or the mission pack folder you want to play in OGG Vorbis format like this track02.ogg. You can get it here Steam Guide

macOS / OSX is not official supported as OpenGL on Mac is poorly supported and has been replaced in favour of their own graphics API Metal.

The -basedir <directory> switch can be used to change the default data directory. e.g. SharpQuake.exe -basedir C:\Quake\

-window switch is pre-defined in project settings, but if you change the default directory of where you want your data, you may need to add -basedir <directory> to project properties > Debug > Command line arguments

The original expansion packs can be run using -rogue or -hipnotic switches if the data is present for it.

Original Quake switches apply and can be used.

Enjoy! πŸ™‚

Screenshot

Credits

sharpquake's People

Contributors

memorix101 avatar multiguy18 avatar nukeandbeans avatar optimus-code avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sharpquake's Issues

OpenTK 4.5.0 Upgrade

Hi

I just thought it would be useful to list some breaking changes I have so far discovered trying to upgrade to OpenTK 4.5.0.

Breaking changes

  • AudioContext and accommodating higher level audio classes are no longer part of OpenTK.
  • Underlying window system changed, no longer based on System.Windows.Forms and you need to use the low level GLFW apis.
  • Input routines changed as a result of the new windowing system.
  • Video mode selection is now done with low level GLFW api.

I'll add more points when/if I discover them.

mainwindow never actually is disposed

This causes the Quake process to continue running in the background. Adding mainwindow.Instance.Dispose(); below mainwindow.Instance.Exit(); at line 232 of sys.cs fixes this issue.

I was going to create a PR for this but I'm using a different project setup and didn't want to pollute things.

TODO

TODO List

  • Can't connect to local games from server browser as host IP is always 0.0.0.0:PORT
  • Implement music playback inside a folder e.g. Id1\music\track01.ogg (Restore music playback)
  • Show message box without Windows.Forms (as on Mac 64bit it's broken)
  • Windowed mode is somehow broken on Linux
  • Fix lower-case file names on Linux (renaming files is annoying)
  • Cleanup and restructure/modernise the code (Thanks to @optimus-code)
  • Make it possible to run mod episodes

Please take a look into this

Notes

  • SDL2 backend in OpenTK 3.0 is somehow broken and will result in bad mouse position bugs. It's not possible to use this. However, as a workaround to use SDL2 outside of OpenTK with SDL2-CS I added a line of code to turn off the SDL2 detection in OpenTK.

Mod episodes compatiblity

❌ Nope | πŸ”Ά With issues | βœ” Perfect

Any plans moving the progs into code?

Are there any plans moving the old QuakeC progs into loadable c# gamescript projects?
I was investigating this project a while back whether its useful for custom games but found the whole progs implementation to be too much of a pain to struggle with.

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.