The International Simutrans Forum

Development => Extension Requests => Topic started by: Isaac Eiland-Hall on July 15, 2009, 02:28:13 AM

Title: minimum map size to 1x1 or at least something very small
Post by: Isaac Eiland-Hall on July 15, 2009, 02:28:13 AM
EDIT: Editing title to match information from posts below.

MODIFIED REQUEST: per patch in post below; a request to allow tiny map sizes. (My original request was for 32x32 instead of 64x64, but in reality, playing a 4x10000 map would also be fun... and leaving the arrow buttons to a minimum of 64x64 seems fair - just allowing text override :D )

ORIGINAL POST FOLLOWS: Would it be possible to have an option somewhere (i.e. simuconf.tab, just so it doesn't mess with people who don't want) to be able to change the mapsize changes from 64 down to 32?

And, in a related issue, if that's enabled, can the minimum map size be 32x32?

Reason I ask: I'm getting where I like to go 64x64 and expand  out in one direction, but I'd like it even better if I could start at 32x32 with one city, and then expand in one direction in 32 increments...

Is that decently easy by any chance? :D

Title: Re: mapsize change by 32 instead of 64
Post by: gerw on July 15, 2009, 06:20:35 AM
Mmh. You can input arbitrary numbers (but only >= 64) via the input field. Maybe we should set the minimal map-size to 1x1 (but this should not be choose-able with the arrows), to satisfy all crazy guys out there  :D

Anyway, there is a related bug: if you choose ugly map sizes like 92x92, you can decrease you map size via the enlarge-map dialogue and simutrans will crash...

Edit: Here is a patch - only for you  ;)
Index: gui/welt.cc
===================================================================
--- gui/welt.cc (revision 2577)
+++ gui/welt.cc (working copy)
@@ -83,7 +83,7 @@
        inp_x_size.set_groesse(koord(RIGHT_ARROW-LEFT_ARROW+10, 12));
        inp_x_size.add_listener(this);
        inp_x_size.set_value( sets->get_groesse_x() );
-       inp_x_size.set_limits( 64, min(32766,4194304/sets->get_groesse_y()) );
+       inp_x_size.set_limits( 1, min(32766,4194304/sets->get_groesse_y()) );
        inp_x_size.set_increment_mode( sets->get_groesse_x()>=512 ? 128 : 64 );
        inp_x_size.wrap_mode( false );
        add_komponente( &inp_x_size );
@@ -92,7 +92,7 @@
        inp_y_size.set_pos(koord(LEFT_ARROW,intTopOfButton) );
        inp_y_size.set_groesse(koord(RIGHT_ARROW-LEFT_ARROW+10, 12));
        inp_y_size.add_listener(this);
-       inp_y_size.set_limits( 64, min(32766,4194304/sets->get_groesse_x()) );
+       inp_y_size.set_limits( 1, min(32766,4194304/sets->get_groesse_x()) );
        inp_y_size.set_value( sets->get_groesse_y() );
        inp_y_size.set_increment_mode( sets->get_groesse_y()>=512 ? 128 : 64 );
        inp_y_size.wrap_mode( false );
