Giter VIP home page Giter VIP logo

quake-util's People

Contributors

4lt avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

quake-util's Issues

[qmap] Support texture names with spaces

Apparently QBSP supports texture names with spaces. But it doesn't support escaped quotes. But TrenchBroom does? Whee.

A) Handle whatever QBSP handles

B) Handle whatever TrenchBroom handles

C) Handle both with a switch, with default behavior rejecting anything ambiguous

Don't handle escape sequences. Read what can be read unambiguously only. Write without quotes if possible.

Parsing

  • "some text" lexes to token some text (starts and ends with quotes)
  • some"text lexes to token some"text (doesn't start with quote, contains quote)
  • so"me text" lexes to tokens so"me and text" (doesn't start with quote, contains quote and space)

Writing

  • "sometext" can't be written (starts with quote)
  • some"text is written as some"text (contains quote, no spaces)
  • some text is written as "some text" (contains space, no quote)
  • so"me text can't be written (contains space and quote)

Change validate to check_writable

Pros

  • Simplifies code
  • "invalid" maps may be useful under a different context (e.g. prefabs?)
  • Difficult to determine what will be "valid" or not before compiling

Cons

  • May result in needless duplication of code down the line (e.g. multiple crates implementing the same routines)

Alternatives

  • Don't leave validation on the map as a whole except for dicts (no duplicate keys), planes (non-degenerate triangles), and brushes (at least 4 planes). Don't invalidate worldspawn-less maps (2nd bullet of Pros), maps without player spawn (who knows what game the map is for) etc.

Rather...

Rename validate to check_writable and only focus on verifying what can be written to file and parsed back

Investigate interning strings

Perform benches on current state, and compare with interned strings.

Also check conversion to number at lexer stage.

Move test maps elsewhere

Maps are too big. Download maps from another source during testing/benchmarking. DO NOT require downloading just to build.

  • remove files from repo
  • upload files to ??? (digitalocean for now)
  • automate download of files during benchmark and/or test build
  • keep checksums of files in repo?

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.