Comments (4)
Some archives are nested, for example:
mappack.7z/surf.rar/maps/surf_exquisite.zip/Fortress Forever/custom/mymod/maps/surf_exquisite.bsp.bz2
have fun walking those, will definitely want to implicitly tell the lump system to just keep the whole file in memory
oh and don't forget the .cdi
/ .iso
/ .cue
+ .bin
format for Quake III on the Dreamcast w/ nested .zip
s
We could drastically simplify building the MegaTest library if we walked these paths, at the cost of execution time
from bsp_tool.
Indexing into Dreamcast & Xbox360 disc images could get hairy
Quake III (Dreamcast): quakeiii.cdi/quakeiii.16.iso/QUAKE3/BASEQ3/MAPS/DC_MAP01/BSP.ZIP/maps/dc_map01.bsp
Three nested unique archive formats! (.cdi
, .iso
& .zip
)
Orange Box (Xbox360): HalfLife2_TheOrangeBox.iso/
Source Engine Xbox 360 .iso
XISO files are different to regular .iso, though can be interpreted as such
Assets (models, textures, audio etc.) are stored in a special .zip
format for Little-Endian
Maps are just in the XISO filesystem
from bsp_tool.
Good luck writing back to the archive, unless you want to add a Read-Only mode...
Read-Only mode could be really powerful for faster tests!
It turns out that part of the RAM & time consumption of reading Apex Legends .bsp
files comes from how python handles files
file.close()
has to flush a buffer the size of the whole file, which is ridiculous for Apex Legends ~400 MB .bsp
Especially when you consider that .bsp_lump
files roughly double that size, making a single map close to 1GB!
Unsure if using the with
keyword is any faster
But if a read-only mode speeds up the MegaTest it'd be 100% worth the effort
from bsp_tool.
Look into using python's builtin bytearray
(or bytearray-like behaviour) for RawBspLumps
The mmap
module also looks convenient for handling files
TODO: test
mmap
read & close speeds on large files
Faking in-memory files w/ the io
module is also pretty handy
Python file read costs in general could use more research, but also testing different approaches for read, write & close speeds
from bsp_tool.
Related Issues (20)
- [Test Maps] `source_filmmaker` HOT 1
- [Test Maps] `zeno_clash`
- [Test Maps] `apex_legends51` HOT 1
- Canβt save edits to Titanfall RespawnBsps HOT 3
- Capture Compiler Signatures HOT 3
- Unmapped Static Prop lumps HOT 6
- LICENSE file is MIT not GPLv3 HOT 1
- Is possible and how ? Convert maps of valve maps , little to big endiand, in other words pc to x360 HOT 4
- Increasing performance for large `.bsp` files HOT 3
- branch_script methods need regression testing
- Prepare for `0.4.0` PyPI release HOT 5
- Test maps for Static Props HOT 8
- ENTITIES values contained symbols "{" "}" don't read HOT 2
- [Test Maps] `merubasu` HOT 3
- [Test Maps] `call_of_duty1_demo`
- [Test Maps] `star_trek_elite_force2_demo`
- Lost formats
- Refactor MappedArray
- [Test Maps] `vindictus69` HOT 5
- [Test Maps] `outerlight` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bsp_tool.