Command-Line Options

Open-source port of PoP that runs natively on Windows, Linux, etc.

Moderator: English Moderator Team

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3024
Joined: April 9th, 2009, 10:58 pm
Contact:

Command-Line Options

Postby Norbert » January 12th, 2017, 6:28 pm

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
Sultan
Sultan
Posts: 189
Joined: February 17th, 2016, 1:59 pm
Contact:

Re: Command-Line Options

Postby oitofelix » January 12th, 2017, 6:42 pm

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.

Code: Select all

 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/mininim/
 88888  FFFF  mailto:oitofelix@gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     Please, support my work: http://oitofelix.freeshell.org/funding.html

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3024
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Command-Line Options

Postby Norbert » January 12th, 2017, 7:05 pm

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
Sultan
Sultan
Posts: 189
Joined: February 17th, 2016, 1:59 pm
Contact:

Re: Command-Line Options

Postby oitofelix » January 12th, 2017, 7:32 pm

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.

Code: Select all

 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/mininim/
 88888  FFFF  mailto:oitofelix@gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     Please, support my work: http://oitofelix.freeshell.org/funding.html

User avatar
oitofelix
Sultan
Sultan
Posts: 189
Joined: February 17th, 2016, 1:59 pm
Contact:

Re: Command-Line Options

Postby oitofelix » January 12th, 2017, 9:35 pm

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"?

Code: Select all

 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/mininim/
 88888  FFFF  mailto:oitofelix@gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     Please, support my work: http://oitofelix.freeshell.org/funding.html

User avatar
oitofelix
Sultan
Sultan
Posts: 189
Joined: February 17th, 2016, 1:59 pm
Contact:

Re: Command-Line Options

Postby oitofelix » January 13th, 2017, 4:17 am

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.

Code: Select all

 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/mininim/
 88888  FFFF  mailto:oitofelix@gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     Please, support my work: http://oitofelix.freeshell.org/funding.html

David
The Prince of Persia
The Prince of Persia
Posts: 1402
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Command-Line Options

Postby David » January 15th, 2017, 12:19 pm

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: 3024
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Command-Line Options

Postby Norbert » January 15th, 2017, 4:53 pm

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: 1402
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Command-Line Options

Postby David » January 21st, 2017, 7:50 pm

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
Wise Scribe
Wise Scribe
Posts: 300
Joined: June 25th, 2009, 10:01 pm

Re: Command-Line Options

Postby Falcury » January 22nd, 2017, 1:09 pm

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.


Return to “SDLPoP”

Who is online

Users browsing this forum: No registered users and 2 guests