Patch: Raising max. height to 127
Moderator: OpenTTD Developers
Patch: Raising max. height to 127
So, to complement http://www.tt-forums.net/viewtopic.php?f=33&t=33208 with some sort of patch ....
I have written patch that will allow heights from 0-127 instead od 0-15. (with possible future extension to -128 .. 127 for sea depth patch)
So I split type_height in _m to _m.type and _me.height. This increase memory usage for map by 11%, but seem to work.
First sort of preview, loading works, saving works too, but the high hills gets broken in savegames. High terrain technically work, but there is heap of bugs and glitches, so lot of work need to be done to bring this to usable state.
Known bugs/issues:
* tiles with height>15 are screwed when saving
* terraforming uphill get very slow once you start raising "too large peak" (like to raise 30 high peak to 31 height). Seems the terraformer is recursive (and ridiculously slow for large peaks). There were some recursion limits which I don't know how they were computed. I guessed how much larger they need to be for 127 height. Seem to work somewhat, but maybe it is still too small or large
* many graphical glitches with tiles of height over 15 (I have no idea why).
* parts of gui and config system still think 15 is maximum height
* Very high hills show with same colors on minimap -> all colors over height 27 are the same, somebody need to invent what colors to use ...
* Planes fly too low
* Land generation (terragenesis) won't use any values >15
What works:
Tiles can actually be between 0-127 and behave well for road vehicles and trians.
Loading savegames work (Saving is still buggy)
Seems that it will be more difficult than previously anticipated, so any help (fixing any of that bugs or finding yet unknown bugs is welcome :)
I have written patch that will allow heights from 0-127 instead od 0-15. (with possible future extension to -128 .. 127 for sea depth patch)
So I split type_height in _m to _m.type and _me.height. This increase memory usage for map by 11%, but seem to work.
First sort of preview, loading works, saving works too, but the high hills gets broken in savegames. High terrain technically work, but there is heap of bugs and glitches, so lot of work need to be done to bring this to usable state.
Known bugs/issues:
* tiles with height>15 are screwed when saving
* terraforming uphill get very slow once you start raising "too large peak" (like to raise 30 high peak to 31 height). Seems the terraformer is recursive (and ridiculously slow for large peaks). There were some recursion limits which I don't know how they were computed. I guessed how much larger they need to be for 127 height. Seem to work somewhat, but maybe it is still too small or large
* many graphical glitches with tiles of height over 15 (I have no idea why).
* parts of gui and config system still think 15 is maximum height
* Very high hills show with same colors on minimap -> all colors over height 27 are the same, somebody need to invent what colors to use ...
* Planes fly too low
* Land generation (terragenesis) won't use any values >15
What works:
Tiles can actually be between 0-127 and behave well for road vehicles and trians.
Loading savegames work (Saving is still buggy)
Seems that it will be more difficult than previously anticipated, so any help (fixing any of that bugs or finding yet unknown bugs is welcome :)
- Attachments
-
- level-127-10644.patch
- First alpha version
- (14.17 KiB) Downloaded 349 times
-
- level-127-10648.patch
- Second alpha version
- (17.56 KiB) Downloaded 281 times
-
- level-127-10692.patch
- 3rd alpha version
- (14.18 KiB) Downloaded 427 times
Last edited by Bilbo on 26 Jul 2007 03:15, edited 3 times in total.
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)
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)
Re: Patch: Raising max. height to 127
I have tried this patch, keep up good work Bilbo!
Works good up to 20-24 height levels , if you doesnt use any very tall buildings on the mountain tops. After thsoe period of height levels, I have got massive glitches, even on the ground I have raised the height again, the glitches became even more wierd(maybe after height level32?), the z-coordinates of the tiles are calculated again from zero. And the planes are funny too, they float on the ground at extra heights, and they jump up to the runway from the ground
This looks bugfree ingame, except the massive glitches I would like to see this in trunk after those will have been fixed
Works good up to 20-24 height levels , if you doesnt use any very tall buildings on the mountain tops. After thsoe period of height levels, I have got massive glitches, even on the ground I have raised the height again, the glitches became even more wierd(maybe after height level32?), the z-coordinates of the tiles are calculated again from zero. And the planes are funny too, they float on the ground at extra heights, and they jump up to the runway from the ground
This looks bugfree ingame, except the massive glitches I would like to see this in trunk after those will have been fixed
Re: Patch: Raising max. height to 127
Development of this patch is temporarily put on hold.
Of course, anybody can fix the bugs and test the patch in meantime - once development resumes, I'll collect and merge the fixes.
Reason: See here:
http://www.tt-forums.net/viewtopic.php? ... 60#p611260
Of course, anybody can fix the bugs and test the patch in meantime - once development resumes, I'll collect and merge the fixes.
Reason: See here:
http://www.tt-forums.net/viewtopic.php? ... 60#p611260
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)
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)
Re: Patch: Raising max. height to 127
Hi
This patch jus gave me an idea, if you combine it with the bigger maps patch and the day-length patch it could be use to create an MMORTS based on OPENTTD.
And about
This patch jus gave me an idea, if you combine it with the bigger maps patch and the day-length patch it could be use to create an MMORTS based on OPENTTD.
And about
Don’t force someone to like your work.Bilbo wrote:Development of this patch is temporarily put on hold.
Of course, anybody can fix the bugs and test the patch in meantime - once development resumes, I'll collect and merge the fixes.
Reason: See here: l viewtopic.php?f=33&t=33262&p=611260#p611260
Interesting Projects:
Celestia an open source space simulator.
EventGhost an open source PC remote control.
TA Spring
OpenTTD
Celestia an open source space simulator.
EventGhost an open source PC remote control.
TA Spring
OpenTTD
Re: Patch: Raising max. height to 127
You're in a forum. Nobody is - or should be - forced to talk about stuff they don't want to talk about. There is no rule, written or implied, that states that people have to talk about your stuff.Hmmm ... I guess I stop making any new patches till I receive some feedback or response on the ones I put there already.
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
Re: Patch: Raising max. height to 127
by the looks of it your patch made it to the nightly builds:
r10665 truelight 2007-07-23 21:30:36 +0200 (Mon, 23 Jul 2007) 4 lines
-Codechange: replace magic 15 with MAX_TILE_HEIGHT (bilbo)
-Codechange: replace magic 13 with MAX_SNOWLINE_HEIGHT (bilbo)
-Codechange: assure _map_height_bits is always of correct size (Rubidium)
Interesting Projects:
Celestia an open source space simulator.
EventGhost an open source PC remote control.
TA Spring
OpenTTD
Celestia an open source space simulator.
EventGhost an open source PC remote control.
TA Spring
OpenTTD
Re: Patch: Raising max. height to 127
Err. ... no. Only some small part of it, that will make the code cleaner. But the actual code to raise the max height is not in, as it is currently way too much buggy to even consider adding it to trunk. I'll update the patch to not include the part that is already in trunk once I get home ...xyz wrote:by the looks of it your patch made it to the nightly builds:
...
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)
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)
- NukeBuster
- Traffic Manager
- Posts: 222
- Joined: 04 Jan 2006 18:16
- Location: Alphen aan den Rijn, The Netherlands
- Contact:
Re: Patch: Raising max. height to 127
Bilbo, you're doing a great job with your patches. I really enjoy reading the topics and watching the progress. I hope you will be patient enough for all patches to be evaluated by the devs.
NukeBuster
Transport Empire: The Transport Empire Linux effort
Join the Transport Empire IRC channel: [url]irc://irc.oftc.net/transportempire[/url] !
OpenTTD patch(es): Password at join
Transport Empire: The Transport Empire Linux effort
Join the Transport Empire IRC channel: [url]irc://irc.oftc.net/transportempire[/url] !
OpenTTD patch(es): Password at join
- athanasios
- Tycoon
- Posts: 3138
- Joined: 23 Jun 2005 00:09
- Contact:
Re: Patch: Raising max. height to 127
xyz, CobraA1: Gentlemen, Bilbo is not trying to force anyone. He means that if no one is interested in certain of his patches then why should he continue on them wasting his time? They will not be of any use. (Except for himself in single player mode). He 'd better spend his precious time on patches that will make it into the trunk and we are going to use them.
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.
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
Re: Patch: Raising max. height to 127
Well, some of my patches are usable in multiplayer too, as they preserve network compatibility. Like the vehicle commands, configurable console limits, more than 22 opened windows ... well, the console is planned to be rewritten, so after that I assume the first one will be accepted after I modify it for new code and second one may become obsolete ... well, I'll see :)athanasios wrote:xyz, CobraA1: Gentlemen, Bilbo is not trying to force anyone. He means that if no one is interested in certain of his patches then why should he continue on them wasting his time? They will not be of any use. (Except for himself in single player mode). He 'd better spend his precious time on patches that will make it into the trunk and we are going to use them.
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)
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)
Re: Patch: Raising max. height to 127
Ok, I've updated this patch for newer trunk and also fixed wrong array size of map colors, see first post for it.
Rest of the bugs still remain ...
Rest of the bugs still remain ...
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)
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)
-
- OpenTTD Developer
- Posts: 351
- Joined: 03 Oct 2006 18:26
- Location: Prague, Czech Republic
- Contact:
Re: Patch: Raising max. height to 127
The map is 2D. Everything is optimised so it doesn't draw more than it actually needs.Bilbo wrote: * many graphical glitches with tiles of height over 15 (I have no idea why).
Making map higher would need to scan wider area for anything that can be displayed at given pixel, eg. it would need bigger area to scan in ViewportAddVehicles() etc.
I am afraid this would need huge rewrite of rendering functions, but you are welcome to give it a try
Re: Patch: Raising max. height to 127
Hmmm ... I probably could just increase the lookup limit from 15 times tile height to 127, but I guess there would be some performance degradation ...B. N. SmatZ! wrote:The map is 2D. Everything is optimised so it doesn't draw more than it actually needs.Bilbo wrote: * many graphical glitches with tiles of height over 15 (I have no idea why).
Making map higher would need to scan wider area for anything that can be displayed at given pixel, eg. it would need bigger area to scan in ViewportAddVehicles() etc.
I am afraid this would need huge rewrite of rendering functions, but you are welcome to give it a try ;-)
Still, maybe the patch could work so that height will be artificially limited to say 31 - still usable increase, there are enough reasonable colors for minimap for 32 levels, and there is room for further expansion in case someone will solve the glitches. And there are still levels -1 to -128 available for possible deep water patches or other uses.
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)
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)
Re: Patch: Raising max. height to 127
I'd like to inform people who stumble upon this topic and then complain in PM about the patch not working/being for old OpenTTD version.
Look at this thread:
http://www.tt-forums.net/viewtopic.php?f=33&t=40844
Other people have taken off the idea from where I've left it and there is working patch (still with some known bugs, but with much less of them than my patch in this thread) in that thread for current OpenTTD version.
Consider this topic a bit obsolete.
Look at this thread:
http://www.tt-forums.net/viewtopic.php?f=33&t=40844
Other people have taken off the idea from where I've left it and there is working patch (still with some known bugs, but with much less of them than my patch in this thread) in that thread for current OpenTTD version.
Consider this topic a bit obsolete.
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)
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)
Re: Patch: Raising max. height to 127
let me have a wiled guess: Alain sent you a pm asking you if you could update your patch?
Who is online
Users browsing this forum: Google [Bot] and 1 guest