Freeform map edges (in trunk since 15190)
Moderator: OpenTTD Developers
Re: Freeform map edges
Damn, you young guys are pretty smart! It causes me to reminisce about my youth spent in front my Commodore PET, programming 4K programs in BASIC. And no one to know how good i was at it!!
I'm watching this thread with great interest, esp. in relation to its final Inclusion! Keep perfecting and expanding it!
I'm watching this thread with great interest, esp. in relation to its final Inclusion! Keep perfecting and expanding it!
Re: Freeform map edges
I tried to patch it with TortoiseSVN (instead of msys patch command) and it worked fine. First time I need to do it, it's strange .
The patch is looking great. Good work!
The patch is looking great. Good work!
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Re: Freeform map edges
Did you try v2 or v3? I just uploaded a new version to the first post.Terkhen wrote:I tried to patch it with TortoiseSVN (instead of msys patch command) and it worked fine. First time I need to do it, it's strange .
The patch is looking great. Good work!
Re: Freeform map edges
I was trying v2. It's strange, but v3 gives the same error even when patched with TortoiseSVN. It compiles without problems in linux, but I can't understand why not with msys and mingw. Unfathomable errors like these ones make me ask myself why I even like computers to begin with
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
- stevenh
- TTDPatch Developer
- Posts: 759
- Joined: 24 Jul 2005 05:07
- Location: Canberra, Australia
- Contact:
Re: Freeform map edges
I still don't understand how little changes like this can make such a big difference (in a good way)... This is an awesome patch and I love it.
Does this have any effect on the issues of building industries, etc... close to make edges? It would then make sense to me to lessen all those restrictions?
Well done Yexo, it's a great idea.
Does this have any effect on the issues of building industries, etc... close to make edges? It would then make sense to me to lessen all those restrictions?
Well done Yexo, it's a great idea.
Re: Freeform map edges
i am really impressed - this is a very nice patch Yexo
i just hope it is something the devs will like and perhaps see it one day in trunk - until then, lets do the best we can to get it ready for that!
personal suggestion would be a openttdcoop.dev game with it, to find as many bugs as we can - you know how that works, more eyes see more glitches
i just hope it is something the devs will like and perhaps see it one day in trunk - until then, lets do the best we can to get it ready for that!
personal suggestion would be a openttdcoop.dev game with it, to find as many bugs as we can - you know how that works, more eyes see more glitches
Re: Freeform map edges
I'm happy so many of you like this patch
I haven't changed any limits of building industries and I don't think changing those belong in this patch, as those limits can be changed by newgrf's.stevenh wrote:Does this have any effect on the issues of building industries, etc... close to make edges? It would then make sense to me to lessen all those restrictions?
I'd like it if we could organize that. As you say, more eyes spot more bugsdihedral wrote:personal suggestion would be a openttdcoop.dev game with it, to find as many bugs as we can - you know how that works, more eyes see more glitches
Re: Freeform map edges
I managed to compile v4 (it was something weird with my MinGW installation ). This is looking great
Anyways: I found a bug while trying to do something stupid!
Anyways: I found a bug while trying to do something stupid!
- Attachments
-
- Brendingbury Transport, 29th Feb 1960.png (41.8 KiB) Viewed 3971 times
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Re: Freeform map edges
That's more of a feature
Seriously, the only bug there is that the message is a bit odd, but that's already marked in the code as todo.
Seriously, the only bug there is that the message is a bit odd, but that's already marked in the code as todo.
Re: Freeform map edges
Cool patch.
The edges look a bit weird though, maybe do as some other games and make doted lines along the edge that's too high.
Something like this (I'm no GIMP expert though. )
The edges look a bit weird though, maybe do as some other games and make doted lines along the edge that's too high.
Something like this (I'm no GIMP expert though. )
- Attachments
-
- dotted_lines.png (11.32 KiB) Viewed 3833 times
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Freeform map edges
I like the edges as they are now (plain black), so it looks as if it´s a segment cutted out of the landscape. If you need a special border, why don´t stay with water?
regards
Michael
regards
Michael
-
- Chairman
- Posts: 776
- Joined: 20 Jan 2007 12:08
- Location: Germany
Re: Freeform map edges
I agree, having the (non-usable) map edges look like a continuation of the map makes only sense for water edges, IMHO.michael blunck wrote:I like the edges as they are now (plain black), so it looks as if it´s a segment cutted out of the landscape. If you need a special border, why don´t stay with water?
Having the map edge look like a vertical cut through the underground, though, may look appealing, but may be hard to implement with the way how graphics output works in OpenTTD.
Just leaving it black, doesn't look that bad, either. Anything artificial, like dotted lines, definitely looks weird, IMHO.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
Re: Freeform map edges
I used the Version v4 and got these warnings: (on amd64)
If you build a railtrack at the north-west edge it segfaults if some time is passes until the world generated fences at the railtrack.
And I'm not sure if it is a bug or feature but if you delete all water on the map by rising the map you don't get it back. Maybe it should come back if you lower the map at the edges (and maybe depending on the edge settings at map generation.)
Dont know if a drop-box with all 16 possibilites of water edges is a good way to select which edge should have waters and which not. Maybe there should be checkboxes/buttons to enable/disable water on this edge during map creation. There should also be a random setting.
If you play a big map (512^2) with flat, smooth land and the lowest water amount and without any water edges it happends that there are some small water lakes at the edges with an unrealistig amount of light houses. If you have autorail activated and moves the mouse outside the map the autorail white track is jumping around the edge, it looks strange.
If you try to build a station at the south-east or south-west edge it shows a location which is not possible (don't know it it is in trunk too). About the dotted lines at the south borders, I suggest only use borders for the sea level and for the corners itself, maybe in gray or brown. So you can easily see how height the tiles at the edges are.
If you generate a subtropic map, it asserts with: (depending on the edge setting)
You cannot build industries at the north edges, you must have a space of 2 tiles, but this restriction is dropped for industries at the south edges.
Build a harbor at one of a north edge and it asserts with the following message if you try to delete it again:
It also asserts with this error message if you build the harbor one tile away of the (north) edge and pointing to the edge (so the ships cannot reach the harbor).
Bug or Feature: You cannot build a depot at the edge pointing to the edge.
Code: Select all
/home/progman/openttd/trunk/src/heightmap.cpp: In function 'void FixSlopes()':
/home/progman/openttd/trunk/src/heightmap.cpp:400: warning: comparison between signed and unsigned integer expressions
/home/progman/openttd/trunk/src/heightmap.cpp:405: warning: comparison between signed and unsigned integer expressions
Dont know if a drop-box with all 16 possibilites of water edges is a good way to select which edge should have waters and which not. Maybe there should be checkboxes/buttons to enable/disable water on this edge during map creation. There should also be a random setting.
If you play a big map (512^2) with flat, smooth land and the lowest water amount and without any water edges it happends that there are some small water lakes at the edges with an unrealistig amount of light houses. If you have autorail activated and moves the mouse outside the map the autorail white track is jumping around the edge, it looks strange.
If you try to build a station at the south-east or south-west edge it shows a location which is not possible (don't know it it is in trunk too). About the dotted lines at the south borders, I suggest only use borders for the sea level and for the corners itself, maybe in gray or brown. So you can easily see how height the tiles at the edges are.
If you generate a subtropic map, it asserts with:
Code: Select all
openttd: /home/progman/openttd/trunk/src/tile_map.h:193: TropicZone GetTropicZone(TileIndex): Assertion `tile < MapSize()' failed.
You cannot build industries at the north edges, you must have a space of 2 tiles, but this restriction is dropped for industries at the south edges.
Build a harbor at one of a north edge and it asserts with the following message if you try to delete it again:
Code: Select all
openttd: /home/progman/openttd/trunk/src/tile_map.h:70: TileType GetTileType(TileIndex): Assertion `tile < MapSize()' failed.
Bug or Feature: You cannot build a depot at the edge pointing to the edge.
Last edited by Progman on 17 Dec 2008 17:04, edited 1 time in total.
Re: Freeform map edges
As a related patch I think it will be important to revise lighthouse and oil rig placement, prehaps putting them only in/on the edge of "large" pieces of water, though I'm not sure what algorithm you could use to do this...
Re: Freeform map edges
And another bug: If you place a town (3x3 road layout) in the scenario editor near the edge and increase the size it sometimes asserts (depending on start location of the town):
Code: Select all
openttd: /home/progman/openttd/trunk/src/tile_map.h:70: TileType GetTileType(TileIndex): Assertion `tile < MapSize()' failed
Re: Freeform map edges
Thanks a lot for testing it.Progman wrote:I used the Version v4
Fixed.and got these warnings: (on amd64)Code: Select all
/home/progman/openttd/trunk/src/heightmap.cpp: In function 'void FixSlopes()': /home/progman/openttd/trunk/src/heightmap.cpp:400: warning: comparison between signed and unsigned integer expressions /home/progman/openttd/trunk/src/heightmap.cpp:405: warning: comparison between signed and unsigned integer expressions
I think I already fixed this, most likely just after I uploaded v4.If you build a railtrack at the north-west edge it segfaults if some time is passes until the world generated fences at the railtrack.
I'm not sure what the expected behavior is in this case. Normally water is only restored by flooding from neighbouring tiles, but as soon as there are no tiles with water left this is a problem. Other opinions on the best solution here?And I'm not sure if it is a bug or feature but if you delete all water on the map by rising the map you don't get it back. Maybe it should come back if you lower the map at the edges (and maybe depending on the edge settings at map generation.)
I'll add a random setting. Again, I'm not sure on the best solution here. 16 items for the dropdown box may be a bit much, but I don't like to split it into 4 checkboxes either.Dont know if a drop-box with all 16 possibilites of water edges is a good way to select which edge should have waters and which not. Maybe there should be checkboxes/buttons to enable/disable water on this edge during map creation. There should also be a random setting.
I've changed the lighthouse building so lighthouses are only build near an edge with water (also if there is only a little bit water), but the total number of lighthouses also needs to be reduced. I'll see what I can do here.If you play a big map (512^2) with flat, smooth land and the lowest water amount and without any water edges it happends that there are some small water lakes at the edges with an unrealistig amount of light houses.
Same behavior can be seen in trunk.If you have autorail activated and moves the mouse outside the map the autorail white track is jumping around the edge, it looks strange.
Same in trunk, so this can be reported to FS.If you try to build a station at the south-east or south-west edge it shows a location which is not possible (don't know it it is in trunk too).
For now I'll just leave the plain black. I don't like the dotted lines for the whole border, but maybe drawing foundations would be better.About the dotted lines at the south borders, I suggest only use borders for the sea level and for the corners itself, maybe in gray or brown. So you can easily see how height the tiles at the edges are.
FixedIf you generate a subtropic map, it asserts with:(depending on the edge setting)Code: Select all
openttd: /home/progman/openttd/trunk/src/tile_map.h:193: TropicZone GetTropicZone(TileIndex): Assertion `tile < MapSize()' failed.
FixedYou cannot build industries at the north edges, you must have a space of 2 tiles, but this restriction is dropped for industries at the south edges.
Both fixed.Build a harbor at one of a north edge and it asserts with the following message if you try to delete it again:It also asserts with this error message if you build the harbor one tile away of the (north) edge and pointing to the edge (so the ships cannot reach the harbor).Code: Select all
openttd: /home/progman/openttd/trunk/src/tile_map.h:70: TileType GetTileType(TileIndex): Assertion `tile < MapSize()' failed.
FeatureBug or Feature: You cannot build a depot at the edge pointing to the edge.
Fixed.Progman wrote:And another bug: If you place a town (3x3 road layout) in the scenario editor near the edge and increase the size it sometimes asserts (depending on start location of the town):Code: Select all
openttd: /home/progman/openttd/trunk/src/tile_map.h:70: TileType GetTileType(TileIndex): Assertion `tile < MapSize()' failed
I've uploaded the new version the to first post. Still todo:
- South edges:
1) Keep them black
2) Draw lines
3) Change the black to foundations (or something that looks like that)
- Add a random option for the border that'll be water.
- Reduce the amount of lighthouses build when there is not so much water at the borders.
-
- OpenTTD Developer
- Posts: 351
- Joined: 03 Oct 2006 18:26
- Location: Prague, Czech Republic
- Contact:
Re: Freeform map edges
I like that behaviour Progman suggested. It behaves the same in SimCity 2000 (IIRC).Yexo wrote:I'm not sure what the expected behavior is in this case. Normally water is only restored by flooding from neighbouring tiles, but as soon as there are no tiles with water left this is a problem. Other opinions on the best solution here?And I'm not sure if it is a bug or feature but if you delete all water on the map by rising the map you don't get it back. Maybe it should come back if you lower the map at the edges (and maybe depending on the edge settings at map generation.)
Is there any reason for keeping MP_VOID tiles?
Re: Freeform map edges
So all tiles at the map edges that are flat at height 0 should be flooded? I'll try to implement that tomorrow.SmatZ wrote:I like that behaviour Progman suggested. It behaves the same in SimCity 2000 (IIRC).Yexo wrote:I'm not sure what the expected behavior is in this case. Normally water is only restored by flooding from neighbouring tiles, but as soon as there are no tiles with water left this is a problem. Other opinions on the best solution here?And I'm not sure if it is a bug or feature but if you delete all water on the map by rising the map you don't get it back. Maybe it should come back if you lower the map at the edges (and maybe depending on the edge settings at map generation.)
Yes, it's the most simple way for detecting map edges: basically if IsValidTile(tile + TileXY(-1/0/1, -1/0/1)) fails you're at an edge. It may be possible to remove them but I think that's not worth the effort (and totally outside the scope of this patch).Is there any reason for keeping MP_VOID tiles?
Re: Freeform map edges (v5)
I like the idea of foundation-like graphics at the edge, but some dedicated "earthy" foundation graphics would also be nice, would you like me to draw some ?
- nicfer
- Director
- Posts: 529
- Joined: 03 May 2005 20:50
- Location: Somewhere in a country called Argentina
Re: Freeform map edges (v5)
How about using the temperate slope foundations? They would not look that bad and there would be no work on graphics side.
Sorry for my english I am argentinian
TTO don't crashes in Windows XP; XP crashes TTO
Formerly known as UnderBuilder.
MyMiniCity
TTO don't crashes in Windows XP; XP crashes TTO
Formerly known as UnderBuilder.
MyMiniCity
Who is online
Users browsing this forum: ZaphodB and 56 guests