Working on a nicer UI for Simutrans

Discuss the free TT-like game Simutrans.
Varkaleas
Engineer
Engineer
Posts: 86
Joined: 16 Apr 2012 08:38

Re: Working on a nicer UI for Simutrans

Post by Varkaleas »

I found and fixed some format problems in the station and factory info windows. But the real reason for the new release is that the landscape of pak48.Excentrique now makes a much more complete impression. From the coasts with sea shells and sea urchins, through some more or less colorful but normal-foresty landscape up to the highlands with crystals and the newly invented highland corals, everything looks quite fine to me now.

http://sourceforge.net/projects/ironsim ... fix-r033a/

I've also added a small saved game, varka_hills, where I just started some transport lines for testing. It's not much but shows the most important features of pak48.Excentrique.

If you start Simutrans, it will create a folder "simutrans" in your "my documents" location. Once that is there, you can put the saved game into the simutrans/save folder, and it will appear in the game loading dialog.

Next will be to create more rolling, well, floating stock :wink:
Attachments
r033a-excentrique.jpg
r033a-excentrique.jpg (363.93 KiB) Viewed 6345 times
Working on a Simutrans fork with a nicer UI: http://sourceforge.net/projects/ironsimu/
Varkaleas
Engineer
Engineer
Posts: 86
Joined: 16 Apr 2012 08:38

Re: Working on a nicer UI for Simutrans

Post by Varkaleas »

I've worked some more on Simutrans Iron Bite, and added previews to the Grafik-Set selection screen. The previews only appear for pak sets which have a preview included, they are not generated programmatically.

http://sourceforge.net/projects/ironsim ... Bite/r034/

At the moment it only works with up to 9 sets. I hope this will be enough for testing 8)
Attachments
r034-paks.png
r034-paks.png (84.32 KiB) Viewed 6345 times
Last edited by Varkaleas on 29 Jun 2012 08:38, edited 1 time in total.
Working on a Simutrans fork with a nicer UI: http://sourceforge.net/projects/ironsimu/
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Working on a nicer UI for Simutrans

Post by Alberth »

Out of curiosity, I visited the source forge site for the source. However, I failed to understand what to get.

http://sourceforge.net/projects/ironsim ... Bite/r034/ above fails for me, but http://sourceforge.net/projects/ironsim ... fix-r033a/ gave me a page.
A fragment of the text there:
At the moment I can only produce Windows binaries. The source code should compile on more platforms, though: http://ironsimu.svn.sourceforge.net/viewvc/ironsimu/
1) Download simutrans_iron_bite_r033.zip
2) Unzip it.
3) Get the source code.
4) Compile it.
5) Copy the "sim_iron" binary into the "simutrans_iron_bite_r033" folder which was created in step 2.
The svn repository you link to has numbers in the order of 100 (98 when I looked), and there do not seem to be tags named r033a.
How can I find out what svn revision belongs to what build?
Varkaleas
Engineer
Engineer
Posts: 86
Joined: 16 Apr 2012 08:38

Re: Working on a nicer UI for Simutrans

Post by Varkaleas »

I haven't kept track which release was built from which SVN version. In some other projects I did, but it didn't seem to be neded, so I have skipped it this time. If it's important, I can start doing that for the future releases.

You can get the matching sources from here though, the ironsimu-trunk_r033a.tar.gz:

http://sourceforge.net/projects/ironsim ... fix-r033a/

If I'm not terribly wrong, r033a was build from rev. 95 - a bit of a hint can be gotten from the simversion.h history:

http://ironsimu.svn.sourceforge.net/vie ... v&view=log

Link to rev 95:

http://ironsimu.svn.sourceforge.net/vie ... pathrev=95

Edit: I have fixed the download link for r034 in the posting above. It's been truncated due to a mistake of mine, sorry :oops: Thanks for taking the time and giving it a try!
Working on a Simutrans fork with a nicer UI: http://sourceforge.net/projects/ironsimu/
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Working on a nicer UI for Simutrans

Post by Alberth »

