Git Product home page Git Product logo

Comments (8)

snake-biscuits avatar snake-biscuits commented on July 23, 2024

Titanfall2 / Apex Legends .save_as doesn’t respect external lumps, see #12 for more

from bsp_tool.

snake-biscuits avatar snake-biscuits commented on July 23, 2024

Titanfall2 / Apex Legends .save_as doesn’t respect external lumps, see #12 for more

This has been addressed now, but we do need automated testing to ensure this remains stable.

All an automated test needs to confirm (for now) is that loading and saving a .bsp matches the source file byte-for-byte

from bsp_tool.

snake-biscuits avatar snake-biscuits commented on July 23, 2024

All base.Bsp subclasses with their unique _preload methods will need their own implementation of the save_as method
Inheritance should cover any .bsp this doesn't apply to (e.g. GoldSrcBsp inherits _preload from QuakeBsp)

from bsp_tool.

snake-biscuits avatar snake-biscuits commented on July 23, 2024

All base.Bsp subclasses with their unique _preload methods will need their own implementation of the save_as method

The top comment tracks each base.Bsp subclass this applies to, but their subclasses should also be tested to be sure
For ensuring save_as remains stable we will need enough maps for each branch_script to test the contents of every lump
Any edge cases that arise in SpecialLumpClasses etc. will also need to be permanently tracked with a map & test for that issue

During the initial development of each .save_as method we should also confirm each map against at least 1 game (test it runs)
Occasionally doing this with test maps going forward would also be useful.
Keeping a mental image of how the map should function will hopefully limit "coding in the dark"

from bsp_tool.

snake-biscuits avatar snake-biscuits commented on July 23, 2024

Automated testing for .as_bytes() methods will be a big help here
Probably something to implement in branch script testing

from bsp_tool.

snake-biscuits avatar snake-biscuits commented on July 23, 2024

#112 shows that we need to test all .as_bytes() methods, specifically for SpecialLumpClasses
Explicitly! Not just indirect testing through .save_as()

Building tests to support .save_as() is bringing out the deep code coverage
Which is great because it means assumptions are getting drawn out & confronted

from bsp_tool.

snake-biscuits avatar snake-biscuits commented on July 23, 2024

tests/test_save.py needs to be content aware, otherwise saves must be byte-for-byte

refactors to extensions.diff should now cover this
still need some specialised classes for diffing SpecialLumpClasses
but the refactor has standardised how to do that and is much more modular now

from bsp_tool.

snake-biscuits avatar snake-biscuits commented on July 23, 2024

#143 found some bugs w/ RespawnBsp.save_as()
Going to open a new Issue for testing all RespawnBsp's cases in a bit

from bsp_tool.

Related Issues (20)

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.