Freeform map edges (in trunk since 15190)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

michael blunck
Tycoon
Tycoon
Posts: 5271
Joined: 27 Apr 2005 07:09
Contact:

Re: Freeform map edges (v5)

Post by michael blunck » 18 Dec 2008 12:49

nicfer wrote:How about using the temperate slope foundations? They would not look that bad and there would be no work on graphics side.
Arrgh! Are you kidding?

Just leave it black as it is. This would look "sexy" - one more step away from the old cartoonish style. Or, if you really need, use a dark grey tone, but - for heaven´s sake - no pattern. Don´t ruin this feature by adding unnecessary or childish extra graphics.

regards
Michael
Image

User avatar
Korenn
Tycoon
Tycoon
Posts: 1628
Joined: 26 Mar 2004 01:27
Location: Netherlands, Enschede
Contact:

Re: Freeform map edges (v5)

Post by Korenn » 18 Dec 2008 12:51

I also like the option of displaying slopes at the edge.

Michael - don't dismiss the option without seeing what it looks like. On that note, if someone is feeling adventurous they could mock up a screenshot of what it would look like with lots of foundations at the edge. Easier to make a judgement call with some reference material :)

oh - and awesome patch. The original spinoff did the same thing, but I guess my way of implementing it wasn't up to ottd standards, because the developers didn't lift out the idea (thought they did lift out others).
Creator of the Openttd Challenge Spinoff, Town Demand patch
The path to riches, a report on playing on a daylength server on ultra hard mode.

User avatar
Ameecher
Tycoon
Tycoon
Posts: 11909
Joined: 12 Aug 2006 15:39
Location: MK UK
Contact:

Re: Freeform map edges (v5)

Post by Ameecher » 18 Dec 2008 12:54

Korenn wrote:I also like the option of displaying slopes at the edge.

Michael - don't dismiss the option without seeing what it looks like. On that note, if someone is feeling adventurous they could mock up a screenshot of what it would look like with lots of foundations at the edge. Easier to make a judgement call with some reference material :)

oh - and awesome patch. The original spinoff did the same thing, but I guess my way of implementing it wasn't up to ottd standards, because the developers didn't lift out the idea (thought they did lift out others).
I can confirm that that'd look awful. A whole layer of crazy paving would just terrible. If people felt that such a thing was needed, a grey would be perfect but black is easily as good. You can identify the heights by looking at the land that is acutally there.

It's been a long time coming but I love this feature. Brilliant! :D
Image

User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: Freeform map edges (v5)

Post by CommanderZ » 18 Dec 2008 13:13

Please, don't lose time making excessive eyecandy. You can be making something far more useful instead :D

michael blunck
Tycoon
Tycoon
Posts: 5271
Joined: 27 Apr 2005 07:09
Contact:

Re: Freeform map edges (v5)

Post by michael blunck » 18 Dec 2008 13:23

That needs no screenshot. I´m sorry, but if you can´t imagine how this would look, you may not be in the best position to judge. Sorry, no insult intended, just from an artist´s point of view.

Other than that, especially for maps with large height differences at the edges, even a simple grey tone could look too "heavy", because what you´ll get would be a massive additional "block" under the terrain.

But without (i.e. black), you´ll get a light, floating surface, as shown in the very first post. It totally convinced me at first sight!

Everything more is just bungling around.

regards
Michael
Image

User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Freeform map edges (v5)

Post by Gremnon » 18 Dec 2008 13:55

A suggestion then - on my OTTD build, I get the water off the edge of the map. So, where the land is not as sea-level, use the foundations as suggested, but only until it reaches sea-level, at which point... water.

That probably makes no sense at all, but I haven't had my morning coffee yet.

User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: Freeform map edges (v5)

Post by CommanderZ » 18 Dec 2008 14:00

Gremnon wrote:A suggestion then - on my OTTD build, I get the water off the edge of the map. So, where the land is not as sea-level, use the foundations as suggested, but only until it reaches sea-level, at which point... water.

That probably makes no sense at all, but I haven't had my morning coffee yet.
You get the water off the edge because you have activated a grf which does it. Disable it and you will be alright ;)

User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Freeform map edges (v5)

Post by Gremnon » 18 Dec 2008 14:18

Must be the OpenGFX graphics then, because it's still there even if I disable everything in my newGRF list.

User avatar
Zephyris
Tycoon
Tycoon
Posts: 2826
Joined: 16 May 2007 16:59

Re: Freeform map edges (v5)

Post by Zephyris » 18 Dec 2008 14:30

OpenGFX does have water at the map edges, thats the source of you problems, if (or when? fingers crossed!) this hits trunk i think openGFX will be updated to do something about this...

User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Freeform map edges (v5)

Post by Gremnon » 18 Dec 2008 14:33

A bit off the original topic, but maybe make water on the map edges toggle option in Advanced Settings.

Yexo
Tycoon
Tycoon
Posts: 3653
Joined: 20 Dec 2007 12:49

Re: Freeform map edges (v5)

Post by Yexo » 18 Dec 2008 14:40

Zephyris wrote:OpenGFX does have water at the map edges, thats the source of you problems, if (or when? fingers crossed!) this hits trunk i think openGFX will be updated to do something about this...
Just make sure SPR_SHADOW_CELL is black and not water.