Thanks!

The main need for the link is to retrieve the precise source of a release, eg for bug reproduction, or history digging (ie why does this bug happen in that version and not in that one?)

As a suggestion, why not use the revision number itself as build number?
Much easier to link a version to its source in that case.
Varkaleas
Engineer
Engineer
Posts: 86
Joined: 16 Apr 2012 08:38

Re: Working on a nicer UI for Simutrans

Post by Varkaleas »

Quite often I build the release before I check in the sources. I try to test the release for a while, and if I think it works sufficiently well, I check in the sources and publish the release. I'd need to rebuild after the checkin, to have the right revision number.

But you are right, it would be a a good way to keep track of the source revisions for the builds. I'll think about it.
Working on a Simutrans fork with a nicer UI: http://sourceforge.net/projects/ironsimu/
Varkaleas
Engineer
Engineer
Posts: 86
Joined: 16 Apr 2012 08:38

Re: Working on a nicer UI for Simutrans

Post by Varkaleas »

I noticed that r034 didn't compile with Linux, because I had forgotten to update the Makefile section. I just fixed this and SVN rev 99 should compile again with Linux.
Working on a Simutrans fork with a nicer UI: http://sourceforge.net/projects/ironsimu/
Varkaleas
Engineer
Engineer
Posts: 86
Joined: 16 Apr 2012 08:38

Re: Working on a nicer UI for Simutrans

Post by Varkaleas »

I've compiled a Linux version, but I don't know if it will run on many Linux systems. There are quite some dependencies to libraries, which must be present. But maybe it works for at least some people. I've compiled this on Ubuntu 12 LTS.

http://sourceforge.net/projects/ironsim ... Bite/r034/
Working on a Simutrans fork with a nicer UI: http://sourceforge.net/projects/ironsimu/
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Working on a nicer UI for Simutrans

Post by Alberth »

I compiled r033a at my system.
At least it starts, so that's good :)

However, I am completely lost with the UI in how to make my transport empire, will need to read the tutorial first :)
I am sure I will find the time one day, but it may be a while, as I am rather busy.

For what it is worth, below is a list of compiler warnings that I got:

Code: Select all

data_objects/ribi.cc: In function ‘void ribi_to_string(cbuffer_t&, ribi_t::ribi)’:
data_objects/ribi.cc:366:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
gui/banner.cc: In member function ‘virtual void banner_t::paint(point_t, dimension_t)’:
gui/banner.cc:286:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
gui/convoi_filter_frame.cc: In constructor ‘convoi_filter_frame_t::convoi_filter_frame_t(player_t*, convoi_frame_t*)’:
gui/convoi_filter_frame.cc:133:51: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
gui/halt_list_filter_frame.cc: In constructor ‘halt_list_filter_frame_t::halt_list_filter_frame_t(player_t*, halt_list_frame_t*)’:
gui/halt_list_filter_frame.cc:126:51: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
gui/halt_list_filter_frame.cc:152:51: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
simmain.cc:2:2: warning: #warning "Simutrans is preferably compiled as 32 bit binary!" [-Wcpp]
simplan.cc: In member function ‘void planquadrat_t::display_dinge(sint16, sint16, sint16, bool, sint8, sint8) const’:
simplan.cc:456:54: warning: ‘p_cr.clip_dimension::h’ may be used uninitialized in this function [-Wuninitialized]
simplan.cc:456:54: warning: ‘p_cr.clip_dimension::y’ may be used uninitialized in this function [-Wuninitialized]
simplan.cc:456:54: warning: ‘p_cr.clip_dimension::w’ may be used uninitialized in this function [-Wuninitialized]
simplan.cc:456:54: warning: ‘p_cr.clip_dimension::x’ may be used uninitialized in this function [-Wuninitialized]
system/system.cc: In function ‘const char* system_get_locale_id()’:
system/system.cc:569:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
simwin.cc: In function ‘void display_win(int)’:
simwin.cc:1029:16: warning: variable ‘pos’ set but not used [-Wunused-but-set-variable]
graphics/graphics_16.cc:48:5: warning: #warning "Needs to use slower copy with GCC > 4.2.x" [-Wcpp]
graphics/graphics_16.cc:3627:5: warning: unused parameter ‘x_space’ [-Wunused-parameter]
A previous time that I tried (a long time ago) produced a lot more :)
Varkaleas
Engineer
Engineer
Posts: 86
Joined: 16 Apr 2012 08:38

