Possibility for a system for diagonal roads

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

SHADOW-XIII
Tycoon
Tycoon
Posts: 14275
Joined: 09 Jan 2003 08:37

Post by SHADOW-XIII »

look now ... you can see that it will look the same (white nad yellow squares) so the same graphic the same view

only if it will be placed other way (like I draw it at the top) ... the same but less space

the turnings will be exacly the same but position will change ... just take a look
Attachments
scr69_147.png
scr69_147.png (25.13 KiB) Viewed 6256 times
what are you looking at? it's a signature!
User avatar
charlieg
Transport Coordinator
Transport Coordinator
Posts: 323
Joined: 08 Oct 2003 14:07
Contact:

Post by charlieg »

Am I the only person who things the downwards road, in all these illustrations, is far too wide?
Open source tycoon games
--
Free Gamer - open source and Free Software games
FreeGameDev forums - open source game development community
User avatar
hAmpzter
Engineer
Engineer
Posts: 41
Joined: 17 Jul 2004 15:04
Location: Sweden
Contact:

Post by hAmpzter »

SHADOW-XIII wrote:look now ... you can see that it will look the same (white nad yellow squares) so the same graphic the same view

only if it will be placed other way (like I draw it at the top) ... the same but less space

the turnings will be exacly the same but position will change ... just take a look
Okey, did this.. Didn't see exactly how it should become until I made a pic.. And it seemed to be quite good! So now I agree with you! :D
Attachments
Road moved a bit to the right!
<br />(Left one is original as tmesisbob made it, right ons is the one moved a half square to the right)
Road moved a bit to the right!
(Left one is original as tmesisbob made it, right ons is the one moved a half square to the right)
moved_road.png (19.6 KiB) Viewed 6242 times
User avatar
hAmpzter
Engineer
Engineer
Posts: 41
Joined: 17 Jul 2004 15:04
Location: Sweden
Contact:

Post by hAmpzter »

charlieg wrote:Am I the only person who things the downwards road, in all these illustrations, is far too wide?
No, I could agree with you there.. It should be about 2 pixels less in width or so I would say! :?: :!:
User avatar
George
Tycoon
Tycoon
Posts: 4362
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Post by George »

I also think it would be nice to have roads taking two squares instead of three, as it is on the picture by hAmpzter
User avatar
tmesisbob
Engineer
Engineer
Posts: 79
Joined: 26 Mar 2004 19:17

Post by tmesisbob »

Regards road width, all of these roads were rendered using the same model for each of the 4 differernt directions, so mathematically (subject to rounding issues) they are all the same size, however they can be easily changed :)

SHADOW-XIII: I can certainly understand why you wish the roads to consume less space, they would provide a far more elegant solution especially within towns, allowing buildings to be closer to the road, hence wasting less space. However, that system is still a 4 way system in essence, and my objective at least was to try and implement a true 8 way system. I can certainly make the system that you suggest (and indeed I have made a few simple changes to the code inorder to create the roads in the piccy below), and add a few patch switches to allow the player to make thier own preferences :wink: .

Below is a picture showing the in game graphics for both types of diagonal roads. Making smother corners for the right version will be a bit harder though, as I would have to adpot the Sim City 3000 method of using the extra tiles (1and 2) for the curves.
Attachments
8v4.png
8v4.png (8.19 KiB) Viewed 6167 times
User avatar
hAmpzter
Engineer
Engineer
Posts: 41
Joined: 17 Jul 2004 15:04
Location: Sweden
Contact:

Post by hAmpzter »

I think the true 8-way system looks much nicer, though I would want it smaller as in the 4-way you did there..
But you can't have everything, so I would choose the 8-way! :D

Is there no code today that could allow a building/rail or so to intersect the "half" square that is left by the 8-way system?
User avatar
tmesisbob
Engineer
Engineer
Posts: 79
Joined: 26 Mar 2004 19:17

Post by tmesisbob »

hAmpzter wrote:Is there no code today that could allow a building/rail or so to intersect the "half" square that is left by the 8-way system?
Its is all a matter of storage. It is entirly possible to have that half road half rail tile, however the data needs to be stored for that and things start to get really messy. A messy memory layout requires more complex code to deal with all sorts of 'special cases', which in turn will increase processor overheads.

I would be more than happy to have that possibility, but I think that we should let the dev guys sort out the memory layouts first. :wink:
RK
Transport Coordinator
Transport Coordinator
Posts: 264
Joined: 13 Oct 2003 10:43
Location: Dortmund, Germany

Post by RK »

tmesisbob wrote:Regards road width, all of these roads were rendered using the same model for each of the 4 differernt directions, so mathematically (subject to rounding issues) they are all the same size, however they can be easily changed :)

SHADOW-XIII: I can certainly understand why you wish the roads to consume less space, they would provide a far more elegant solution especially within towns, allowing buildings to be closer to the road, hence wasting less space. However, that system is still a 4 way system in essence, and my objective at least was to try and implement a true 8 way system. I can certainly make the system that you suggest (and indeed I have made a few simple changes to the code inorder to create the roads in the piccy below), and add a few patch switches to allow the player to make thier own preferences :wink: .

