Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: OpenLara level pack format support #468

Open
ionlight4096 opened this issue Jul 14, 2023 · 1 comment
Open

Idea: OpenLara level pack format support #468

ionlight4096 opened this issue Jul 14, 2023 · 1 comment

Comments

@ionlight4096
Copy link

Hello, great project you have here.

So I have an idea: Maybe create an OpenLara specific level pack format?

Instead of hard coding levels' names and level progressions and searching for lots of separate files at the game's startup (and answering zillions of questions "where should I put my data? what format is required? why are some files missing?"), the engine could be started with a single param pointing to the desired level pack. Like this: ./openlara -pack tr1.zip

What I came up with (still WIP):
Basically a zip file with a manifest file and a fixed directory structure.
Inside zip file there are levels, fmvs, load screens/credits pictures and language files in gettext format.
Manifest contains game info, levels info (level title, level file, exits to other levels (will come in handy for TR4), inventory modifications on level enter) and subtitles, which can be shown when a corresponding audio/video file is played. Subtitles can also be localized with gettext.
Here's an example of directory structure:

manifest.xml
audio/
	002.ogg
	003.ogg
	...
languages/
	en_US.mo
	ru.mo
	...
levels/
	level1.phd
	cut1.phd
	snow.avi
	...
pix/
	gym.png
	title.png
	cred1.png
	cred2.png
	...

Here's an example manifest for TR1 (incomplete):
example_manifest.txt
I chose XML because it's fully platform independent, easy to read and edit, it can be validated and transformed on the go with XSD and XSLT (and because I just like it :) )
If that sounds interesting, I could also assist in creating a separate multiplatform tool for validating and editing level packs (maybe not in C++ since I'm more familiar with Java and Python, but as long as it builds to a binary executable, it's fine).

Of course with a dedicated level pack format it will be easier to pack custom levels or even custom TR-based games.

@XProger
Copy link
Owner

XProger commented Jul 14, 2023

Hi, it's great idea, but the original game data is under copyright protection, so the user should provide the data from his own copy ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants