Comments (14)
I've gone through RIS and eliminated the reliance on the .but and .img files that were hanging around (merged via commit 49a85a5). Those have been replaced with pngs that had been extracted previously by the RIS team or that I extracted. I haven't deleted the original files yet.
from raceintospace.
We've made a bunch of progress on this. Random data files have been replaced with PNGs one piece at a time, and #100 gives us a way to manipulate the graphics system independent of these crazy formats.
from raceintospace.
With serialization via cereal being included, it is possible to make progress on this. In many cases, the game uses files containing a big binary array of some internal data structure. For example, the file mission.dat is one big array of struct mStr. So if you want to get the mission with code 42, the game will seek() to 42*sizeof(struct mStr) and read the next bytes into the proper struct. There are several possibilities how we can proceed to convert these files into human-readable JSON files:
- Load all data files into memory when the game starts. Will significantly increase memory usage, but it's not 1992 anymore.
- Perform live deserialization of the required data file. Might be too slow for some of the bigger files, although rapidjson is pretty fast.
- Split the file into many small pieces, each containing one element of the array (e.g., mission_42.json). More cumbersome to work with these files.
- Keep the existing data formats, but automatically generate the datafiles from the corresponding JSON files during compile-time.
Opinions?
from raceintospace.
It would be exciting to finally ditch some of this hex file nonsense. I'm not a big fan of 3 or 4: replacing the hexadecimal files with easy-to-edit plaintext would be better, I think, and I'm not enthusiastic about splitting them into umpteen text files. I'm not sure I quite understand 2, but 1 sounds like it might be our best option.
from raceintospace.
Well, in 4 you also have an easy-to-edit JSON file in the source directory. It just gets translated to a binary file during the compilation of the game. Will probably require some CMake trickery (which is not exactly my area of expertise), but should be doable.
from raceintospace.
Well, however best you can do it, it would be a good thing - the main thing is to make the files easily moddable.
from raceintospace.
These suggestions could be helpful.
from raceintospace.
In #749, I went for option 2. Please report any issues with noticeable delays when flying a mission.
from raceintospace.
That's fantastic, that you've made some progress on converting a few of our binary files to plaintext. I'd love to see some of our really early Issues resolved - in addition to the whole "ease of modification" aspect.
from raceintospace.
Luckily, replacing fails.cdr by a JSON version turned out to be much easier than replacing the sequence files.
from raceintospace.
Great to hear.
from raceintospace.
I've just played most of a game. The change does seem to cause slight delays following missions, but no big deal.
However, when I was getting close to launching the Moon landing, the game crashed:
WARNING /home/leon/raceintospace/src/game/fs.cpp:279:try_find_file can't find file `PPIX_08.ogg' in audio dir(s)
unhandled exception: vector::_M_range_check: __n (which is 2954) >= this->size() (which is 2954)
Aborted (core dumped)
ppix_08.ogg does exist in raceintospace/data/video/mission/, so I'm not sure what's going on.
from raceintospace.
The warning is about a missing audio file during countdown and is unrelated to the crash. 2954 is the length of the vector holding the failure sequences, so it looks like that some sequence code couldn't be found and the index variable increased beyond the bounds of the vector. I will put in some additional checks that the game doesn't crash in such a situation.
from raceintospace.
In #774, I'm now going from Option 2 for deserialization (see #3 (comment)) to Option 1 as the delays from deserialization are quite significant in AI-vs-AI simulations.
from raceintospace.
Related Issues (20)
- Missing file HOT 15
- New Prestige First - Two-Capsule Rendezvous HOT 2
- Super-low morale in Basic Training?
- Mission movies not playing consistently HOT 2
- Money cheat not working HOT 1
- Mars probe got there already? HOT 3
- Bottom bar of Mission History is misbehaving HOT 10
- Game applied penalty when I agreed to scrub mission HOT 4
- Doc improvement: Environment setup for MacOS HOT 1
- Go directly to Astronaut Complex after withdrawing someone from Basic? HOT 2
- Help item for Launch Confirmation? HOT 1
- Docking Module at 62% HOT 6
- Space History icons HOT 5
- Bring back small screens in Mission Control? HOT 1
- Update Help files for menus HOT 2
- Return Injured recruits to Basic Training
- Additional keyboard shortcuts at spaceport?
- Awkwardness in Crew Assignment
- Have mission scheduled for one pad switch to another if pad destroyed? HOT 2
- Time for the release of 2.0? 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 raceintospace.