Git Product home page Git Product logo

kero's Introduction

GoDoc Go report card codecov CircleCI

Kero

Kero is a Source Engine game client implementation written in Go.

Current Features

  • BSP rendering with visdata support
  • Skybox rendering
  • Lightmap support (incomplete, BSP geometry only)
  • Staticprop rendering
  • Prop entity rendering (incomplete, models with bones unsupported)
  • Bullet physics for brush:physics entity collisions
Build Kero, run it by pointing it to a Source Engine game installation, and it should just work!

Building

Prerequisites

This project is tested against Go 1.14+, although will probably build on Go 1.12 or later. CGo is required for Imgui and Bullet. To compile with the physics module, Bullet is required;

  • On Mac OS it can be installed with brew install bullet.
  • See Bullet documentation for other platforms

Build

To build the project on Windows, Mac OS or Linux, all you need to do is run (assuming you have Go 1.12 or later installed) in the directory samples/demo: go build .

The demo targets Counterstrike: Source entities. To target a different game, you will need to update samples/demo/gameDef.go.

Running

First, you will need to have a source engine game installed, unless you are loading a map that has all its content bspzipped.

  • Run the built executable with this flag: -game="<GameDir>/<ContentDir>", where <GameDir> is the root directory of the game, and <ContentDir> is the sub-folder where the game content is located (e.g. cstrike, hl2, csgo etc). For example, a default Counterstrike: Source installation would be specified like this: -game="C:\Program Files (x86)\Steam\Steamapps\common\Counterstrike Source\cstrike"

What's the end goal?

  • An accurate-as-possible renderer compared to the original source engine
  • A physics environment for client-side simulation (Bullet will perform as "close enough")
  • Sound/audio playback
  • Expose an interface for controlling/passing game state in/out (e.g. demo files, netcode, etc)
  • Expose an interface for game specific implementations to be built on top
  • Headless mode. Be able to run this without a renderer or audio output
  • Interface for querying game data at runtime (e.g. LoS calculations between entities)
  • As little reliance on CGo as possible
  • 0 reliance on any valve code or libraries

Contributing

  1. Fork it (https://github.com/galaco/kero/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

kero's People

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

Watchers

 avatar  avatar  avatar

kero's Issues

Add skybox rendering

Implement skybox rendering:

  • Find sky_camera in entities to determine camera position
  • Find worldspawn in entities to determine skybox material
  • Load skybox material
  • Compute visible clusters in skybox
  • Add render pass for skybox

Corrupted props

Some props are rendered as rubbish. It looks to be related to multi-part props not have vertices correctly loaded.

This needs to be fixed, and can be seen on almost any map

Render displacements

Displacements are usable now, except it needs investigation into how to test displacement visibility, as they are skipped when computing visible clusters at the moment.

Batch render visible staticprops

Renderable staticprops are calculated at the beginning of a frame, but each instance of each prop gets its own draw call. Instead they should be grouped and rendered as instances to reduce draw calls.

Could this be used for Ray-Tracing on CS:GO maps?

Hi ๐Ÿ‘‹

This looks like an awesome project, well done! I was wondering if it could be used for doing headless visibility/LoS checks for CS:GO.
I'm mostly thinking in the context of demo parsing here.

I'm imagining something like:

  1. LoadMap("path/to/mapfile")
  2. call RayTrace(a, b)
  3. get back true / false or number of objects in between the two points
  4. profit!

would this be something that could fit into the scope of the project?

Add deferred lighting implementation

The eventual plan is to support baked lightmaps, but for now a deferred renderer will suffice.

This issue covers:

  • Geometry rendering
  • Skybox rendering
  • light_environment
  • Point light

Additional support can be added at a later date.

Add displacement painting

Currently only first basetexture is used on displacement. Update displacement rendering to support vertex painting

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

circleci
.circleci/config.yml
  • galaco/go-gtk-ci 1.13b1
gomod
go.mod
  • go 1.19
  • github.com/galaco/KeyValues v1.4.1
  • github.com/galaco/bsp v0.3.0
  • github.com/galaco/filesystem v0.1.4
  • github.com/galaco/gosigl v0.2.1
  • github.com/galaco/source-tools-common v0.1.0
  • github.com/galaco/stringtable v0.1.1
  • github.com/galaco/studiomodel v1.0.0-beta.1
  • github.com/galaco/tinygametools v0.1.1
  • github.com/galaco/vmf v1.0.0
  • github.com/galaco/vmt v0.1.3
  • github.com/galaco/vtf v1.2.0
  • github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6@726fda9656d6
  • github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b@93cebf72946b
  • github.com/go-gl/mathgl v1.0.0
  • github.com/inkyblackness/imgui-go/v4 v4.5.0
  • github.com/sqweek/dialog v0.0.0-20220809060634-e981b270ebbf@e981b270ebbf

  • Check this box to trigger a request for Renovate to run again on this repository

Crash on missing texture

Maps that reference textures that can't be found will crash the engine.

There is a partially implemented fallback that uses texture.NewError that will default to the iconic purple checker material, but that does not currently appear to work.

Optimise collision model generation

Actually generating the bullet collision environment is "fast enough". And small worlds (aka stock maps) perform quite well. However larger custom maps get extreme lag with physics enabled (ze_bioshock for example).

A few tests indicate large numbers of displacements and/or staticprops cause this. These need optimising

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.