More height levels (in trunk since r27010)

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

User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: More height levels

Post by ChillCore »

Hello everybody,

It has been a while but finally, here is v21.
I hope it was worth the wait.
Please find attached the new patch, logfile an win32 binaries.(Including grf, log and patch.)

Here's what I have been doing lately ...

Changed:

- Coding style.

- Some syntax changes and shuffling in langauge files to feel closer to trunk. Rubidium has been busy...

- Re-apply v4.01.
Some people cannot compile without memory pre-allocated. Search for CommanderZ in the patch.

- Restored backward savegame compatibility savegame.(*)
More recent savegames (version 97 and later) failed to load.(hackalittlebit)
(Might need a review. I might have done to much.)

- Insert 256 colour-array for the terrain height display in smallmap.

- Handle asserts in Point GetMiddleTile() in viewport.cpp.
I made the game crash somehow.
I do not know how ... I just went random click click drag click drag ... crash while terraforming and building stations.

- Water borders were broken for very rough and cereally rough.
Fixed by disabling the HeightMapCoastLines() instead of
HeightMapSmoothCoastInDirection(), for very rough and cerally rough.

- Configuration option in openttd.cfg is located at the bottom of the list.
This should be first like in the gui. Fixed.

(*)
You can load trunk savegames but trunk will not load savegames made with this patch.
Save games made with this patch may not load in later versions if trunk bumps savegames or if I correct some errors that may exist.
(Finish your game before upgrading ...)

Known bugs:

- Aircraft shadows leaving the map north-east or south-east map border crash the game, in tile_map.h line 60.
This can be fixed by disallowing airport near the border.
For the south-east border there should remain a gap 9 tiles wide between the edge and the airport.(Holding pattern.)
For the northeast border there should remain a 6 tile wide gap.(Taking off)
The actual Aircraft can roam around freely. Nothing to fix there.
Anybody know how? (Airport can have different sizes .) help ... p p p please?

- With the patch disabled and terraingenerator set to original the game crashes.
in tile map h line 130.
Disabling the patch and using terragenesis does not crash the game.

To test:

- Compilation with visual studio/express ...


Edit: binaries removed. Newer are available further in the thread.
Attachments
more_heights_log_v21_r17473.txt
(55.86 KiB) Downloaded 75 times
moreheights_v21_15_r17473.patch
(198.6 KiB) Downloaded 124 times
Last edited by ChillCore on 20 Mar 2010 22:55, edited 1 time in total.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: More height levels

Post by Terkhen »

The patch compiles without warnings in Visual C++ 2008 Express, and the compiled binary works fine. I haven't tested it in depth, but it seems that all serious bugs and glitches from the time I followed more height closely are gone. You are doing a great work :D
PantyraiderZ
Engineer
Engineer
Posts: 32
Joined: 19 May 2007 00:49

Re: More height levels

Post by PantyraiderZ »

yay... new version to play with, thx ChillCore for your work!
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: More height levels

Post by ChillCore »

Hi guys,
Sorry but I am away from the net for a little while.
I am not abandoning the patch considering the many hours that I have allready invested and the fun I am having changing the source.
I am continuing offline with coding style and trying to fix the airport problem.
I will be back by next month or so.

See you all very soon.
ChillCore.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
ic111
Director
Director
Posts: 608
Joined: 17 Jul 2007 17:56

Re: More height levels

Post by ic111 »

The same for me, however there are several things I have to do before I will have time for the patch. So, I can't promise anything right now.

What is the airport problem?
User avatar
Dimme
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 30 Jul 2008 12:42
Location: Trondheim, Norway

Re: More height levels

Post by Dimme »

The airport problem:
ChillCore wrote: - Aircraft shadows leaving the map north-east or south-east map border crash the game, in tile_map.h line 60.
This can be fixed by disallowing airport near the border.
For the south-east border there should remain a gap 9 tiles wide between the edge and the airport.(Holding pattern.)
For the northeast border there should remain a 6 tile wide gap.(Taking off)
The actual Aircraft can roam around freely. Nothing to fix there.
Anybody know how? (Airport can have different sizes .) help ... p p p please?
Try my modular airports minigame!

