News:

Want to praise Simutrans?
Your feedback is important for us ;D.

Rail Alignment Help program

Started by Zeno, January 28, 2012, 07:13:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zeno

Some time ago I started to code a program to help me aligning rail vehicles properly. This task is really tough when talking about @MUs. Now I wanted to paint some more EMU trains, so I have rescued the project and I have the aim to finish it before starting to paint those vehicles. I leave here a demonstration video, which will show much more than I can explain in words. I'd like to know if it would be worth to make this tool public, or adapt for other pak size (now it's only for 128), maybe to other vehicles also. Thank you in advance for your comments :)

Here, the video --> www.youtube.com/watch?v=7UQl2cnTjgA

First release: v0.1 r5 download

prissi


ӔO

this is like a dream program for painters.

is the way file also loaded like the trains? I think it would be great if road vehicles were also possible.

I would definitely support this.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

Ashley

Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

Zeno

As long as some interest has been shown, I think I will make a code cleanup (now that it's still rather a small thing) and then upload to my sourceforge account.
Btw, just enabled remove and save vehicle functionalities, which were already implemented, and added new variable vehicle length support, so non-standard ( not 8 ) lengths are drawn properly.
I will be testing it by aligning the DMUs I have currently waiting to be re-aligned, so there is a possibility of an initial (beta?) release in a few days :)

Quote from: AEO on January 28, 2012, 10:38:56 PM
I think it would be great if road vehicles were also possible.
I think it should not be difficult to adapt. There is a "hidden" functionality for background template loading... by using it, a road background could be drawn, then the program mechanics doesn't care of what you've painted: it will only paint what you load by using some calculated coordinates, no matter if it's a train or a bicycle :P
Considering that, it might be useful as well for road vehicles, trams and maglevs. Probably not very useful for airplanes and ships though...

The only problem I can see right now is that the program hasn't the ability to load the same object in different positions (this would apply if you want to load a loco then five wagons of same type to see how the convoi is drawn). It can be done by loading the same vehicle in different positions, but the program will allow to handle different offsets for each position and that would lead the user to confusion for sure. I will look for a workaround for that, if possible.

prissi

I think the rails are a few pixel diffrent in the different paks, those alignment graphics background imges must be pak-dependent too, or?

Zeno

Yes, probably the rails will differ in different paks. Anyway, the templates are just plain images that can be easily loaded, so no matter the pak you use as long as you provide the proper background images, which can be easily built with a couple of screenshots and as few gimp knowledge as mine :)

Zeno

Well, I have everything ready for a first (pre-)release, let's say v0.1 :)
What about the name... Simutrans Align Helper sounds ok? Any proposal?
When I decide for a name I'll upload it to sourceforge.

At the moment you can download a minimum-functional version here.
I'm sorry this is a preliminar version and doesn't include any help file/documentation. You can mostly look at the video at the beginning of the thread to know how to use it. If you still have questions, ask here. If you can wait for some days, maybe I'm able to make a small help document or FAQ before end of the week.

Some tips/advices:

       
  • Use shades for aligning your single vehicles first. It's free, easy and cool!!
  • Then you can use this program to preview a convoi and/or fine aligning
  • ATTENTION!!! At the moment only a single PNG format and structure is supported!! Images must be in row 1 (second row) and must be in same order than the application arrows!!!!!
  • No possibility of changing the background templates yet :-(
  • No possibility of changing language yet :-(
  • It already allows loading some images, aligning them and finally save them. That's what it's supposed to, so don't expect much more.
And remember: make a backup of your images before playing with this!!! I warned you, so don't put the blame on me later!! ;-)
Please, let me know your thoughts, bugs, ideas, whatever :)

greenling

Zeno your programm it very hot!
Then your programm than be can to aligment road,tram,maglev,ships,plans and monrail.
and that in 64 pixells too.
Then have the simutrans modells devloper an Powertool with the work on new modells than go quick from the hand.
:) :)
Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

Zeno

#9
The project is in sourceforge at https://sourceforge.net/p/vats/admin/

There is also a small help page (wiki) as well as a first program release. The installer can be downloaded here.
The help page does not tell much how it works, so you better get guided by the youtube video I previously posted.

Remember this version has still some important limitations:
* Only 128 sized stuff
* Non changeable templates
* PNG *MUST* be in the Pak128 standard structure
** first line only text
** vehicle views in second line
** order must be the same than application buttons)

ӔO

I'd call it ZAP
Zeno's Alignment Program.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

Zeno

Heh AEO... I don't feel like giving credits to myself through the program name :P
Anyway the period for naming proposals ended yesterday; from now on I feel too lazy to rename everything again. It's a mess, you know!
Thank you anyway for your proposal!

jamespetts

I like the idea of this! I've had trouble in the past with alignment.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Zeno

I am trying to give the program the option to use different pak sizes, but I'm finding trouble with the vehicle offsets.
I ask if there is someone familiar with the vehicle positioning code in simutrans to advice me if I am doing wrong; in my program I have an offset calculated based on the direction and tile size:
West: X offset is + vehicle_length * tile_size / 32;
West: Y offset is + vehicle_length * tile_size / 64;
North: X offset is - vehicle_length * tile_size / 32;
North: Y offset is + vehicle_length * tile_size / 64;
and so on...

Please, I'd like to be adviced if I am in the right path or not; maybe I'm confusing things, as I've having some undesirable results.

Another difficulty I can already spot is how will I manage the first position offset. As it's done now, it will be fixed and will force the background image to be moved/modified in order to fit the fixed initial offset. Maybe it's not the most elegant way to do it, and I'm not sure how can I handle such a thing...

Thank you in advance.

prissi

Maybe it would be easier to just use the routines from simutrans ... from vehikel_basis_t::get_screen_offset



Zeno

Quote from: prissi on February 05, 2012, 09:29:37 PM
Maybe it would be easier to just use the routines from simutrans ... from vehikel_basis_t::get_screen_offset
I will look into the svn for it. Thank you prissi.