Re: Working on a nicer UI for Simutrans

Post by Varkaleas »

Good to know that it worked! With gcc 3.x it compiles almost cleanly, and I hope that some day I can get a clean compile too for gcc 4.x

Your experiences will be helpful to build some in game hints for giving new players better hints what to do. But to get started I'll try to give a very brief introduction.

There are two options I think - passenger transport and good transport.

To start with passenger transport, locate a big city on the map, best with a few satellite cities nearby. Build bus stations near each town hall and in each group of larger buildings. Build a bus depot. Use one or more buses to connect all the stations. For passenger transport it is important to build a big network with a large coverage. Passengers will transfer automatically from one bus/line to another if both stop at a station if this helps the passengers to reach their destination.

To start with passenger transport, locate all links of a industry chain. The factories have delivery contracts, but the factory info dialogs have little |> buttons to quickly jump to contracted producers and consumers. Start with the producers and build transport links upwards the chain. To open a factory info dialog, just click the factory with the "magnifying glass" aka "inspection" tool. This tool should be active as default once you start a game, and usually the game returns to this tool after successful use of other tools. If in doubt, it can be activated by the magnifying glass icon in the main toolbar or hotkey "a" - acquire information.

Both approaches should get you started. If you bought a vehicle in a depot, click the "schedule" button. A new window will open, but you don't need to do much with it at the moment. Just click all stations on the map where you want the vehicle to stop. The stops will be listed in the schedule window. If you want you can add options like waiting for a certain loading grade at a station and such. If you are done, just close the schedule window and click the "start" button in the depot window. If there is a route to the first stop of the schedule the vehicle will depart, otherwise you get a message that no route could be found.

I guess I should put that into a quick info window or such at program start :)

Please let me know about all traps, problems and things that are hard to understand. Once I know about problems, I can try to find better solutions. I know Simutrans too well to notice such problems which new people have, I haven gotten blind for the problems. So help is much appreciated :)
Working on a Simutrans fork with a nicer UI: http://sourceforge.net/projects/ironsimu/
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Working on a nicer UI for Simutrans

Post by Alberth »

Varkaleas wrote:Please let me know about all traps, problems and things that are hard to understand. Once I know about problems, I can try to find better solutions. I know Simutrans too well to notice such problems which new people have, I haven gotten blind for the problems. So help is much appreciated :)
Good point, I have the same problem with OpenTTD :)

I guess I should just log stuff I run into here then :)
(It turned out to be a quite detailed explanation, taking longer to write down than to play. I just dumped everything I could think of, hopefully it is of use.)
For the sake of the experiment, you may want to limit explaining how to play the game (don't feed the animal :D ) I don't mind playing guinea pig here.
Note that I am not completely new, I have played it a few times many years ago. I don't remember any details though.

Yesterday I briefly tried a first game (or rather, a first line).

- I started by trying to find a tutorial, and ended up at the simutrans.com wiki, which has loads of languages, including English. Pretty much the first 'real' page failed, as "rail tools" was an empty page, pointing to "rail tools".
- I also tried the German version, which has a lot more text and images, but my German is not good enough to comfortably read pages and pages of text.
So much for the wiki thus :)

The game itself has your introduction and other text. I read a bit, but it is too much reference for me ("with the x-tool you can change x"). If I only knew what the entire collection X was, and how tool x1 relates to tool x2, $\forall x_1, x_2 \in X$ :)
The tooltips were pretty useful, as they gave me information what a button does at the toolbar (confirming my expectations by looking at the icon, and/or giving additional information).