Image
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: More height levels

Post by ChillCore »

Hello,
Heres a small bump to trunk.
No changes were made to the patch except solving a few minor conflicts to be able to compile.

Could somebody please post Win32 binaries?
I have crashed my old pc and I have shifted from windows to ubuntu.
I can compile and create patches but i seem to be doing something wrong as I cannot get the binaries linked correctly.(Trying to wrap my head around compiling on ubuntu 9.04)
However wine works like a charm...

Please find attached untested patch.
Attachments
moreheightlevels_v22_01_r17967.diff
(198.68 KiB) Downloaded 57 times
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: More height levels

Post by Gremnon »

ChillCore - I'm not sure if it still works in the current version of Wine, but I had some success managing to get MinGW to work via Wine, to provide Windows binaries before. You just have to remember to add it into the Wine config, and set which version, so you don't get Win9X builds instead, if your global version isn't XP or above.
Edit: Also, if you're having trouble compiling a Ubuntu build, simply install the build-essential package, and the ones listed for Compiling on GNU/Linux on the Wiki.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: More height levels

Post by petert »

Hello,
I was just browsing the Development section and saw that ChillCore needed a binary.
Here you go:
Attachments
moreheightlevels_v22_01_r17967.rar
(3.5 MiB) Downloaded 68 times
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: More height levels

Post by Gremnon »

Compiling on Ubuntu is relatively simple, by the way. If you run the commands on the OTTD Wiki, provided you're not trying to compile a patched build, it'll link sucessfully. It's when you try to add patches in you're likely to run into trouble, as with any OS.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: More height levels

Post by petert »

If you patch the correct revision, you won't run into trouble.
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: More height levels

Post by Gremnon »

True, but that doesn't help much when trying to deliberatly apply it against upstream trunk in order to update one's patch.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: More height levels

Post by ChillCore »

Thank you petert for the binary.

Grenmon,
I know it should be easy, but it is not as i am very new to linux.
I compiled Openttd(clean) once it linked correctly and it ran ... and then no more luck.
I mean it compiles without warning but when i try to start the game it comes up with no suitable video driver or no video device found.
I am pretty sure the error is on my side.(Most likely somewhere in my config files.)
I have also tried to cross compile but there is no difference. It just will not start.
Having only one computer available at the moment I do not want to mess it up beyond repair.
I think I will reinstall Ubuntu when i have my other machine back up and running and start over.
(or a new one, as the problem is in the hardware and I allready stripped it to the bone.)

With wine I can install MinGW but installing MSYS hangs.

Two new post while i was typing:
Bumping to trunk is not a problem.
The code we touch with this patch is not often touched by trunk changes.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: More height levels

Post by petert »

ChillCore wrote:Thank you petert for the binary.
You're welcome. :)
ChillCore wrote:With wine I can install MinGW but installing MSYS hangs.
Same here, I don't think it will ever really work. There is a guide at the OpenTTD wiki, but that doesn't work either.
ChillCore wrote:I am pretty sure the error is on my side.(Most likely somewhere in my config files.)
Correct. But I beleive you can start openttd with the "-v null -s null" parameter to disable video and sound drivers. Devs please correct me if I'm wrong.
ChillCore wrote:Bumping to trunk is not a problem.
The code we touch with this patch is not often touched by trunk changes.
Strange, I cannot seem to patch trunk. I've attached my log.

Other:
I get an error when trying to open openttd.exe:
Cannot open file 'flat_blacktiles.grf'
Attachments
patch.txt
Tried to patch against r18288
(5.18 KiB) Downloaded 54 times
Last edited by petert on 25 Nov 2009 20:34, edited 1 time in total.
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: More height levels

Post by Gremnon »

Chillcore, can I assume you have the build-essential package and all dependancies installed?
If so, then I believe what you're missing are the -dev packages for SDL.
What may reveal the cause, is if you run ./configure, and read back through it to see what it reports - that may suggest something is missing, that should be installed. I've found it to be invaluable to finding what I'm missing.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: More height levels

Post by ChillCore »

petert,
Try this one if you please.
It compiles without warning.
Sorry, see my post above, I have not tested it.

