jtrfp / terminal-recall

Engine remake for Terminal Velocity and Fury3
Eclipse Public License 1.0
58 stars 4 forks source link

Add commandline arguments #268

Closed Jpxe closed 2 years ago

Jpxe commented 2 years ago

Would be great to have command line arguments for both loading the game asset files and enable full screen.

Especially when using it together with Steam in Luxtorpeda: https://github.com/luxtorpeda-dev/luxtorpeda

cjritola commented 2 years ago

Ah I see: It supports Terminal Velocity through Terminal Recall (TRCL) with "Need to configure the paths to the POD files using the in-game configuration menu for the first time. "

What you/they are looking to do is pack and deploy the game PODs with TRCL and pre-configure it for that console(-like) environment such that it "just works" if I'm correct?

As an interim hack, it should be possible to pack in a preliminary XML config file with the POD registrations specified if it is known where they will be when deployed. Currently the config file location is the home directory of the user running the program, named settings.config.trcl.xml

In the future, an ability to pack a maintainer's configuration file which overlays the existing user configuration file would be a good idea, with the option to either make certain settings permanent or override-able by the user. This would have the added benefit of the user being able to delete their own config file and the maintainer's defaults would survive.

The reason why I am leaning towards handling these things with the XML config file instead of some easy command line arguments is that the config file opens up /everything/ that already has a FeatureConfigurator without having to re-implement these configuration hooks in the command line.

Fullscreen is feasible. In the short term, is it tolerable for the menu bar to be visible at the top of the screen and accessed by mouse? There are plans for an option to run a pop-up menu in more conventional game-style. The inner mechanics are ready but the interface, not so much. This means that in the near-term, going to fullscreen would still show a menu bar at the top.

d10sfan commented 2 years ago

@cjritola For now, I could set up the launch script for luxtorpeda to create an xml file with the path (I can find it based on the current directory), or if it supports relative it could be static.

Either way, it would be there before the terminal recall application was launched.

Could you give an example of what the bare minimum would work for the xml file, for the paths and anything else in the configuration may be expecting if the xml file was there?

Jpxe commented 2 years ago

Ah I see: It supports Terminal Velocity through Terminal Recall (TRCL) with "Need to configure the paths to the POD files using the in-game configuration menu for the first time. "

What you/they are looking to do is pack and deploy the game PODs with TRCL and pre-configure it for that console(-like) environment such that it "just works" if I'm correct?

You are correct. I not the author but I would describe Luxtorpeda as a convenient and easy-to-use way to get game engine recreations up and running. So the less configuration the user has to do the better.

Fullscreen is feasible. In the short term, is it tolerable for the menu bar to be visible at the top of the screen and accessed by mouse? There are plans for an option to run a pop-up menu in more conventional game-style. The inner mechanics are ready but the interface, not so much. This means that in the near-term, going to fullscreen would still show a menu bar at the top.

Sure. Would be great to have true full screen and full controller support from start to finish sometime, if that could be feasible. Especially for use with the Steam Deck or for use with Steam in Big Picture Mode with a controller (on for example a TV).

cjritola commented 2 years ago

A number of changes have been made:

To test, the contents of Terminal Velcocity directory were copied from Steam to another directory. Directly editing results in changes being overwritten. Below are the changes made to the install:

export PATH="$PATH:./jdk-11.0.12+7/bin/" java -Dorg.jtrfp.trcl.maintSettingsPath=maint.config.trcl.xml -Dorg.jtrfp.trcl.userSettingsPath=user.config.trcl.xml -jar RunMe.jar


* Added a file to the same directory as `RunMe.jar`, named `maint.config.trcl.xml` with[ these contents](https://gist.github.com/cjritola/f9a5357f71a58336d6e07008a3cdf780).

The maintainer file is marked with comments and does the following:
* Automatically start Terminal Velocity.
* Enable full screen.
* Pre-specifies location of POD files
* Lockout user form leaving fullscreen mode.
* Lockout user from changing POD file paths.
* Lockout user from changing auto-start settings
d10sfan commented 2 years ago

@cjritola Thanks, I was able to update the luxtorpeda package with this, the new commit and that maintainer file. Looks great!

Jpxe commented 2 years ago

This is really great, thank you cjritola and d10sfan!