I decided to connect two industries. The default magnifying/examine tool is quite helpful here, I can just click and I get a description. I didn't always get the one I wanted ("this tile contains a tree") when I click just next to the power plant. A forest makes it very difficult to see what you are doing and/or see the terrain.

I first tried using the map. I don't see the advantage of the default map setup, where my viewport is rotated at the map, and the scaling is very nice. You may want to try making the window never bigger than the map, as it looks weird having a map in the top-left corner, and lots of black nothing in the lower right corner.
It seems useful when you have some lines going, but I failed finding industries on it. Perhaps I should have zoomed further than 2:1, or they are hidden in some dark colour (my monitor has very little contrast, and low brightness setting).

Going by the map, a powerplant was easily discovered and its window listed coal mines. It took me a long time to figure out where the mine was relative to the power plant (you can click at the arrow, open the window of the mine, and click at one of the listed power plants (but which one, there are coordinates listed, but the powerplant window does not have coordinates). That means you can jump back and forth, but in which direction to lay the tracks?). After increasing the scale of the map, I could see them both.

Trying to make a station lead to a "No suitable ground" error, which made no sense to me. Clicking anywhere gave me the same error! After random experimenting, I discovered I should first lay tracks, and then build the station on top of them. It would have been useful if the error message would have said "missing tracks", or the more verbose "cannot build a station without tracks" or so.
Making a connection, and building stations and a depot was pretty easy, and the bridge also posed no problem (due to playing to much OpenTTD probably :) ). There was a small surprise in laying tracks, where it refused to go behind the building in a straight line. After experimenting I found there was a hill going down there. Did I mention forest makes things hard to see? :)
I like the zooming of the map though, very useful. Rotation would be useful too (but have not found it yet, perhaps just like OpenTTD it does not exist).
Making a train go was also not that hard, as I knew simutrans uses lines and schedules at its core. I got through by educated guesses and trying, and ignoring pretty much everything in the window. (It looks like a complicated window, which is no doubt fine if you know what things mean, but eg the colour bars below the engines are beyond me at this time. I assumed "green == good" :)
Finding coal cars was a bit tricky, clicking the "cars" tab did not give me coal cars, I had to change a "filter" thingie to "coal" before they appeared.
My display was too cluttered, so I closed a few windows. The "x" seemed safe enough to use (and it worked :p ). The other buttonss seemed just weird (no idea from the icon what they do), and they had no hover tooltip. Not wanting to destroy the game at this time, I did not dare using the buttons at this point (this morning I discovered that one of them opens the help text for that window, I shall try that the next time ;D ).

Loading the coal worked all by itself (yay), and moving to the powerplant station too. Unloading however failed. I had 4 cars of coal, and my stattion was long enough for the entire train, but for some reason it decided to stop 1 tile early (perhaps because the station sign was located there??), the last car was not inside the station and did not get unloaded :(

After the first unload, I considered it time for a second train (too much OpenTTD obviously :) ). The 2nd train got out of the depot, and into the coal mine station (the first train was busy delivering its second load of coal), then both trains stopped. To be honest I was already surprised that it got out of the depot.
Apparently, it needed tracks to pass each other, so I made some extra tracks in the middle. That was not sufficient, so I added a few signals too. Both trains decided to use the same track of the double tracks part, so they got stuck again :)
I could not find a way to force a train to move or turn around or so, and I edited the tracks and the signals to fix the problem, figuring out how signal direction worked in the process.

In an attempt fo fix the unload problem, I removed the station tile with the name on it (and the last one), and then build it again the other way around, so the tile with the name was at the end of the platform. That seemed to work (coal got fully unloaded, and no messages about missing stations), but the coal disappeared (with the first unload, the power plant window had a coal counter that decremented, after changing the station tile, it stayed 0).

At this time, I decided it was time to go to bed, and I ended the game.