I've tried to make OpenTTD draw foundations, but I couldn't get it to work without glitches. For now I'll just leave it black, if someone else could make a fix that draws foundations instead of black, we can decide what looks better. So thanks for the offer Zephyris, but without code to draw them it won't help. You could experiment with a grf that replaces SPR_SHADOW_CELL to see what it looks like though.

Yexo
Tycoon
Tycoon
Posts: 3653
Joined: 20 Dec 2007 12:49

Re: Freeform map edges (v5)

Post by Yexo » 18 Dec 2008 15:20

Attached diff has the same functionality as the one in the first post, but many IsValidTiles calls have been removed. Instead, GetTileType(invalid_tile) returns MP_VOID instead of asserting.
Last edited by Yexo on 18 Dec 2008 16:38, edited 1 time in total.

Progman
Engineer
Engineer
Posts: 76
Joined: 15 Jul 2006 12:55
Contact:

Re: Freeform map edges

Post by Progman » 18 Dec 2008 15:26

Yexo wrote:
Progman wrote: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 think I already fixed this, most likely just after I uploaded v4.
Nope, this bug is still in v5 (didn't test v6 yet).

michael blunck
Tycoon
Tycoon
Posts: 5271
Joined: 27 Apr 2005 07:09
Contact:

Re: Freeform map edges (v5)

Post by michael blunck » 18 Dec 2008 15:31

As requested ...

regards
Michael
Attachments
xfile.png
with foundations ...
(85 KiB) Downloaded 273 times
Image

Yexo
Tycoon
Tycoon
Posts: 3653
Joined: 20 Dec 2007 12:49

Re: Freeform map edges

Post by Yexo » 18 Dec 2008 15:39

Progman wrote:
Yexo wrote:
Progman wrote: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 think I already fixed this, most likely just after I uploaded v4.
Nope, this bug is still in v5 (didn't test v6 yet).
Are you using a debug build? (does it really segfault and not assert?)
michael blunck wrote:As requested ...
Seeing this image, I can only agree that foundations are ugly there.

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9292
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Freeform map edges (v5)

Post by planetmaker » 18 Dec 2008 15:42

I totally love the idea of these free form edges. I *really* hope that those existing problems can besolved reasonably :)

Regarding foundations or no foundations: It should or at least could IMO be an advanced setting. Personally I find pros and cons for both, as both can look nice. The version as MB posted a mock-up with foundations looks like those slaps of model terrain you might find in any museum dealing with geology or alike. Not bad either. OTOH the version w/o foundations looks nice even though it looks also a bit awkward to be able to look "under" the terrain.

User avatar
Zephyris
Tycoon
Tycoon
Posts: 2826
Joined: 16 May 2007 16:59

Re: Freeform map edges (v5)

Post by Zephyris » 18 Dec 2008 15:47

Is "SPR_SHADOW_CELL" the name of the sprite drawn at the map edges? Hopefully it is because that would mean I understand exactly what you mean :)

Yexo
Tycoon
Tycoon
Posts: 3653
Joined: 20 Dec 2007 12:49

Re: Freeform map edges (v5)

Post by Yexo » 18 Dec 2008 15:49

Zephyris wrote:Is "SPR_SHADOW_CELL" the name of the sprite drawn at the map edges? Hopefully it is because that would mean I understand exactly what you mean :)
It is. According to table/sprites,h it's number 1004

Progman
Engineer
Engineer
Posts: 76
Joined: 15 Jul 2006 12:55
Contact:

Re: Freeform map edges

Post by Progman » 18 Dec 2008 15:52

Yexo wrote:
Progman wrote: Nope, this bug is still in v5 (didn't test v6 yet).
Are you using a debug build? (does it really segfault and not assert?)
Just a basic ./configure and make call. And yes, it segfaults.

Code: Select all

(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread 0x40401950 (LWP 9308)]
[Thread 0x40401950 (LWP 9308) exited]
[New Thread 0x40401950 (LWP 9309)]
[Thread 0x40401950 (LWP 9309) exited]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2b563f497800 (LWP 9304)]
0x00000000004f032f in TileLoop_Track ()
(gdb) bt
#0  0x00000000004f032f in TileLoop_Track ()
#1  0x00000000004823b2 in RunTileLoop ()
#2  0x00000000004cb7f2 in StateGameLoop ()
#3  0x00000000004cc461 in GameLoop ()
#4  0x00000000005754d1 in VideoDriver_SDL::MainLoop ()
#5  0x00000000004cd88d in ttd_main ()
#6  0x00002b563ee1f5a4 in __libc_start_main () from /lib/libc.so.6
#7  0x0000000000405629 in _start ()
(gdb)

Yexo
Tycoon
Tycoon
Posts: 3653
Joined: 20 Dec 2007 12:49

Re: Freeform map edges

Post by Yexo » 18 Dec 2008 16:03

Progman wrote:
Yexo wrote:
Progman wrote: Nope, this bug is still in v5 (didn't test v6 yet).
Are you using a debug build? (does it really segfault and not assert?)
Just a basic ./configure and make call. And yes, it segfaults.
Thanks, I found the bug now and it's solved in the v6 posted above.

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 3 guests