Cylindrical / spherical / torus maps

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Cylindrical / spherical / torus maps

Post by Deadly-Bagel »

ssilk wrote:This gets off-topic. But wouldn't it be enough to ensure, that the average distance between all players is the same? With such a rule purely random start positions are not possible.
Well okay not 100% random as that would have chance of overlap or starting directly next to each other but you get the idea, it's not a fixed circle, players are just dotted around the map.

This is why it doesn't work in an infinite map:
MapPlacement.jpg
MapPlacement.jpg (18.88 KiB) Viewed 4095 times
Consider this somewhat random placement of starting areas, scaled however you like. In an 'infinite' map, the players on the 'outside' of this starting area, notably the four closest to the corners, have a clear advantage. They can expand in many directions (for ores, offsite processing, etc) and not encounter another player. The players to the north, west and east have only a single direction to expand in, while the poor player near the middle is almost guaranteed to run into another player regardless of which direction they drive.

However, if the edges wrap around in a torus shape, you see it becomes a lot more balanced. Everyone is now surrounded by enemies but finding one of them doesn't automatically tell you where the rest are.

Granted, this can be mitigated by settings. Setting starting resources to extremely high values that will practically never run out eliminates any need for expansion, although enterprising players at the edges could potentially run a rail line a distance away from their expected starting point, so the area they need to defend around the rocket silo (to use that game mode as an example) is much smaller. In games where they are not fixed to their starting point, they could potentially get to the car, load everything into it and drive a great distance out into nowhere making them extremely difficult to find, but they would know exactly where their opponents are.
Money might be the root of all evil, but ignorance is the heart.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Cylindrical / spherical / torus maps

Post by ssilk »

Hum, I say: If the distance to the next player is more than - hm - let's say 1500 tiles, it doesn't matter anything, where your startposition is.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Cylindrical / spherical / torus maps

Post by Deadly-Bagel »

Okay, let's consider a game mode in which you must defend a structure that cannot be moved, and everyone has enough local resource that they don't need to move, but that has a more combat-oriented theme. The guys in the corners are only likely to be attacked by two players. The guy in the bottom left is barely likely to get attacked at all, however the two nearer the centre are likely to be attacked by 3-5 opponents simply because they're surrounded.

Again, personally I don't really play multiplayer and have no intention of going PvP, I'm just saying for the purposes of multiplayer I can see why you would want a wraparound map.
Money might be the root of all evil, but ignorance is the heart.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Cylindrical / spherical / torus maps

Post by ssilk »

But if I would be in the middle and if I would have enough reosurces and space (so that a rush isn't so easy cause of pure distance), then my strategy would be to hide me away, by increasing my defense. Then - cause I'm in the center this is much easier than on the border - I would try to find new resources on places, where nobody would think of and which are strategically better.

I would mean: If you are in the center or on the edges on such a map is an advantage or disadvantage depends much more on the contents of a map and not on the start-position.

This is different to, when the map is much smaller, for example the average distance between players is only 400 tiles, then: yes!

And this is now really off-topic. ;)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
mrvn
Smart Inserter
Smart Inserter
Posts: 5865
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Cylindrical / spherical / torus maps

Post by mrvn »

I'm assuming distances between players are small enough so they meet soon.

If the map is unlimited then clearly the one in the middle is screwed. He has to fight through the enemy to get more resources. Where will get get alien artifacts from?

If the map is limited then the player is the middle is still screwed. He has to defend against 3-5 players coming from all sides. The corner players have it best with the smallest front to defend.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Cylindrical / spherical / torus maps

Post by ssilk »

Still off-topic.

You haven't played very much live strategy games, did you? :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
Oozenthor
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun Nov 06, 2016 4:50 am
Contact:

Re: Cylindrical / spherical / torus maps

Post by Oozenthor »

The problem is squares. Using hexagons (and 12 pentagons) a "Goldberg polyhedron" can be made to look like a planet.
Hexagon Planet.png
Hexagon Planet.png (79.76 KiB) Viewed 4016 times
It would be a major change for factorio, so maybe for "Factorio 2"
posila
Factorio Staff
Factorio Staff
Posts: 5353
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Cylindrical / spherical / torus maps

Post by posila »

