Changing height from 0-15 to 0-255

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

griffin71
Traffic Manager
Traffic Manager
Posts: 142
Joined: 31 Mar 2007 13:11
Location: Amsterdam

Re: Changing height from 0-15 to 0-255

Post by griffin71 »

@Bilbo: Do I infer correctly that you think raising the land at the edge of the map is a restiction of the editor?
A game worth playing is a game worth modding :-)
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Changing height from 0-15 to 0-255

Post by Bilbo »

griffin71 wrote:@Bilbo: Do I infer correctly that you think raising the land at the edge of the map is a restiction of the editor?
Not only editor, it is restriction in the game too. But I don't know whether things will break if this restriction is removed ...
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Changing height from 0-15 to 0-255

Post by Rubidium »

Bilbo wrote:I don't know whether things will break if this restriction is removed ...
Things will break.
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Changing height from 0-15 to 0-255

Post by Bilbo »

Rubidium wrote:
Bilbo wrote:I don't know whether things will break if this restriction is removed ...
Things will break.
Do you know which ones and if it can be fixed?
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Changing height from 0-15 to 0-255

Post by Rubidium »

At least building all kinds of things; for example bridges. I know a few things that might break and that TTD was especially coded to be this way, so I guess CS has found a lot of other places that he could "optimize" using the assumption that the whole map has a water border.

So, I can say it will go wrong, but I cannot say where things will go wrong and whether it is actually fixable without rewriting large portions of the codebase *very* deep down.
griffin71
Traffic Manager
Traffic Manager
Posts: 142
Joined: 31 Mar 2007 13:11
Location: Amsterdam

Re: Changing height from 0-15 to 0-255

Post by griffin71 »

@Rubidium: Is there a manual (or just a text) somewhere, that explains the basic structure of the game?
I mean: if you want to change game aspects like these, and make the game a kind of Tranport Tycoon Super Deluxe, then it will probably be wise to make some structural changes that will facilitate other often requested features as well. I am thinking of things like signals on briges and in tunnels, and multi level bridges (crossing each other / bridging more than 1 level in height). Should somebody want to try a task like this, there must be some more structured way for him to obtain an overview of how the game code is structured. Reading and experimenting with the code is the hard way, but since there are experienced developers and patchers around, I guess, there must be some documentation about the code... Right?
A game worth playing is a game worth modding :-)
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Changing height from 0-15 to 0-255

Post by Rubidium »

Not that I am aware of; there might be some pieces at the wiki but I wonder whether they are up-to-date.
User avatar
MHTransport
Engineer
Engineer
Posts: 97
Joined: 25 Mar 2004 00:32

Re: Changing height from 0-15 to 0-255

Post by MHTransport »

What's the fun in high mountains without steep slopes and cliffs? :P

Seriously it may be simpler to code cliffs. Perhaps like build on slopes.

That way at the edge you could still have optimising water with high sea cliffs.

With cliffs or really steep slopes (4:1) it would make the difficult levels actually challenging.
A better OS: http://ubuntu.com/
Soon an even better OS: http://haiku-os.org/
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Re: Changing height from 0-15 to 0-255

Post by athanasios »

It is already suggested. Seems it is hard to achieve.
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
Mchl
Director
Director
Posts: 611
Joined: 05 Jan 2007 15:50
Location: Poland
Contact:

Re: Changing height from 0-15 to 0-255

Post by Mchl »

It's also been noted, that it could cause visbility issues.
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Changing height from 0-15 to 0-255

Post by Roujin »

please also bear in mind that what's not visible is not available for building on, since we have no rotating.
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
JazzyJaffa
Engineer
Engineer
Posts: 35
Joined: 13 Jul 2007 13:41
Location: Oxford, UK

Re: Changing height from 0-15 to 0-255

Post by JazzyJaffa »

Roujin wrote:please also bear in mind that what's not visible is not available for building on, since we have no rotating.
Could be dealt with by a slider bar that disables drawing things above a certain hieght?
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Changing height from 0-15 to 0-255

Post by Bilbo »

Roujin wrote:please also bear in mind that what's not visible is not available for building on, since we have no rotating.
Rotating won't help, if some deep hole is obstructed from all 4 angles
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2897
Joined: 16 May 2007 16:59

Re: Changing height from 0-15 to 0-255

Post by Zephyris »

That issue is unavoidable (think locomotion), unless restrictions were placed on how tall and how close two cliffs could be to each other.
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Changing height from 0-15 to 0-255

Post by Bilbo »

Still, perhaps the cliffs may be both useful and relativel easy to implement (at least I hope :) if they will be restricted only to edges, like shown in attachment. This will not affect construction (you can't construct on the edge tiles anyway :), so many issues will not need to be solved and will enable constructing maps with mountains "to the edges"
Attachments
m-screenshot.png
m-screenshot.png (34.37 KiB) Viewed 904 times
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
griffin71
Traffic Manager
Traffic Manager
Posts: 142
Joined: 31 Mar 2007 13:11
Location: Amsterdam

Re: Changing height from 0-15 to 0-255

Post by griffin71 »

Bilbo, does the solution with the border-cliffs solve the graphic glitches you reported earlier in this thread?
Intuitively, I'd say that if the borders need to be at sea level, then also, their slope need to be "continuous", as is now not the case.
Roujin wrote:please also bear in mind that what's not visible is not available for building on, since we have no rotating.
Rotating won't help, if some deep hole is obstructed from all 4 angles
Exactly, so we need a plain view, straight from above. Cliffs could be marked by a tileborder in a different colour, for sake of clarity.
A game worth playing is a game worth modding :-)
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Changing height from 0-15 to 0-255

Post by Roujin »

griffin71 wrote:[...]Exactly, so we need a plain view, straight from above. Cliffs could be marked by a tileborder in a different colour, for sake of clarity.
I hope this was not a serious suggestion? That would look ugly, not even mentioning the need to redo all the graphics and the display engine and what not else :shock: I'd rather deal with not having cliffs...


About the cliff-at-border thingy: since i don't know of what nature the problems are that arise when the border tile is not a sea tile, it might be possible that the current internal stuff needs the last tile before the border to be max. level 1, the one before max. level 2, and so on? Better check that first (Rubidium?) before trying...
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Re: Changing height from 0-15 to 0-255

Post by Maedhros »

One of the problems of cliffs at the edge of the map is that the height of the tile is only stored for the northern corner. All the other corners are calculated from the surrounding tiles, which you can't do at the edge of the map as there are no surrounding tiles.
No-one's more important than the earthworm.
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Re: Changing height from 0-15 to 0-255

Post by XeryusTC »

Aren't the southern and western (using #openttdcoop compass) border tiles all MP_VOID and thus not rendered, isn't it just possible to have these not be 0 but also different heights. If only the north-east z coordinate is stored you don't need an additional row for the northern and eastern borders so the map should already support it technically.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
griffin71
Traffic Manager
Traffic Manager
Posts: 142
Joined: 31 Mar 2007 13:11
Location: Amsterdam

Re: Changing height from 0-15 to 0-255

Post by griffin71 »

Maedhros wrote:One of the problems of cliffs at the edge of the map is that the height of the tile is only stored for the northern corner. All the other corners are calculated from the surrounding tiles, which you can't do at the edge of the map as there are no surrounding tiles.
I dont' see why that creates a problem for cliffs. It could only create a problem for the tiles that are normally (the case Bilbo showed, but can't reproduce, excepted) the ribbon of sea tiles at the border. But if you respect those, I don't see why cliffs couldn't be a solution to creating a true alpine landscape. The idea is great, I think.
A game worth playing is a game worth modding :-)
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 15 guests