Round Earth in Openttd
Moderator: OpenTTD Developers
Round Earth in Openttd
Do somebody repair a game for a round Earth please
Just the train when it arrives at the edge of the map, appears on the other side.
Just the train when it arrives at the edge of the map, appears on the other side.
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
Re: Round Earth in Openttd
This is a very interesting concept, but I think it'd be more useful if you could go between/link maps
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: Round Earth in Openttd
You could play on a bigger map and have the same result. Linking maps while keeping them separate is not possible, as calculations would still need to be done for both maps (although drawing and stuff is not needed for one of them).Gwyd wrote:This is a very interesting concept, but I think it'd be more useful if you could go between/link maps
I do recall that there is a patch or NewGRF that would create industries at the map edge where you could drop all cargoes and get all cargoes back, mimicking such a link.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Re: Round Earth in Openttd
Design your maps or scenarios using polar projection?
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: Round Earth in Openttd
kamnet wrote:Design your maps or scenarios using polar projection?
Earth is Flat ?
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
Re: Round Earth in Openttd
Yes !agentw4b wrote:kamnet wrote:Design your maps or scenarios using polar projection?
Earth is Flat ?
- Attachments
-
- N0m7OHA.jpg (62.83 KiB) Viewed 1788 times
Re: Round Earth in Openttd
Drury wrote:Yes !agentw4b wrote:kamnet wrote:Design your maps or scenarios using polar projection?
Earth is Flat ?
I made it .
viewtopic.php?f=60&t=82397
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
- Redirect Left
- Tycoon
- Posts: 7249
- Joined: 22 Jan 2005 19:31
- Location: Wakefield, West Yorkshire
Re: Round Earth in Openttd
That'd be an interesting way to play. Certainly should be possible (with a lot of editing / patching). Although you'd need to make sure you had tracks setup at the other side of the map. It'd be hard to make sure you have properly aligned tracks at the other side of the map.agentw4b wrote: Just the train when it arrives at the edge of the map, appears on the other side.
Re: Round Earth in Openttd
Getting track/roads to match either side would be the simple part.
Rewriting the pathfinder to crossover the map edges to the other side would be the challenge
Rewriting the pathfinder to crossover the map edges to the other side would be the challenge
- Redirect Left
- Tycoon
- Posts: 7249
- Joined: 22 Jan 2005 19:31
- Location: Wakefield, West Yorkshire
Re: Round Earth in Openttd
Hmm. Would probably require a pathfinder specifically wrote for this purpose, clone another one then edit it to your needs. Not sure it'd work with a normal 'earth' in openTTD after modification, with any sort of efficiency.Leanden wrote: Rewriting the pathfinder to crossover the map edges to the other side would be the challenge
Re: Round Earth in Openttd
What if the map actually wrapped around, so at the left, the right would start again. This would mean old pathfinders work... Maybe. This is why I dont do patches.
- Redirect Left
- Tycoon
- Posts: 7249
- Joined: 22 Jan 2005 19:31
- Location: Wakefield, West Yorkshire
Re: Round Earth in Openttd
I suspect that'd be more patching than just making the train appear at the other side, more graphic stuff in my experience takes more work.Gwyd wrote:What if the map actually wrapped around, so at the left, the right would start again. This would mean old pathfinders work... Maybe. This is why I dont do patches.
Re: Round Earth in Openttd
When you see this done in a game (like in Civilization games), what they actually do is just have a regular rectangular map and teleport things from one side to the other at the edges (which is the original suggestion anyways), it's just made to look seamless by rendering the edge bits from the other side when needed. There isn't really a magical way to have looping maps without this workaround.Gwyd wrote:What if the map actually wrapped around, so at the left, the right would start again. This would mean old pathfinders work... Maybe. This is why I dont do patches.
Re: Round Earth in Openttd
Round Earth should, of course, only be one of the choices. If you can do this, it will be great.
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
Re: Round Earth in Openttd
No it would literally require no modification. Pathfinder works over abstract graphs which don't care about space-time geometry, and a piece of rail going to the other side of the map over the edge is not in any way different from a piece of rail simply going from left to right in an ordinary fashion. Same logic applies to rails that loop over the edge of the map - loops are already well handled in ordinary maps.Redirect Left wrote:Hmm. Would probably require a pathfinder specifically wrote for this purpose, clone another one then edit it to your needs. Not sure it'd work with a normal 'earth' in openTTD after modification, with any sort of efficiency.Leanden wrote: Rewriting the pathfinder to crossover the map edges to the other side would be the challenge
Re: Round Earth in Openttd
This is not at all complicated, I wrote it some years ago not for OpenTTD. All you need is the access of the map (be it read or write) to be wrapped in a function. The function translates any false coordinates to correct coordinates. Then make sure all scripts always use this function and everything rolls just fine without big changes of the core code, yet the game "world" becomes infinite beyond the edges.raidho36 wrote:Redirect Left wrote:Leanden wrote: Rewriting the pathfinder to crossover the map edges to the other side would be the challenge
if you request data for position X,Y and X and/or Y is a negative value exiting the map in the top or a larger than the map size number exiting in the bottom, than add or subtract the value from map size until a valid positive value is the result. depending on if the map is using 0,0 as first coordinate, or 1,1 doesn't matter for the concept. So for explaining and understanding, I now assume the first tile is identified as [1,1], in programming this more likely will be position 0,0.
hence, in the case we are using a map size 1024x1024:
requesting coordinate [-20,1300] (both X and Y are outside the map range) the function simply results in returning values for [1004,276]
or requesting coordinate [500,4000] (Y is outside the map but X is not) results in returning values for [500,928]
in the last example the value 4000 is 3 times outside the world so 3 times 1024 was subtracted.
or maybe more simple to understand assuming we again have a map size of 1024x1024 tiles:
requesting the coordinate [-1,-1] should result in accessing the data for [1023,1023] and requesting ccordinate [1025,1025] will result in accessing the data of [1,1]
In this virtually visualised example (not from OpenTTD), it works the same way, the lower corner is closer to the upper corner. the left corner is closer to the right corner.
The pathfinder should now automatically find a shorter route to a location outside the map if that same location inside the map is further away.
Re: Round Earth in Openttd
while this approach would generally work, you get two main problems here:
- the world you produce isn't actually "round" but "toroidal"
- the map generator is not equipped to make sure the map border is "smooth" enough to connect both sides, unless you force map edges to be water
Re: Round Earth in Openttd
Anybody has (still) any interest in this thing?
I recently had this same idea, and after doing my homework (aka searching the forums:) it turned out others had the same idea before me.
But anyway, this feature could bring a new twist to the gameplay.
I recently had this same idea, and after doing my homework (aka searching the forums:) it turned out others had the same idea before me.
But anyway, this feature could bring a new twist to the gameplay.
Re: Round Earth in Openttd
This is an interesting idea, but I'm not convinced it would improve the gameplay.
One of the challenges in the game is to deliver cargo from A to B as quickly as possible to get the highest reward. This requires planning a route in a way that would minimize the detours, while taking into account the terrain, water, towns, other transport routes, signal gaps, curve width... As the cargo supply grows, the line throughput needs to be increased, which involves planning for additional parallel tracks, minimizing the signal gap, optimizing junctions etc. The greatest distance that can be covered would be corner to corner, which e.g. on a 1024x1024 map would be 2048 tiles (by Manhattan distance).
Now let's have the rectangular game map wrapped into a torus (cf. Snake in old Nokia phones). Now the greatest possible distance on the map of same size would be just 1024 (from the centre to any of the corners). Moreover, you could build the track in almost any direction, and eventually reach the destination without excessive detours.
That said, has anybody considered building a railroad simulator in Hyperrogue geometry? Possible features would include:
One of the challenges in the game is to deliver cargo from A to B as quickly as possible to get the highest reward. This requires planning a route in a way that would minimize the detours, while taking into account the terrain, water, towns, other transport routes, signal gaps, curve width... As the cargo supply grows, the line throughput needs to be increased, which involves planning for additional parallel tracks, minimizing the signal gap, optimizing junctions etc. The greatest distance that can be covered would be corner to corner, which e.g. on a 1024x1024 map would be 2048 tiles (by Manhattan distance).
Now let's have the rectangular game map wrapped into a torus (cf. Snake in old Nokia phones). Now the greatest possible distance on the map of same size would be just 1024 (from the centre to any of the corners). Moreover, you could build the track in almost any direction, and eventually reach the destination without excessive detours.
That said, has anybody considered building a railroad simulator in Hyperrogue geometry? Possible features would include:
- an infinite ocean with infinite number of infinitely large islands;
- straight parallel tracks that can be spanned with a very short bridge, yet have enough space between them to fit a very large junction;
- a network just 30 tiles at its widest could reach about 14 million of different tiles;
- any route that doesn't bend back on itself will turn out to be very close to a straight line.
Last edited by odisseus on 09 Dec 2022 22:28, edited 4 times in total.
Who is online
Users browsing this forum: No registered users and 17 guests