In all, it was a nice first experiment. The manual was not too useful, as it was either non-existent, or went straight down into all the details. Also, I failed to find the 'help' button in the window, apparently (A "?" icon would be useful perhaps?).
I got trains driving around, except that convoys and lines and schedules have no meaning to me yet. I love the zooming and the detailed graphics of the buildings and the trees (and trains? I don't remember).
The non-curved tracks seemed a bit out of place, the moving tracks at a junction were a nice touch, although a bit confusing the first time I noticed it ("Where is the other track?").
User avatar
prissi
Chief Executive
Chief Executive
Posts: 647
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Re: Working on a nicer UI for Simutrans

Post by prissi »

I thank you for your very detailed description. I immediately added a better error message for the stations. It is a pity, that Windows does not use a "help" key on the keyboard. Otherwise F1 would have show the dialoge help anyway.

Your problem of no delivery was probably related that teh second station was not out of reach of the station. When building station tile by tile, all must be adjacent or you get two seperate stations. Or it was due to now being out of reach, as the coverage is only 2 tiles in each diraction (in pak64).

About the wiki, I will give this to the other guys.

Very useful insights!
I like to look at great maps and see how things flow. A little like a finished model railway, but it is evolving and actually never finished. http://www.simutrans.com
Varkaleas
Engineer
Engineer
Posts: 86
Joined: 16 Apr 2012 08:38

Re: Working on a nicer UI for Simutrans

Post by Varkaleas »

Only a few small updates this time:

- A new tool tip design
- Support for multi line tool tips
- Tooltips with short info texts for the pak sets in the pak set selection

Download:

http://sourceforge.net/projects/ironsim ... 034/r034a/

I'll try to write a longer message in regards to the experiences with Simutrans once I have a bit more time at my hands again.
Attachments
multi_line_tooltips.png
multi_line_tooltips.png (122.15 KiB) Viewed 6346 times
Working on a Simutrans fork with a nicer UI: http://sourceforge.net/projects/ironsimu/
Varkaleas
Engineer
Engineer
Posts: 86
Joined: 16 Apr 2012 08:38

Re: Working on a nicer UI for Simutrans

Post by Varkaleas »

I've once more tried myself at making a new font variant. This time a lightweight sans-serif type font of a fairly wide running length. It should be fairly easy to read. The only quirk that I've noticed so far is that the letter combination 'lt' doesn't look so well and maybe I'll change the l.

Simutrans iron Bit r034b with the new font and some minor corrections:

http://sourceforge.net/projects/ironsim ... r034/r034b

The new font is used in pak64.Crisp and on the initial pak selection screen. pak48.Excentrique still has the script-type font and pak64b has the classic heavy Simutrans font.
Attachments
multi_line_tooltips_new_font.png
multi_line_tooltips_new_font.png (133.99 KiB) Viewed 6346 times
Working on a Simutrans fork with a nicer UI: http://sourceforge.net/projects/ironsimu/
Varkaleas
Engineer
Engineer
Posts: 86
Joined: 16 Apr 2012 08:38

Re: Working on a nicer UI for Simutrans

Post by Varkaleas »

I'm sorry to say, but I'll discontinue this project due to personal reasons. Due to health reasons I want/should spend less time at the computer/keyboard, and there have been some other reasons which lead me to this decisions as well.
Working on a Simutrans fork with a nicer UI: http://sourceforge.net/projects/ironsimu/
User avatar
Pingaware
Director
Director
Posts: 625
Joined: 03 May 2007 20:18
Location: England

Re: Working on a nicer UI for Simutrans

Post by Pingaware »

Sorry to hear that Varkaleas. I didn't get a chance to try out your build due to limited time, but I have been very impressed with your efforts. Good luck with everything!
Varkaleas
Engineer
Engineer
Posts: 86
Joined: 16 Apr 2012 08:38

Re: Working on a nicer UI for Simutrans

Post by Varkaleas »

Thanks for the kind words :)

I was told that airport construction didn't work in the last published release of mine. Since this seemed to be only a small thing to fix (and since I don't like bugs in my code), I published an update with a fix for the airports:

http://sourceforge.net/projects/ironsim ... Bite/r035/

