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: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: Freeform map edges (v5)

Post by michael blunck »

Yexo wrote:Seeing this image, I can only agree that foundations are ugly there.
Besides being ugly (IMO), using simply black would be advantageous because of two more reasons:

- it´ll improve game-play because it´d clearly outline the height profile at the lower borders. Any additional pattern under these borders would make this profile harder to recognise. (And if we´d need a uniform colour under these borders, so why don´t choose black?)

- it´d be consistent, because the height profile at the upper borders is also shown against a black background, and thus easily recognisable.
planetmaker wrote:the version w/o foundations looks nice even though it looks also a bit awkward to be able to look "under" the terrain.
That "effect" adds to the experience that this is a breathtaking new feature. It shouldn´t be weakened by adding any conventional add-on graphics.

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

Re: Freeform map edges

Post by Progman »

Yexo wrote:
Progman wrote: 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.
Sorry, its not ;)

Code: Select all

---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread 0x40401950 (LWP 11084)]
[Thread 0x40401950 (LWP 11084) exited]
[New Thread 0x40401950 (LWP 11085)]
[Thread 0x40401950 (LWP 11085) exited]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2b4b3b867800 (LWP 11080)]
0x00000000004ea1d6 in TileLoop_Track ()
(gdb) bt
#0  0x00000000004ea1d6 in TileLoop_Track ()
#1  0x000000000047f423 in RunTileLoop ()
#2  0x00000000004c91e2 in StateGameLoop ()
#3  0x00000000004c9f61 in GameLoop ()
#4  0x0000000000568591 in VideoDriver_SDL::MainLoop ()
#5  0x00000000004cb3ed in ttd_main ()
#6  0x00002b4b3b1ef5a4 in __libc_start_main () from /lib/libc.so.6
#7  0x0000000000405629 in _start ()
(gdb) info registers
rax            0xffffffdc       4294967260
rbx            0x1c     28
rcx            0x1      1
rdx            0xffffffdc       4294967260
rsi            0x8008b5100      34368868608
rdi            0x1000   4096
rbp            0x1c     0x1c
rsp            0x7fff704dec00   0x7fff704dec00
r8             0x1      1
r9             0x8b5220 9130528
r10            0x60     96
r11            0x0      0
r12            0x40c7   16583
r13            0x1      1
r14            0xe0     224
r15            0x2      2
rip            0x4ea1d6 0x4ea1d6 <TileLoop_Track(unsigned int)+262>
eflags         0x10217  [ CF PF AF IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0
fctrl          0x37f    895
fstat          0x0      0
ftag           0xffff   65535
fiseg          0x0      0
fioff          0x0      0
foseg          0x0      0
fooff          0x0      0
fop            0x0      0
mxcsr          0x1f80   [ IM DM ZM OM UM PM ]
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Freeform map edges (v5)

Post by Rubidium »

Progman you should do a ./configure --enable-debug (if you have a fast computer you might even do --enable-debug=3). Then in gdb type "backtrace full". This will give much more valuable information than the values of the registers as we don't know what the registers actually mean.
Progman
Engineer
Engineer
Posts: 76
Joined: 15 Jul 2006 12:55
Contact:

Re: Freeform map edges (v5)

Post by Progman »

Code: Select all

[SRC] Linking openttd
make[1]: Leaving directory `/home/progman/openttd/trunk/objs/debug'
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
Starting program: /home/progman/openttd/trunk/bin/openttd
[Thread debugging using libthread_db enabled]
[New Thread 0x2b2de00b7800 (LWP 12769)]
[New Thread 0x40200950 (LWP 12773)]
[New Thread 0x40401950 (LWP 12774)]
[Thread 0x40401950 (LWP 12774) exited]
[New Thread 0x40401950 (LWP 12775)]
[Thread 0x40401950 (LWP 12775) exited]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2b2de00b7800 (LWP 12769)]
0x0000000000521ab8 in GetTrackBits (tile=4294966824) at /home/progman/openttd/trunk/src/rail_map.h:144
144             return (TrackBits)GB(_m[tile].m5, 0, 6);
(gdb) backtrace full
#0  0x0000000000521ab8 in GetTrackBits (tile=4294966824) at /home/progman/openttd/trunk/src/rail_map.h:144
No locals.
#1  0x00000000005266bd in TileLoop_Track (tile=40) at /home/progman/openttd/trunk/src/rail_cmd.cpp:2200
        n = 4294966824
        nrail = 32516
        owner = OWNER_BEGIN
        rail = TRACK_BIT_X
        old_ground = RAIL_GROUND_GRASS
        new_ground = RAIL_GROUND_GRASS
#2  0x000000000049f38c in RunTileLoop () at /home/progman/openttd/trunk/src/landscape.cpp:673
        tile = 40
        count = 1022
        __PRETTY_FUNCTION__ = "void RunTileLoop()"
#3  0x00000000005050ab in StateGameLoop () at /home/progman/openttd/trunk/src/openttd.cpp:1092
        old_company = OWNER_BEGIN
#4  0x0000000000505ae6 in GameLoop () at /home/progman/openttd/trunk/src/openttd.cpp:1175
No locals.
#5  0x00000000005c797b in VideoDriver_SDL::MainLoop (this=0x8f8110) at /home/progman/openttd/trunk/src/video/sdl_v.cpp:511
        old_ctrl_pressed = false
        prev_cur_ticks = 29483
        cur_ticks = 29487
        last_cur_ticks = 29487
        next_tick = 29517
        pal_tick = 1
        mod = 0
        numkeys = 323
        keys = (Uint8 *) 0x2b2ddf3a6a40 ""
#6  0x000000000050d22c in ttd_main (argc=1, argv=0x7fffcbc92948) at /home/progman/openttd/trunk/src/openttd.cpp:686
        i = -1
        optformat = 0x661988 "m:s:v:b:hD::n::ei::I:t:d::r:g::G:c:xl:f"
        musicdriver = "\000\000\000\000\000\000\000\000\000\020", '\0' <repeats 21 times>
        sounddriver = '\0' <repeats 16 times>, "p\036:\006Ñ*\000\000\220%\204\000\000\000\000"
        videodriver = "\000­Æ\033\000\000\000\000P'ÉËÿ\177\000\000h'ÉËÿ\177\000\000pS¢ß-+\000"
---Type <return> to continue, or q <return> to quit---
        blitter = "\000­Æ\033\000\000\000\0000îáÞ-+\000\000°\235\214\000\000\000\000\000\020&ÉËÿ\177\000"
        graphics_set = "\000&ÉËÿ\177\000\000 a\và-+\000\000\t\000\000\000\000\000\000\000\016\000\000\000\000\000\000"
        resolution = {width = 0, height = 0}
        startyear = -1
        generation_seed = 4294967295
        save_config = true
        dedicated = false
        network = false
        network_conn = 0x0
        debuglog_conn = 0x0
        dedicated_host = 0x0
        dedicated_port = 0
        mgo = {opt = 0x0, numleft = -1, argv = 0x7fffcbc92950, options = 0x661988 "m:s:v:b:hD::n::ei::I:t:d::r:g::G:c:xl:f", cont = 0x0}
#7  0x00000000005b361d in main (argc=1, argv=0x7fffcbc92948) at /home/progman/openttd/trunk/src/unix.cpp:251
        ret = 0
The tile parameter doesn't look right.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Freeform map edges (v5)

Post by Yexo »

I had another look at the code just before your last post and I've uploaded a new diff (v7) to the first post.
Progman
Engineer
Engineer
Posts: 76
Joined: 15 Jul 2006 12:55
Contact:

Re: Freeform map edges (v7)

Post by Progman »

Now it works (and a bug I found about tracks on slopes is fixed, too) \o/
dihedral
Tycoon
Tycoon
Posts: 1053
Joined: 14 Feb 2007 17:48

Re: Freeform map edges (v7)

Post by dihedral »

like seeing this activity on this patch :-) keep up the good work (not just Yexo, but to all who are contributing in one way or another)
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: Freeform map edges (v7)

Post by SirkoZ »

Really nice patch indeed - but as mentioned above, looking "under" terrain does look funny. How about using snowland brown tiles for the borders perhaps with combination of snowland rocky tiles?
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: Freeform map edges (v7)

Post by michael blunck »

SirkoZ wrote:Really nice patch indeed - but as mentioned above, looking "under" terrain does look funny. How about using snowland brown tiles for the borders perhaps with combination of snowland rocky tiles?
Well, fun is a good thing. Or are you anxious? Do you think your trains could fall "down"? Be assured there´s a turtle under the terrain, so everything is OK.

Seriously, what will be "under" your "snowland brown tiles [in] combination of snowland rocky tiles" in return?

regards
Michael
Image
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: Freeform map edges (v7)

Post by Eddi »

a big problem with foundations (and also with cliffs, if they ever get introduced) is that they take away much from the optical illusions that TTD so heavily depends upon for height effects
User avatar
Zhall
Tycoon
Tycoon
Posts: 1237
Joined: 17 Jul 2007 01:36
Skype: moonray_zdo
Location: Teh matrix, duh.
Contact:

Re: Freeform map edges (v7)

Post by Zhall »

YES!!!
User avatar
SirXavius
Transport Coordinator
Transport Coordinator
Posts: 302
Joined: 28 Jun 2006 18:25
Location: Florida

Re: Freeform map edges (v7)

Post by SirXavius »

Loving the development of this patch!

IMHO, something should be there to let the player visually detect the heights of the land at the edge. The image that blunck provided showed that the foundation tile would not do, but a simple dirt-like pattern would help. It doesn't have to contrast heavily with the black background, which definitely should be kept, but a visual indication would help...
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: Freeform map edges (v7)

Post by michael blunck »

SirXavius wrote: IMHO, something should be there to let the player visually detect the heights of the land at the edge. The image that blunck provided showed that the foundation tile would not do, but a simple dirt-like pattern would help. It doesn't have to contrast heavily with the black background, which definitely should be kept, but a visual indication would help...
Did you read my recent post?

Especially this part?
mb wrote: Besides [foundations] being ugly (IMO), using simply black would be advantageous because of two more reasons:

- it´ll improve game-play because it´d clearly outline the height profile at the lower borders. Any additional pattern under these borders would make this profile harder to recognise. (And if we´d need a uniform colour under these borders, so why don´t choose black?)

- it´d be consistent, because the height profile at the upper borders is also shown against a black background, and thus easily recognisable.
regards
Michael
Image
PhilSophus
Chairman
Chairman
Posts: 776
Joined: 20 Jan 2007 12:08
Location: Germany

Re: Freeform map edges (v7)

Post by PhilSophus »

SirXavius wrote: IMHO, something should be there to let the player visually detect the heights of the land at the edge. The image that blunck provided showed that the foundation tile would not do, but a simple dirt-like pattern would help. It doesn't have to contrast heavily with the black background, which definitely should be kept, but a visual indication would help...
As I said, something like a vertical cut would probably work (a very dark pattern, but not just a uniform dark color, as this would appear as a heavy block, as Michael already noticed). I remember having it seen in other games and it worked there.

However, I still think that leaving it black would look the best, due to its light and elegant appearance. As for not being able to visually identify the absolute heightlevel: Why do you need to know? IMHO, you hardly ever need the absolute height, but the relative height to the surrounding. And in case you need/want to know in special cases, you can still use the query land tool.

Leaving it black, besides looking good, would also have the very charming property of being easy to do :wink:


Edit: Michael, SirXavius was referring to the height not to the height profile. In my understanding SirXavius means the absolute height and you mean the relative height. As I said, I also consider the profile the more important to visualize.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: Freeform map edges (v7)

Post by AndersI »

SirXavius wrote:something should be there to let the player visually detect the heights of the land at the edge.
What about just an outline of the projected flat plane?
Attachments
Example56.png
Example56.png (25.73 KiB) Viewed 4220 times
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: Freeform map edges (v7)

Post by Hyronymus »

Or something more bling like SimCity. But just the lines as AndersI proposed are effective already.
User avatar
nicfer
Director
Director
Posts: 529
Joined: 03 May 2005 20:50
Location: Somewhere in a country called Argentina

Re: Freeform map edges (v7)

Post by nicfer »

Or what about a 'Looping world' mode like in Civ2? After all, the earth isn't flat like old Europe thinked. Of course, it should be a switchable function because not everybody likes real life :).
Sorry for my english I am argentinian
TTO don't crashes in Windows XP; XP crashes TTO

Formerly known as UnderBuilder.

MyMiniCity
User avatar
SirXavius
Transport Coordinator
Transport Coordinator
Posts: 302
Joined: 28 Jun 2006 18:25
Location: Florida

Re: Freeform map edges (v7)

Post by SirXavius »

PhilSophus wrote:
SirXavius wrote: IMHO, something should be there to let the player visually detect the heights of the land at the edge. The image that blunck provided showed that the foundation tile would not do, but a simple dirt-like pattern would help. It doesn't have to contrast heavily with the black background, which definitely should be kept, but a visual indication would help...
As I said, something like a vertical cut would probably work (a very dark pattern, but not just a uniform dark color, as this would appear as a heavy block, as Michael already noticed). I remember having it seen in other games and it worked there.

However, I still think that leaving it black would look the best, due to its light and elegant appearance. As for not being able to visually identify the absolute heightlevel: Why do you need to know? IMHO, you hardly ever need the absolute height, but the relative height to the surrounding. And in case you need/want to know in special cases, you can still use the query land tool.

Leaving it black, besides looking good, would also have the very charming property of being easy to do :wink:


Edit: Michael, SirXavius was referring to the height not to the height profile. In my understanding SirXavius means the absolute height and you mean the relative height. As I said, I also consider the profile the more important to visualize.
I wasn't proposing anything new, but validating other opinions. I prob'ly should have emphasized the word "should" in my post to clarify. I mean, i like the idea of having something to indicate how high up the edge of the map is, as you would see in SimCity, that's all. But at the same time, blunck's observation that the foundation tile would appear too block-like is agreeable.
dihedral
Tycoon
Tycoon
Posts: 1053
Joined: 14 Feb 2007 17:48

Re: Freeform map edges (v7)

Post by dihedral »

i particularly love the fact that the map 'just ends' and that there are no hight related drawings all over the place - but perhaps that could be a configurable option?
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: Freeform map edges (v7)

Post by SirkoZ »

dihedral wrote:i particularly love the fact that the map 'just ends' and that there are no hight related drawings all over the place - but perhaps that could be a configurable option?
With no snowland (so new wouldn't have to be drawn, michael blunck) tiles /w some rocks here and there to simulate dirt (layers) it's best to not implement it at all or at the very least to make it configurable.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Amazon [Bot], Google [Bot] and 9 guests