90 degree tunnels
Moderator: OpenTTD Developers
90 degree tunnels
would nto be nice to have the opportunity to have angle 90 degree tunnels in the game??
but to make the code easier we can split it into 2 tunnels
if we create a new tool if possilbe
you will be able to lower the soil but in a level under you to create a cave? and road and rail road can have their one tool that will not only create the cave but also put all the diagonal pieces of track so it can be used?
if the game can allow the creation of caves
then we can do 90 degree tunnels by simply make the 2 tunnels that will meet in the underground cave we created.
i do not know how the game treat the hills
but would it be possible??
lets see if i can get another answer than code it ypurself
but to make the code easier we can split it into 2 tunnels
if we create a new tool if possilbe
you will be able to lower the soil but in a level under you to create a cave? and road and rail road can have their one tool that will not only create the cave but also put all the diagonal pieces of track so it can be used?
if the game can allow the creation of caves
then we can do 90 degree tunnels by simply make the 2 tunnels that will meet in the underground cave we created.
i do not know how the game treat the hills
but would it be possible??
lets see if i can get another answer than code it ypurself
Re: 90 degree tunnels
i include a pic to show what i mean
the new tool will make the cave of that size adding the track and leave all soil above untouched only touch this small area
when you have the cave you can just build the 2 tunnels and you have a 90 degree angle tunnel
in more thinking
if cave is possible then we can use the cave tool to excavate a mountain for a 2 line track and only put tunel in the start end of tunnel. the rest will be a cave and you can build signals in the lines crossing.
also it opens the opportunity for underground stations to be build
a huge help for in city transportation where you could have your train station in the city but not destroying the city
we need an offset number in the construction tool to tell the game what depth to build the select item
game can check if there is empty space at that space and build them
in this scenario the copy past utility will be handy since you will not have visibility, so you make the configuration somewhere and then you copy it there it can be more like cut paste.
you build it on surface so you can see what you build and then the cut past function not COPY will just move it in the right place. and the cut paste function does not go against the idea of the game. you build it in real time but this tool will only help you place it where you should have put it
also i remember people asking the tunnel for canals if gave is possible this will be possible to be done.
you can even build underground airports with 100% fatality rate lol
i think the gave idea can really spice up the game
solve many request of the past
underground, 2 lien tunnels, signals in tunnels, underground station, underground canals,
the new tool will make the cave of that size adding the track and leave all soil above untouched only touch this small area
when you have the cave you can just build the 2 tunnels and you have a 90 degree angle tunnel
in more thinking
if cave is possible then we can use the cave tool to excavate a mountain for a 2 line track and only put tunel in the start end of tunnel. the rest will be a cave and you can build signals in the lines crossing.
also it opens the opportunity for underground stations to be build
a huge help for in city transportation where you could have your train station in the city but not destroying the city
we need an offset number in the construction tool to tell the game what depth to build the select item
game can check if there is empty space at that space and build them
in this scenario the copy past utility will be handy since you will not have visibility, so you make the configuration somewhere and then you copy it there it can be more like cut paste.
you build it on surface so you can see what you build and then the cut past function not COPY will just move it in the right place. and the cut paste function does not go against the idea of the game. you build it in real time but this tool will only help you place it where you should have put it
also i remember people asking the tunnel for canals if gave is possible this will be possible to be done.
you can even build underground airports with 100% fatality rate lol
i think the gave idea can really spice up the game
solve many request of the past
underground, 2 lien tunnels, signals in tunnels, underground station, underground canals,
- Attachments
-
- 90degree.gif (72.51 KiB) Viewed 4516 times
Re: 90 degree tunnels
Signals in tunnels and bridges are already done as a patch. Look in JGR's patchpack.
Underground station, cave etc idea is good, and is something which would need implementing. However, it would need an underground view (like SimCity 4) and so a rewrite of the map array. Thus, it is possible, you will be able to load your old savegames with the new map array, however, there is total irreversibility. Also, rewriting the map array is hard, although i'm sure there are some people (such HackaLittleBit, that done the signals in tunnels patch and cirdan, who did NMF) which may be able to do it.
Underground station, cave etc idea is good, and is something which would need implementing. However, it would need an underground view (like SimCity 4) and so a rewrite of the map array. Thus, it is possible, you will be able to load your old savegames with the new map array, however, there is total irreversibility. Also, rewriting the map array is hard, although i'm sure there are some people (such HackaLittleBit, that done the signals in tunnels patch and cirdan, who did NMF) which may be able to do it.
Re: 90 degree tunnels
acs121 wrote:Signals in tunnels and bridges are already done as a patch. Look in JGR's patchpack.
Underground station, cave etc idea is good, and is something which would need implementing. However, it would need an underground view (like SimCity 4) and so a rewrite of the map array. Thus, it is possible, you will be able to load your old savegames with the new map array, however, there is total irreversibility. Also, rewriting the map array is hard, although i'm sure there are some people (such HackaLittleBit, that done the signals in tunnels patch and cirdan, who did NMF) which may be able to do it.
well visibility is another issue
butt first first
if we could get the cave function would be nice even if we build in blind
that why i said the toll like copy past, or even better cut paste will be handy,
build it somewhere you can see and then move it into place.
as i see ti now the landscaping tool effect the whole column of area
to make a cave we will have to say to ignore the above area and only apply changes to the tiles under it
which if possible then we can have the opposite tool and dig in things
dig in an area build what you want to do and then dig it in. in this case the landscape tool will not affect the area bellow only the area above
as for visibility
an easy way around is to draw part of the map
meaning if the map lets say has a height of 16 tiles and you want to see at tile 12 then ignore the 4 tiles or in simple terms treat the game as if it had only 12 tiles and not 16
or maybe with invisibility transparency?? make the above tiles to be invisible??
and this function goes beyond the signals in the tunnel since now you can custom make tunnels of any width and crossing and even put depot inside them
for beginning i would not mind building blind if we can have the feature
visibility can come later on
if we can get visibility then it will be awesome since we can really build underground
imagine a late game with a big city with a complex multi level metro running in it
Re: 90 degree tunnels
Visibility is an issue. Imagine a train getting blocked because you badly placed a signal. How can you solve the problem if you're in total blindness ?ANIKHTOS wrote:acs121 wrote:Signals in tunnels and bridges are already done as a patch. Look in JGR's patchpack.
Underground station, cave etc idea is good, and is something which would need implementing. However, it would need an underground view (like SimCity 4) and so a rewrite of the map array. Thus, it is possible, you will be able to load your old savegames with the new map array, however, there is total irreversibility. Also, rewriting the map array is hard, although i'm sure there are some people (such HackaLittleBit, that done the signals in tunnels patch and cirdan, who did NMF) which may be able to do it.
well visibility is another issue
butt first first
if we could get the cave function would be nice even if we build in blind
that why i said the toll like copy past, or even better cut paste will be handy,
build it somewhere you can see and then move it into place.
as i see ti now the landscaping tool effect the whole column of area
to make a cave we will have to say to ignore the above area and only apply changes to the tiles under it
which if possible then we can have the opposite tool and dig in things
dig in an area build what you want to do and then dig it in. in this case the landscape tool will not affect the area bellow only the area above
as for visibility
an easy way around is to draw part of the map
meaning if the map lets say has a height of 16 tiles and you want to see at tile 12 then ignore the 4 tiles or in simple terms treat the game as if it had only 12 tiles and not 16
or maybe with invisibility transparency?? make the above tiles to be invisible??
and this function goes beyond the signals in the tunnel since now you can custom make tunnels of any width and crossing and even put depot inside them
for beginning i would not mind building blind if we can have the feature
visibility can come later on
if we can get visibility then it will be awesome since we can really build underground
imagine a late game with a big city with a complex multi level metro running in it
Underground view is what i am talking about : total transparency for tiles that block the view.
Re: 90 degree tunnels
For this a rewrite of the map array is needed (all that information needs to be stored somewhere):
iirc the maximum size of the map is 8192x16384. Each tile takes 10 bytes at the time of this writing. So, that's a whopping 1.28 Gigabytes just for the map array. These maps need to be playable too.
However, we're looking to store information on underground. Now we end up doubling the amount of memory required just for storing 1 level of underground. You would probably want more, given that you'd want to build some cool underground constructs. Lets just say 3 underground layers to be nice. That would make it 5.12 Gigabytes of memory needed (ground level + 3 underground levels), just for the map array (if set to max size).
Of course someone is going to come by and ask for tile animations on underground stations, cellars for buildings, caves and underground rivers. Perhaps things get asked about mines in the games actually occupying space underground. So, ok. The game needs to loop over all those tiles too. Now the system requirements for openttd go up even further (not just memory now, but you will also need a faster processor, a faster main board and faster memory.
Ok, obviously it's not useful to blindly claim some Gigabytes of memory when you're not even sure it's all going to be used. So, we need to find a solution to not consume that much memory... however, we must also maintain performance, as openttd's map array is consulted quite frequently by the game.
A solution for the performance/memory problem needs to be found that
EDIT: corrections in maths and explanation added.
iirc the maximum size of the map is 8192x16384. Each tile takes 10 bytes at the time of this writing. So, that's a whopping 1.28 Gigabytes just for the map array. These maps need to be playable too.
However, we're looking to store information on underground. Now we end up doubling the amount of memory required just for storing 1 level of underground. You would probably want more, given that you'd want to build some cool underground constructs. Lets just say 3 underground layers to be nice. That would make it 5.12 Gigabytes of memory needed (ground level + 3 underground levels), just for the map array (if set to max size).
Of course someone is going to come by and ask for tile animations on underground stations, cellars for buildings, caves and underground rivers. Perhaps things get asked about mines in the games actually occupying space underground. So, ok. The game needs to loop over all those tiles too. Now the system requirements for openttd go up even further (not just memory now, but you will also need a faster processor, a faster main board and faster memory.
Ok, obviously it's not useful to blindly claim some Gigabytes of memory when you're not even sure it's all going to be used. So, we need to find a solution to not consume that much memory... however, we must also maintain performance, as openttd's map array is consulted quite frequently by the game.
A solution for the performance/memory problem needs to be found that
- Doesn't come at a too big a performance penalty;
- Doesn't drain memory too much;
- Is compatible with the current map array;
- Can be dropped in, instead of needing to change everything.
EDIT: corrections in maths and explanation added.
Last edited by Expresso on 07 Jul 2018 15:42, edited 1 time in total.
- trainman1432
- Transport Coordinator
- Posts: 316
- Joined: 05 Jan 2013 02:34
- Location: at home
Re: 90 degree tunnels
perhaps we should take a peek into
ahem
simutrans
call me a heretic but they get the tunnels right. Subways aren't uncommon there. Heck, most paks have subway kits!
ahem
simutrans
call me a heretic but they get the tunnels right. Subways aren't uncommon there. Heck, most paks have subway kits!
Jetrain
YATTC
YATTC
Re: 90 degree tunnels
I don't think Simutrans is coded in C++, so in fact that's different.
- trainman1432
- Transport Coordinator
- Posts: 316
- Joined: 05 Jan 2013 02:34
- Location: at home
Re: 90 degree tunnels
Sure, but it may help to look as to what they do to store data on tunnel location. It's not C, sure, but whatever they do might get some ideas flowing.
Jetrain
YATTC
YATTC
Re: 90 degree tunnels
There are things you can code with Java you can't code in C++.trainman1432 wrote:Sure, but it may help to look as to what they do to store data on tunnel location. It's not C, sure, but whatever they do might get some ideas flowing.
See Minecraft for example. Coded in Java, thus allowing a HUGE map size and an even more complicated map array, this using as much RAM as a game with over 5k vehicles in OpenTTD.
Re: 90 degree tunnels
Oh really, please tell me how that is not possible in C++?acs121 wrote:There are things you can code with Java you can't code in C++.
See Minecraft for example. Coded in Java, thus allowing a HUGE map size and an even more complicated map array, this using as much RAM as a game with over 5k vehicles in OpenTTD.
Just because something doesn't exist doesn't mean it's not possible.
Programming language is mostly irrelevant, you can express pretty much everything in any programming language you want.
Likely the real reason why it doesn't exist is that it is a huge undertaking, or it costs too much performance (Minecraft doesn't move 5K vehicles every few micro-seconds), or it would break many or all NewGRFs (Minecraft uses the GPU for rendering rather than the CPU, we can't break away from that without breaking NewGRFs).
So yes, there are likely good reasons why there is no better map array yet, but programming language isn't it.
Of course, feel free to proof me wrong, build openttd2 in Java, and show it can be done. I would honestly be very much impressed if you manage it.
Being a retired OpenTTD developer does not mean I know what I am doing.
-
- Route Supervisor
- Posts: 429
- Joined: 27 Mar 2013 08:58
- Location: Strumien
- Contact:
Re: 90 degree tunnels
Java eats a lot more memory than C/C++ for a single object. I saw a video somewhere about it. So the map size would be very limited.
Re: 90 degree tunnels
One solution to the memory consumption problem might be to cut the map up in little pieces (say 64x64 (the smallest map size)) and have underground layers on a per piece basis. However, this would mean another layer of indirection (which would come at a performance penalty).
Another option could be to put all tiles in a separate place when there are underground tiles present and then make the tile in question contain a reference to the appropriate position. However, this also comes at a performance penalty.
How do you solve underground editing for the user interface?
Oh, and while we're at it: and how to deal with the selection rectangles? Leave as is? Apply 3D (no, not opengl) to them? If so, how?
What if you end up editing inside a mountain? How do you solve that problem?
What would happen to the catchment area of stations? Do they check underground too now? How deep underground can stations be built until their catchment area no longer covers the town on top? Does the catchment area remain a flat area, or does it become a box?
Not to imagine, this idea opens up a whole can of worms.
Another option could be to put all tiles in a separate place when there are underground tiles present and then make the tile in question contain a reference to the appropriate position. However, this also comes at a performance penalty.
How do you solve underground editing for the user interface?
Oh, and while we're at it: and how to deal with the selection rectangles? Leave as is? Apply 3D (no, not opengl) to them? If so, how?
What if you end up editing inside a mountain? How do you solve that problem?
What would happen to the catchment area of stations? Do they check underground too now? How deep underground can stations be built until their catchment area no longer covers the town on top? Does the catchment area remain a flat area, or does it become a box?
Not to imagine, this idea opens up a whole can of worms.
-
- Route Supervisor
- Posts: 429
- Joined: 27 Mar 2013 08:58
- Location: Strumien
- Contact:
Re: 90 degree tunnels
CS did all this in Locomotion, so it's not impossible, so stop this hysteria. Only we need somebody smart to figure out all this.
Re: 90 degree tunnels
By "you can't code in x or y language" i mean that it can be coded, but very differently.Alberth wrote:Oh really, please tell me how that is not possible in C++?acs121 wrote:There are things you can code with Java you can't code in C++.
See Minecraft for example. Coded in Java, thus allowing a HUGE map size and an even more complicated map array, this using as much RAM as a game with over 5k vehicles in OpenTTD.
Just because something doesn't exist doesn't mean it's not possible.
Programming language is mostly irrelevant, you can express pretty much everything in any programming language you want.
Likely the real reason why it doesn't exist is that it is a huge undertaking, or it costs too much performance (Minecraft doesn't move 5K vehicles every few micro-seconds), or it would break many or all NewGRFs (Minecraft uses the GPU for rendering rather than the CPU, we can't break away from that without breaking NewGRFs).
So yes, there are likely good reasons why there is no better map array yet, but programming language isn't it.
Of course, feel free to proof me wrong, build openttd2 in Java, and show it can be done. I would honestly be very much impressed if you manage it.
Of course, Minecraft uses GPU and not CPU like OpenTTD. But what's about "breaking NewGRFs" ? You mean that every addition we make to the game needs to be compatible with stuff from 10 or 15 years ago like the Cargo Set ?
Also, in Minecraft, the only comparable thing to vehicles are mobs, in Minecraft they disappear out of the player's range. This cannot be done in OpenTTD. However, Minecraft can run redstone circuits and thousands of command blocks at the same time, while OpenTTD can't really handle thousands of console entries at the same time.
Re: 90 degree tunnels
yes. but not because there's anything special in those GRFs from 15 years ago. any change carelessly done in this regard would throw out ALL the GRFs from the past 15 years simultaneously, including those from yesterday. and that is just too huge of a content library to just throw away for a relatively minor feature.acs121 wrote:But what's about "breaking NewGRFs" ? You mean that every addition we make to the game needs to be compatible with stuff from 10 or 15 years ago like the Cargo Set?
Last edited by Eddi on 09 Jul 2018 22:31, edited 2 times in total.
Re: 90 degree tunnels
You mean the game that was built from the ground up with a completely unrelated game engine adopted from RCT with absolutely no legacy or compatibility issues to contest with?lukasz1985 wrote:CS did all this in Locomotion, so it's not impossible, so stop this hysteria. Only we need somebody smart to figure out all this.
Not sure how this is at all relevant.
Re: 90 degree tunnels
Build a better OpenTTD and the world will beat a path to your door.
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Re: 90 degree tunnels
Wow, really Strange conversation…
In fact "anything" an be done with "any" langage".
The problem isn't a matter of langage nor even a problem that writting and maintaining more complex code in a langage than with another one.
The problem is a matter of "how it's done now".
The core of OTTD is about it's way to store and manage the map.
We can change the way it's coded, but this implies many changed in all features of the program.
And for some benefits it may bring some enormous limitations.
You may have the same problems with any langage.
In fact "anything" an be done with "any" langage".
The problem isn't a matter of langage nor even a problem that writting and maintaining more complex code in a langage than with another one.
The problem is a matter of "how it's done now".
The core of OTTD is about it's way to store and manage the map.
We can change the way it's coded, but this implies many changed in all features of the program.
And for some benefits it may bring some enormous limitations.
You may have the same problems with any langage.
Re: 90 degree tunnels
Right now OpenTTD can't manage some few games, this due to their number of vehicles moving all at the same time, CargoDist (it does use RAM), constant pathfinding, etc.MagicBuzz wrote:Wow, really Strange conversation…
In fact "anything" an be done with "any" langage".
The problem isn't a matter of langage nor even a problem that writting and maintaining more complex code in a langage than with another one.
The problem is a matter of "how it's done now".
The core of OTTD is about it's way to store and manage the map.
We can change the way it's coded, but this implies many changed in all features of the program.
And for some benefits it may bring some enormous limitations.
You may have the same problems with any langage.
Game Scripts or AIs will only slow down your game. And they are stored in the savegame as well as the NewGRFs.
Who is online
Users browsing this forum: No registered users and 16 guests