@@ -351,13 +351,13 @@
        if(komp==&inp_x_size) {
                sets->set_groesse_x( v.i );
                inp_x_size.set_increment_mode( v.i>=512 ? 128 : 64 );
-               inp_y_size.set_limits( 64, min(32766,16777216/sets->get_groesse_x()) );
+               inp_y_size.set_limits( 1, min(32766,16777216/sets->get_groesse_x()) );
                update_preview();
        }
        else if(komp==&inp_y_size) {
                sets->set_groesse_y( v.i );
                inp_y_size.set_increment_mode( v.i>=512 ? 128 : 64 );
-               inp_x_size.set_limits( 64, min(32766,16777216/sets->get_groesse_y()) );
+               inp_x_size.set_limits( 1, min(32766,16777216/sets->get_groesse_y()) );
                update_preview();
        }
        else if(komp==&inp_number_of_towns) {


Edit2:
A 1x1 map is not really satisfying me  ;D
(http://www.tu-chemnitz.de/~gerw/patches/pics/1x1.png)
Title: Re: mapsize change by 32 instead of 64
Post by: Dwachs on July 15, 2009, 08:29:26 AM
you can enlarge to 2x2 and built a cycle line (after demolishing the depot ofc)  ;D
Title: Re: mapsize change by 32 instead of 64
Post by: Isaac Eiland-Hall on July 15, 2009, 09:08:02 AM
Quote from: gerw on July 15, 2009, 06:20:35 AM
Mmh. You can input arbitrary numbers (but only >= 64) via the input field.

:o didn't realize that :D

QuoteMaybe we should set the minimal map-size to 1x1 (but this should not be choose-able with the arrows), to satisfy all crazy guys out there  :D
It definitely seems like something not to make too obvious... :)

QuoteAnyway, there is a related bug: if you choose ugly map sizes like 92x92, you can decrease you map size via the enlarge-map dialogue and simutrans will crash...
I promise not to complain, and further - if I see a post where someone does complain, I'll hop in and explain. :D

QuoteEdit: Here is a patch - only for you  ;)
;D

QuoteEdit2:
A 1x1 map is not really satisfying me  ;D
(http://www.tu-chemnitz.de/~gerw/patches/pics/1x1.png)
XD

Ah, how does the patch process normally work? I'm assuming this is a patch that Prissi would approve or deny, and that if approved, it'd show up in a nightly or something?

...and if it is decreased to 1x1, I will totally create a 4x10000(or so) map XD
Title: Re: minimum map size to 1x1 or at least something very small
Post by: gerw on July 15, 2009, 01:34:12 PM
Quote from: Dwachs on July 15, 2009, 08:29:26 AM
you can enlarge to 2x2 and built a cycle line (after demolishing the depot ofc)  ;D
You can't raise the land on a 2x2 map. Steep slopes aren't allowed directly at the borders. So you need at least a 4x4 map for a circle line - without stops :)

Quote from: Isaac.Eiland-Hall on July 15, 2009, 09:08:02 AM
Ah, how does the patch process normally work? I'm assuming this is a patch that Prissi would approve or deny, and that if approved, it'd show up in a nightly or something?
Imho, this is a patch prissi rather deny than approve :) So you have to patch and compile simutrans yourself. Or someone has to write a better, fool-proof patch, than the above is...
Title: Re: minimum map size to 1x1 or at least something very small
Post by: prissi on July 15, 2009, 07:27:27 PM
I just would set this minimum to 8, but apart from that why not?
Title: Re: minimum map size to 1x1 or at least something very small
Post by: Isaac Eiland-Hall on July 15, 2009, 07:46:55 PM
I, for one, could live with that! :D
Title: Re: minimum map size to 1x1 or at least something very small
Post by: Dwachs on July 20, 2009, 07:42:57 PM
Please try nightlies from revision 2586 :)
Title: Re: minimum map size to 1x1 or at least something very small
Post by: IgorEliezer on July 20, 2009, 10:07:43 PM
Isaac will blow up for happiness.
Title: Re: minimum map size to 1x1 or at least something very small
Post by: Isaac Eiland-Hall on July 21, 2009, 09:19:29 AM
:o

Well, I was planning on getting some real work done, but I guess I'll have to go download nightlies instead...

:D

EDIT: 16x8192... ah, it's beautiful. And I just expanded it to 24x8192 with no new cities so I could make uninhibited rail... :D
Title: Re: minimum map size to 1x1 or at least something very small
Post by: IgorEliezer on July 21, 2009, 11:20:05 AM
Quote from: Isaac.Eiland-Hall on July 21, 2009, 09:19:29 AMEDIT: 16x8192... ah, it's beautiful.

Architect says: "16x8192... urgh, what a horrid." :-X

(;D)
Title: Re: minimum map size to 1x1 or at least something very small
Post by: Spike on July 21, 2009, 11:44:37 AM
That was a pipedream, I think  ;D