Cylindrical/torus map would be cool, but I got stomach ache from just thinking how many things would need to change to make wrap-around work properly :(
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Cylindrical / spherical / torus maps

Post by ssilk »

As already mentioned: You don't need to wrap around everything.

Let's say the world is 1000x1000, so that from position 0,0 the world is in each direction 500 long. Then the position 501,0 is the same as the position -500,0. Which is equal to 501,501 or -500,-500. Or the position -1500,3001. Maps all to position 0,0 and it's a simple modulo operation.

Other stuff needs of course much changes, but the wrap-around seems to be quite simple.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
The Eriksonn
Fast Inserter
Fast Inserter
Posts: 230
Joined: Wed Jun 08, 2016 6:16 pm
Contact:

Re: Cylindrical / spherical / torus maps

Post by The Eriksonn »

Walking around an edge is no problem. It gets problematic when you for example try to render the world outside the border, because then the tile that should be renderd is taken from tiles from the other side of the World. And what would happen if your World was so that you could see both edges at once? Whould be weird in any case.

(Still Think it is a good idea ;) )
posila
Factorio Staff
Factorio Staff
Posts: 5353
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Cylindrical / spherical / torus maps

Post by posila »

I mean, it is doable, but it is not weekend project.

We would have to Adjust map generation so there is no seam on the edge of the map.
Adjust entity search and collision detection methods.
Fix all the places that don't use generic entity search (usually things that search for neighbors to connect - betls, pipes, walls, underground belt, underground pipes, electric poles).
Make sure logistic and construction networks properly cover area near edges.
Change distance calculations to take into account possible wrap-around when possible.
Change things that move to position (logistic/construction/combat robots, projectiles, biters, ...) to take into account possible wrap-around (even thought it would be funny, if you shoot in front of you, but projectile goes some other direction, crosses the map without wrap-around and hits the target from "behind"; less funny if robots were taking "long path" too).
Fix things that are rendered between two endpoints (wires, roboport connections, beams) or rendered with orientation to their target (robots, turrets, player, ...)
Adjust path finding for biters.
Adjust things that iterate over rectangle of chunks (for example pollution spreading or rendering, but rendering would need extra changes to make sure sprites are drawn in correct order)
Make sure everything also works in latency hiding.
Fix special logic like construction robot transfer when logistic network splits, logistic network triangulation, rail builder.
Probably other stuff that I currently can't think of.

And most of those things would be quite simple to do, if we didn't have surfaces :(
User avatar
Oozenthor
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun Nov 06, 2016 4:50 am
Contact:

Re: Cylindrical / spherical / torus maps

Post by Oozenthor »

So two weekends then? jk :lol:

For me the infinite map model means that I can never "win" the planet against the biters, only hold them to a draw so I like the idea of a finite play area and planetary domination. Also I have been playing the "Earth" map and when you hit the edges of the map it really takes away from the idea that you are on a planet, so a huge +1 for this idea.

I know it is probably unworkable with the current square grid system but I think a spherical play area would be super cool, think of solar panels at the north pole (they would 100% on for three months of the year) and seasonal terrain changes. Also I have visions of chasing the day/night terminator around the planet in a train. A man can dream....
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1686
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Cylindrical / spherical / torus maps

Post by MeduSalem »

The way posila describes it... it would probably mess up everything and take another year of development time just to fix all the bugs that would most likely occur :D

Worth it!


Oozenthor wrote:For me the infinite map model means that I can never "win" the planet against the biters, only hold them to a draw so I like the idea of a finite play area and planetary domination.
Actually the map is finite, even in infinite map mode. It's just so insanely huge that is highly unlikely that you can explore everything.


But it would be quite interesting to see how far one could push the "infinite research" stuff that will be coming... given one would exhaust all the resources of the entire planet.
User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Cylindrical / spherical / torus maps

Post by Deadly-Bagel »

Deadly-Bagel wrote:Torus is the best method of implementation but I really don't see the point. It's a novelty that doesn't add any gameplay value, would require a TON of development, and would likely introduce a thousand quirky logic bugs, as well as screwing with any ideas for multithreaded tick updates (if that's happening).
Called it lol
Money might be the root of all evil, but ignorance is the heart.
mrvn
Smart Inserter
Smart Inserter
Posts: 5865
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Cylindrical / spherical / torus maps

Post by mrvn »

The Eriksonn wrote:Walking around an edge is no problem. It gets problematic when you for example try to render the world outside the border, because then the tile that should be renderd is taken from tiles from the other side of the World. And what would happen if your World was so that you could see both edges at once? Whould be weird in any case.

(Still Think it is a good idea ;) )
Playing on a map smaller than the screen would be rather pointless in factorio I think. You need a certain space to have enough resources to win the game. But ...

From the drawing point you simply use modulo arithmetic. The drawing doesn't care the world wraps around and just keeps on going multiple times around the world. You would just see the same tile multiple times. It might be tricky for a "convert_map_position_to_screen_position" function since that would no longer have a unique result. But making it return a position centered on the player usually works.

The fun question is: Do you handle this case and draw the player multiple times? Or draw the player only once but the tile multiple times? Or limit zoom level to the size of the world?
Post Reply

Return to “Ideas and Suggestions”