Below is a picture showing the in game graphics for both types of diagonal roads. Making smother corners for the right version will be a bit harder though, as I would have to adpot the Sim City 3000 method of using the extra tiles (1and 2) for the curves.
but the right is ttd style because rail tracks are also build like this and look smaller than non-diagonal.
User avatar
tmesisbob
Engineer
Engineer
Posts: 79
Joined: 26 Mar 2004 19:17

Post by tmesisbob »

RK wrote:but the right is ttd style because rail tracks are also build like this and look smaller than non-diagonal.
We are making OTTD not TTD. :)
BobXP
Tycoon
Tycoon
Posts: 2720
Joined: 04 May 2003 11:00
Location: Torquay, England
Contact:

Post by BobXP »

I think hAmpzter's method is the best...
<!-- End Of Post !-->
Image
User avatar
hAmpzter
Engineer
Engineer
Posts: 41
Joined: 17 Jul 2004 15:04
Location: Sweden
Contact:

Post by hAmpzter »

tmesisbob wrote:
RK wrote:but the right is ttd style because rail tracks are also build like this and look smaller than non-diagonal.
We are making OTTD not TTD. :)
Exactly what I think too! :D

BobXP: I didn't do any method, I just liked the real 8-way road-system! 8)
RK
Transport Coordinator
Transport Coordinator
Posts: 264
Joined: 13 Oct 2003 10:43
Location: Dortmund, Germany

Post by RK »

tmesisbob wrote:
RK wrote:but the right is ttd style because rail tracks are also build like this and look smaller than non-diagonal.
We are making OTTD not TTD. :)
ok, if it is possible, we should take the better one.
but i have a quaestion: will towns build these roads too?
BobXP
Tycoon
Tycoon
Posts: 2720
Joined: 04 May 2003 11:00
Location: Torquay, England
Contact:

Post by BobXP »

hAmpzter wrote:BobXP: I didn't do any method, I just liked the real 8-way road-system! 8)
no...

here you posted the picture of the road moved over to the right by 1/2 square... i think that is the best method.
<!-- End Of Post !-->
Image
User avatar
tmesisbob
Engineer
Engineer
Posts: 79
Joined: 26 Mar 2004 19:17

Post by tmesisbob »

BobXP wrote:no...

here you posted the picture of the road moved over to the right by 1/2 square... i think that is the best method.
Hmmm, False.

How would one connect these to the existing X and Y aligned roads? The only way using that method is shown above in one of my previous posts.
BobXP
Tycoon
Tycoon
Posts: 2720
Joined: 04 May 2003 11:00
Location: Torquay, England
Contact:

Post by BobXP »

tmesisbob wrote:How would one connect these to the existing X and Y aligned roads?
Um, like this perhaps? :?
Attachments
connect.PNG
connect.PNG (3.28 KiB) Viewed 5932 times
<!-- End Of Post !-->
Image
User avatar
tmesisbob
Engineer
Engineer
Posts: 79
Joined: 26 Mar 2004 19:17

Post by tmesisbob »

hi,

I have thought about that type of system before. The main problem with this is that the tiles labeled 1 and 2 need to use different tiles from their regular ones.

The red line shows the actual road direction bits that would be set.

Now two methods could be employed.

1) Use some spare bits in the landscape arrays to indicate that these road tiles are to use a different tile. Every time the road or any adjacent roads are changed, these status flags need to be updated. This is a slow and tiresome process.

2) Workout the correct sprite to draw during the render. This requires that the adjacent tiles be examined, thus requiring extra memory reads, and hence slowing the system down considerably.

So if this style of diagonals is used then the roads would probably look like connect2.png instead, of which i personally have no problems with.
Attachments
connect2.png
connect2.png (1.9 KiB) Viewed 5919 times
connect.png
connect.png (5.83 KiB) Viewed 5916 times
NCarlson
Traffic Manager
Traffic Manager
Posts: 200
Joined: 18 Dec 2002 17:49

Post by NCarlson »

I may be the only one, but I prefer the 4 way system all around, it strikes me as simpler, less wastful of tiles and I also like that it is consistent with how rails are built. I prefe the looks as well. The 8 way system reminds me of the diagonals in RCT (imo terrible).
User avatar
Lilman424
Tycoon
Tycoon
Posts: 2743
Joined: 20 Oct 2002 14:55
Location: Georgia
Contact:

Post by Lilman424 »

how are 4-way roads consistent with 8-way rails?
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction. - Albert Einstein
NCarlson
Traffic Manager
Traffic Manager
Posts: 200
Joined: 18 Dec 2002 17:49

Post by NCarlson »

I mean the system for going to 8 way road, the one that is like the system used for rails is preferable to the other one proposed.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: Bing [Bot] and 19 guests