After that, I felt some urge to once again try to improve the pak set selector screen. Well, also did a little more and made the windows appear more flat, less 3d. I'm not sure if this is a good idea or not, so it went into a separate update:

http://sourceforge.net/projects/ironsim ... 035/r035a/

I might be coming back to the project now and then, but most likely less regularly than I worked on it in the first half of 2012. Thanks for the feedback :)
Attachments
r035a-paks_small.jpg
r035a-paks_small.jpg (37.74 KiB) Viewed 20061 times
Working on a Simutrans fork with a nicer UI: http://sourceforge.net/projects/ironsimu/
Varkaleas
Engineer
Engineer
Posts: 86
Joined: 16 Apr 2012 08:38

Re: Working on a nicer UI for Simutrans

Post by Varkaleas »

The pak selector screen had a misplaced line which I didn't see on this screen, the display is just too bad. I noticed it when trying the download on another PC. I've fixed the misplaced line, and also improved the coil depot graphics in pak48.Excentrique a bit. It has now a more seamless link to the power trails.

http://sourceforge.net/projects/ironsim ... 035/r035b/

Sourceforge's download system seems to be a bit instable today, so if the link doesn't work right away, try again later. I had to try several times by myself till I could verify the download.

Edit: In the directory above there is now also a version with slightly larger fonts for pak48.Excentrique and pak64.Crisp - I could only add about 2 pixels in height to the fonts since most Simutrans UI elements are fairly rigid and don't resize well, but it might help with high resolution screens.

Edit 2: Added a screenshot to show the fonts - they are not final yet, but should be good enough for testing.
Attachments
bigger_fonts.png
bigger_fonts.png (36.15 KiB) Viewed 20031 times
Working on a Simutrans fork with a nicer UI: http://sourceforge.net/projects/ironsimu/
Varkaleas
Engineer
Engineer
Posts: 86
Joined: 16 Apr 2012 08:38

Re: Working on a nicer UI for Simutrans

Post by Varkaleas »

I've been working on a new version which tracks environmental pollution data caused by vehicles. At the moment pollution has no effects but to make trees die earlier than usual and color houses dark.

It's been long since I coded something for iron bite, and I feel quite rusty. I have no idea how stable this version is, and I have had problems with my build environment as well. The build worked for me, so I hope it will work at least on some other systems, too. Windows-only at the moment, although it might build for Linux, too, I can't test this at the moment.

http://sourceforge.net/projects/ironsim ... Bite/r037/

Edit: The pollution data is a bit jumpy, since the "environment self-cleaning powers" kick in every 24 hours, so you will notice a saw-tooth pattern of 24 hours raise and then a sharp drop. I tried to smooth this pattern by averaging values over a period of time, but it's still there. If it disturbs too much, I must think of a smoother simulation, but I wanted to conserve CPU power and memory bandwidth.

Edit 2: Found a mistake, vehicles in tunnels cause surface pollution too. Also it seems my change only darkens the lower part of buildings. I'll look into that. If you find more problems, please let me know.
Working on a Simutrans fork with a nicer UI: http://sourceforge.net/projects/ironsimu/
Varkaleas
Engineer
Engineer
Posts: 86
Joined: 16 Apr 2012 08:38

Re: Working on a nicer UI for Simutrans

Post by Varkaleas »

I've now linked the new pollution data to more of the simulation - buildings in badly polluted areas produce less mail and passengers, because fewer people want to live there.

Also I could fix the bug which let vehicles in tunnels pollute the surface. This shouldn't happen anymore.

https://sourceforge.net/projects/ironsi ... Bite/r038/

A while ago I had changed to bigger fonts, to make the UI better readable on high dpi screens. Apparently this broke the layout of some dialogs. I'll fix them as I notice the problems and have actually time to work on them. So far the vehicle info dialog saw an update to work better with the new fonts.
Working on a Simutrans fork with a nicer UI: http://sourceforge.net/projects/ironsimu/
Post Reply

Return to “Simutrans”

Who is online

Users browsing this forum: No registered users and 0 guests