GithubHelp home page GithubHelp logo

w23 / opensource Goto Github PK

View Code? Open in Web Editor NEW
146.0 19.0 16.0 1.09 MB

Load Source games maps as combined meshes correctly positioned relative to each other

License: Do What The F*ck You Want To Public License

C 99.75% Shell 0.12% CMake 0.12% Batchfile 0.01%
half-life half-life-2 source-engine opengl opengl-es raspberry-pi vulkan wayland

opensource's People

Contributors

mcmihai avatar phi-line avatar ptruser avatar w23 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  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  avatar  avatar

Watchers

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

opensource's Issues

Make public release pipeline

There are people who want to run this on their machines.
Figure out how best to make release binaries for this project for at least Windows.

Corrupted textures

Some textures look corrupted. Don't know why.
I mess up DXT reading?
I mess up calculating VTF offsets for DXT data?

VR

It is trivial to do, but still somewhat time-consuming.

Read VPK files directly

Currently for development vpk files contents are mounted using vpk_fuse. This is not cool. I cannot release like this.

  • read directory
  • sort entries
  • open archive fds
  • ICollection interface to alloc IFiles

Missing textures

Some textures are visually missing, although loading log reports no missing materials or textures. Primary hypothesis is that I'm missing something important from Patch materials, because their supports is a hack even compared to other materials support.

Multithreaded loader

  • load maps in parallel
  • load assets in parallel
  • convert textures to ETC in parallel

Optimize renderer

The entire Half-Life 2 mesh is like 5fps on AMD Radeon FURY X. This is unacceptable.

Things to try in no particular order:

  • map frustum culling
  • face frustum culling
  • bsp node frustum or pvs culling
  • dynamic per-material batching of visible faces
  • pre-sort vertices by material for VBO offset 64k splitting
  • one giant VBO for the entire mesh
  • skip material and lightmap textures for distant maps, do baked color instead
  • combine most popular regular material textures into atlases to avoid splitting draw calls

d1_eli_01 map doesn't load

src/bsp.c:263: Error: no visible faces found
src/bsp.c:646: Error: bspLoadModelPreloadFaces() => BSPLoadResult_ErrorFileFormat
src/bsp.c:912: Error: bspLoadModel() => BSPLoadResult_ErrorFileFormat
src/OpenSource.c:275: Cannot load map "d1_eli_01": 2

Read pakfile lump

There are a lot of materials that aren't found on loading. I expect that these are stored within bsp files themselves.
Pakfile lumps are zipped or something, so will have to figure that out too.

Models support

Later Valve games like Episode One have larger part of maps made out of models rather than bsp geometry. Without models these maps look unnatural and empty.

Resources streaming

Load one map per frame. Don't make user wait ALMOST 4 SECONDS to load the entire HL2 world.

macOS support

Atto doesn't have proper support for macOS yet. Do it.

skybox/sky_day03_06B not found

In map d3_citadel_05

Apparently skyboxes are materials. And it is purely accidental that their textures can be loaded directly by concatenating bk.vtf or alike to material name.
This material is different. Need to load its material properly

An idea how to remove skybox

I have an idea how to remove the skybox areas.

First, find the leaf in which info_player_start's "eyes" are placed. Push this leaf to the stack.

Then, until the stack is empty, repeat:

  1. Pop leaf from the stack.
  2. Mark popped leaf.
  3. For each visible leaf of that leaf:
    3.1) Check if it's not already marked. Proceed to 3.2 if it's not.
    3.2) Push the visible leaf to the stack.

Then, make a mesh containing only polygons from the marked leaves.

What do you think?


У меня есть идея, как убрать скайбоксы.

Сначала, найди тот лист, в котором находятся "глаза" info_player_start'а. Положи его на стек.

Затем, пока стек не стал пустым, выполняй следующие действия:

  1. Возьми лист со стека.
  2. Отметь его.
  3. С каждым видимым листом у этого листа:
    3.1) Проверь, не был ли он отмечен ранее. Если нет, переходи к 3.2.
    3.2) Положи этот лист на стек.

Потом, сделай меш, содержащий только полигоны из отмеченных листьев.

Как тебе идея?

Make a fly-by based on a speedrun

To achieve that one would need to parse *.dem files, extract player positions and play them.
Some sad facts:

  1. There is no publicly available specs on GoldSrc (most speedruns are made playing original HL, not Source) *.dem format that look legit.
  2. Source *.dem format (https://developer.valvesoftware.com/wiki/DEM_Format) suggests that the file itself contains just network packets, and common sense tells me that those should contain only player commands (input) and not much else. If this is right, then there's no way to extract player position without implementing the rest of the engine. Oh my!
    (However, Source SDK sources contain DEM parser that suggests that there really is a way to extract just a player position without processing actual input, but I went no further in my preliminary investigation)

Load and render skyboxes

Current orange-brown background color is sad.

  • BGRA8 d2_coast_11
  • BGRX8 d1_canals_13
  • RGBA16F d2_prison_01
  • Texture "skybox/sky_day03_06Brt" not found d3_citadel_05

Portal 2: support info_landmark_entry/exit mechanism

Portal 2 doesn't use neither named landmarks nor changelevel triggers with explicit next map name.
Instead, being completely linear, it uses global ordered map list with each map having info_landmark_entry and info_landmark_exit entities to stitch consecutive maps.

Visible skybox seams

GL_CLAMP_TO_EDGE doesn't help.
Valve wiki suggests that it's a DXT issue (?).

Windows support

Probably limited to this:

  • file reader
  • file mmapper
  • gl function loader
  • make sure that atto doesn't have any obvious bugs on windows
  • grab mouse + WM_INPUT

doesn't build in VS2017

The code doesn't build in VS2017 on Windows 10 Home. This is quite odd, the project should have been easy to migrate.

the include paths are not set up right (so it cant find the headers), and app_windows.c/.h are missing.

I can't wait to get this working though!

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.