How many tiles does this need?
Moderator: OpenTTD Developers
- webfreakz.nl
- Director
- Posts: 627
- Joined: 11 Aug 2005 08:22
- Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
- Contact:
How many tiles does this need?
When building large stations for example (bigger than 7x7) you have to count how big is your station before you place it (like 10x8). What about something like this?
- Attachments
-
- openttd_number_tiles.png (32.25 KiB) Viewed 1160 times
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
- bobingabout
- Tycoon
- Posts: 1850
- Joined: 21 May 2005 15:10
- Location: Hull, England
i like it
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
- webfreakz.nl
- Director
- Posts: 627
- Joined: 11 Aug 2005 08:22
- Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
- Contact:
Yes, a very usefull tool!
I just think the numbers should be a bit smaller
I just think the numbers should be a bit smaller
<a href="http://en.prizee.com/?refer=Asafteirobert" target=_blank ><img src="http://en.prizee.com/images-en/promo/fr ... esents.gif" border=0 width=234 height=60 alt="Prizee: Free Games and Presents!" title="Prizee: Free Games and Presents!"></a>
I like this idea. It's faster than counting specially if you want say 12x1. It could be made a general measure tool so you can count lengths and call that function for a simple measure (is this 25 or 30 tiles) and by the station building. It could also be used to show length of tunnels when building those. Showing length between signals can be useful too
I hope you wrote a patch instead of using photoshop
I hope you wrote a patch instead of using photoshop
- webfreakz.nl
- Director
- Posts: 627
- Joined: 11 Aug 2005 08:22
- Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
- Contact:
It would be handful if this could be done for stations, rails, roads, demolishing, trees(????), canals and so on....Bjarni wrote:I like this idea. It's faster than counting specially if you want say 12x1. It could be made a general measure tool so you can count lengths and call that function for a simple measure (is this 25 or 30 tiles) and by the station building. It could also be used to show length of tunnels when building those. Showing length between signals can be useful too
I hope you wrote a patch instead of using photoshop
I didn't write a patch, and I didn't use photoshop Used Macromedia Fireworks 8 instead
If you could tell me how I could code this.... I will try... but can't guarantee I can get something to work
edit:
I was checking some source code, but do I need to edit this file?
viewport.c:
line: 2089
function:
void VpSelectTilesWithMethod(int x, int y, int method)
??
Or should we discuss this on IM?
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
That is a pretty good idea...
One thing though : When building a station, one could enable the drag and drop.. no need to count the tiles, then. In fact, that is what i do (when I can play...)
But, as Bjarni said, it could be helpfull in other situations
One thing though : When building a station, one could enable the drag and drop.. no need to count the tiles, then. In fact, that is what i do (when I can play...)
But, as Bjarni said, it could be helpfull in other situations
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
- webfreakz.nl
- Director
- Posts: 627
- Joined: 11 Aug 2005 08:22
- Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
- Contact:
What do you mean?belugas wrote:That is a pretty good idea...
One thing though : When building a station, one could enable the drag and drop.. no need to count the tiles, then. In fact, that is what i do (when I can play...)
But, as Bjarni said, it could be helpfull in other situations
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Simple... Look at the picturewebfreakz.nl wrote:What do you mean?
- Attachments
-
- 1 : Click on Drag and Drop Button
2 : Drag the desired station size
3 : Release mouse button.
4 : enjoy :) - Unnamed, 19th Jan 1950.png (64.42 KiB) Viewed 5968 times
- 1 : Click on Drag and Drop Button
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
-
- TTDPatch Developer
- Posts: 417
- Joined: 13 Apr 2004 13:35
- Location: Eindhoven, Netherlands
- Contact:
especially when building stations it could be helpfull, especially when using drag&drop. I always hate it having to count how many tiles i'm dragging, to get the exact number of tracks i want.belugas wrote:That is a pretty good idea...
One thing though : When building a station, one could enable the drag and drop.. no need to count the tiles, then. In fact, that is what i do (when I can play...)
But, as Bjarni said, it could be helpfull in other situations
belugas, that's missing the point somewhat. Say you have a standard platform length of, let's say, 12 squares. This is to match the length of your trains (22 carriages with 2 locos each). You want to be able to consistently drag'n'drop 12 square long platforms. Any shorter, and your load times rocket. Any longer, and you waste space (and slow trains down, if you enable the speed limits).
With drag and drop, that means you have to count squares on the screen whilst holding the mouse and dragging. What webfreakz is suggesting is a tooltip that tells you how large your station is before you let go.
With drag and drop, that means you have to count squares on the screen whilst holding the mouse and dragging. What webfreakz is suggesting is a tooltip that tells you how large your station is before you let go.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
You have a point Brianetta.
It's just that, when I have to create a station for a particular lenght of train, usually, I'll pick the highest platform length (7), just one as width and build that part of the station. Afterward, I'll change the length of th next station block to the correct train length ( say 24 wagons long = 12 tiles -7 = 5 more to go), build another station block.
And finally, a drag and drop for the final station format. Therefore, I never counted the tiles...
I agree, my method is a bit tedious. And I agree (now faced with other ways of thinking) that tile counter could be usefull, even for stations.
I will take a look at the code as soon as I can...
It's just that, when I have to create a station for a particular lenght of train, usually, I'll pick the highest platform length (7), just one as width and build that part of the station. Afterward, I'll change the length of th next station block to the correct train length ( say 24 wagons long = 12 tiles -7 = 5 more to go), build another station block.
And finally, a drag and drop for the final station format. Therefore, I never counted the tiles...
I agree, my method is a bit tedious. And I agree (now faced with other ways of thinking) that tile counter could be usefull, even for stations.
I will take a look at the code as soon as I can...
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
I'm almost done with this patch, altough there is one more thing:
How can I create string of other string and integer?
In php it would be but how to do it in C?
How can I create string of other string and integer?
In php it would be
Code: Select all
$str = 'Text '.$int.'; Other text '.$int2;
Last edited by MeusH on 11 Nov 2005 17:05, edited 1 time in total.
- webfreakz.nl
- Director
- Posts: 627
- Joined: 11 Aug 2005 08:22
- Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
- Contact:
I still don't get what explained in your previous post, but never mind I understand this one (in the quote).belugas wrote:You have a point Brianetta.
It's just that, when I have to create a station for a particular lenght of train, usually, I'll pick the highest platform length (7), just one as width and build that part of the station. Afterward, I'll change the length of th next station block to the correct train length ( say 24 wagons long = 12 tiles -7 = 5 more to go), build another station block.
And finally, a drag and drop for the final station format. Therefore, I never counted the tiles...
I agree, my method is a bit tedious. And I agree (now faced with other ways of thinking) that tile counter could be usefull, even for stations.
I will take a look at the code as soon as I can...
I know I can do it the way you describe in the quote, but it is just double work, and as time==money ....
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
- webfreakz.nl
- Director
- Posts: 627
- Joined: 11 Aug 2005 08:22
- Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
- Contact:
no in PHP this would be:MeusH wrote:I'm almost done with this patch, altough there is one more thing:
How can I create string of other string and integer?
In php it would bebut how to do it in C?Code: Select all
$str = 'Text '.$int.'; Other text '.$int2;
Code: Select all
<?
$str = 'Text' .$int. 'Other text' .$int2;
?>
---here was some text, never mind ---
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
I could be wrong, but I think there is a function in strings.c that you would find interesting :MeusH wrote:I'm almost done with this patch, altough there is one more thing:
How can I create string of other string and integer?
In php it would bebut how to do it in C?Code: Select all
$str = 'Text '.$int.'; Other text '.$int2;
Code: Select all
static char *FormatNoCommaNumber(char *buff, int32 number)
Code: Select all
return FormatNoCommaNumber(buff+4, ymd.year + MAX_YEAR_BEGIN_REAL);
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
-
- Engineer
- Posts: 8
- Joined: 15 Nov 2004 22:58
- Contact:
MeusH wrote:I'm almost done with this patch, altough there is one more thing:
How can I create string of other string and integer?
In php it would bebut how to do it in C?Code: Select all
$str = 'Text '.$int.'; Other text '.$int2;
Code: Select all
sprintf(str, "Text %d; Other text %d;", int1, int2);
Who is online
Users browsing this forum: No registered users and 3 guests