Command-Line Options

Open-source port of PoP that runs natively on Windows, Linux, etc.
Post Reply
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Command-Line Options

Post by Norbert »

Maybe add
--version (and -v)
It could simply do:
printf ("SDLPoP %s\n", SDLPOP_VERSION);

Maybe add
--help (and -h and -?)
It could simply do:
printf ("See doc/Readme.txt\n");

These two are common on GNU/Linux (info).

Maybe also add
seed=NR
It could force the program to use the supplied random seed.
The latter might make creating replays easier.
User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 227
Joined: February 17th, 2016, 1:59 pm
Location: Brazil
Contact:

Re: Command-Line Options

Post by oitofelix »

Norbert wrote:These two are common on GNU/Linux (info).
If it's of any use, MININIM implements that using GNU C library's argp.
Norbert wrote:Maybe also add
seed=NR
It could force the program to use the supplied random seed.
The latter might make creating replays easier.
Could you explain why you find that useful? Perhaps it's applicable to MININIM as well.
Bruno Félix Rezende Ribeiro (oitofelix)
MININIM author
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Command-Line Options

Post by Norbert »

oitofelix wrote:
Norbert wrote:Maybe also add
seed=NR
It could force the program to use the supplied random seed.
The latter might make creating replays easier.
Could you explain why you find that useful? Perhaps it's applicable to MININIM as well.
I actually thought MININIM already had the option.
If it does not, the same suggestion for MININIM.
Why: might make creating replays easier; might one day be useful for replicating/testing something.
User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 227
Joined: February 17th, 2016, 1:59 pm
Location: Brazil
Contact:

Re: Command-Line Options

Post by oitofelix »

Norbert wrote:might make creating replays easier
How so? Do you have any particular situation in mind? An example you may provide?
Norbert wrote:might one day be useful for replicating/testing something.
Indeed. That's reason enough to implement that. Thanks for the suggestion.

PS: Of course, this is only useful for implementations that make careful use of their random number generators. Otherwise, that won't guarantee reproducibility. That should be the case for any implementation having replays, though.
Bruno Félix Rezende Ribeiro (oitofelix)
MININIM author
User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 227
Joined: February 17th, 2016, 1:59 pm
Location: Brazil
Contact:

Re: Command-Line Options

Post by oitofelix »

Norbert wrote:Maybe add
--version (and -v)
It could simply do:
printf ("SDLPoP %s\n", SDLPOP_VERSION);
By the way, in SDLPoP, CTRL+V prints "PRINCE OF PERSIA V1.0". That's not accurate. Wouldn't it be better to show "SDLPOP V1.17"?
Bruno Félix Rezende Ribeiro (oitofelix)
MININIM author
User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 227
Joined: February 17th, 2016, 1:59 pm
Location: Brazil
Contact:

Re: Command-Line Options

Post by oitofelix »

Norbert wrote:I actually thought MININIM already had the option.
If it does not, the same suggestion for MININIM.
That has been implemented in the latest MININIM release.
Bruno Félix Rezende Ribeiro (oitofelix)
MININIM author
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Command-Line Options

Post by David »

Done both the command line and the Ctrl+V: https://github.com/NagyD/SDLPoP/commit/ ... 7b8ecf51d8
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Command-Line Options

Post by Norbert »

oitofelix wrote:That has been implemented in the latest MININIM release.
David wrote:Done both the command line and the Ctrl+V: https://github.com/NagyD/SDLPoP/commit/ ... 7b8ecf51d8
Neat (2x).

So, is anything in particular stopping version 1.17 from being released?
Maybe you want to include Falcury's icon, or?
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Command-Line Options

Post by David »

Norbert wrote:So, is anything in particular stopping version 1.17 from being released?
Just good old laziness. :)

Here it is: viewtopic.php?p=20558#p20558
Falcury
Calif
Calif
Posts: 565
Joined: June 25th, 2009, 10:01 pm

Re: Command-Line Options

Post by Falcury »

Norbert wrote:Maybe you want to include Falcury's icon, or?
Should I make a pull request for that?

Edit:
I opened a pull request. But, feel free to close it again if you think it's better not to use that icon.
Post Reply