For the flatblacktiles grf see the binary In the first post.
You need to put it in the data folder not the newgrf folder.

When running with -v null it complains about my video card

Grenmon,
I think I installed everything three times allready. lol.
As for the SDL -dev packages I also tried Debian-all.
I am not very familiar with the directory structure of ubuntu yet.
It will come to me. looking at that config log might be a good idea to start with.

hmm heightlevels ...

EDIT:
petert,
If you wish to post a new binary somewhere in the future ... feel free to include the grf in the zip.
You may leave it in the data folder.
Thanks again. I am going to try your build now that i have some time
Attachments
moreheightlevels_v22_05_r18288.diff
(199.22 KiB) Downloaded 51 times
Last edited by ChillCore on 25 Nov 2009 21:20, edited 2 times in total.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: More height levels

Post by petert »

ChillCore wrote:It compiles without warning.
Ok, attached is a binary and the grf (separately, I felt it's easier)
ChillCore wrote:For the flatblacktiles grf see the binary In the first post.
Ok, got it. Tip though, I thought you had meant the first post of the thread, so I looked there. Then I figured out it was the first post on this page. Please try to be a bit more specific.
ChillCore wrote:You need to put it in the data folder not the newgrf folder.
Yes, I know that, I just didn't have the GRF.
ChillCore wrote:When running with -v null it complains about my video card
I don't actually know if -v null is a proper parameter. Could a developer shed some light on how to fix ChillCore's problem?

Other: What is the maximum height level? I was only able to get to 14.
Attachments
moreheightlevels_v22_05_r18288.rar
(3.49 MiB) Downloaded 62 times
flat_blacktiles.grf
Needed GRF
(5.75 KiB) Downloaded 95 times
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: More height levels

Post by ChillCore »

ChillCore wrote: For the flatblacktiles grf see the binary In the first post.
petert wrote: Ok, got it. Tip though, I thought you had meant the first post of the thread, so I looked there. Then I figured out it was the first post on this page. Please try to be a bit more specific.

In a while i will be cleaning up my binaries behind me as I have done up to v12 or so, so if i refered to it my post would be no longer relevant in the future.

EDIT:
My mistake, OOpsie, there is no binary in the first post ...
And no grf...I was convinced there was ...
/EDIT

Maybe Ic111 can post it in the first post if he finds some time...
We can ask him next time he is around. it would certainly save some bandwidth.



Maxium heightlevel is 255 for now.
Have you enabled the setting in advanced settings?

Edit2:
Fixed quote.
Last edited by ChillCore on 30 Dec 2009 11:23, edited 1 time in total.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: More height levels

Post by petert »

Thanks, I'll do some more testing over the next couple of days.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: More height levels

Post by ChillCore »

I am sorry but the train had a bit of a delay, or somethingy, you know ...

Please find attached a new version of the patch.
Now the game should no longer assert when you try switching the setting to allow more height from on to off when there are still mountains higher than 16 on the map.

The logfile still has to be updated.
The entry for v22 might look something like this.

v22_all: (chillcore)
-------
- Bump to trunk a few times without being able to test, assume everything is OK because svn update and compilation went fine and introduce a bug.
- Figure out that on Ubuntu 9.04 you need libicu-dev for linking the binaries properly.
- Discover previous mentioned bug and have no clue where it came from.
- Dig down deep in the catacombs of http://vcs.openttd.org/svn/
- Find excuse because the bug is no bug but a bug.(Maybe something about a train ...)
- Fix bug. SQUATSSHHH. @See r17928.
- coding style.
- Build bridge max height function was disabled(Outcommented). Most likely I have done this while applying coding style.
- Removed some no longer needed lines making the patch a bit lighter.

Todo:
- Test some more to see if anything else is broken.
- Update logfile. See above minus some lines.

For the no_can_compilers amongst you, you can continue using petert's build a few post back.
As long as you do not flip that switch while ingame or in scenario editor the game should not crash.
For the compilers, trunk has bumped so finnish your game.

Before i forget:
Grenmon, thank you for the hint. I can play(test) my compilations again.
Attachments
moreheightlevels_v22_07_r18459.diff
(198 KiB) Downloaded 52 times
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests