Incidencia #42376

S3_0 + : document tile topology , vs map topology , vs client view for newcomers

Abrir Fecha: 2021-05-24 05:23 Última actualización: 2021-05-30 22:43

Informador:
Propietario:
(Ninguno)
Tipo:
Estado:
Open
Componente:
Hito:
(Ninguno)
Prioridad:
4
Gravedad:
4
Resolución:
Ninguno
Fichero:
Ninguno

Details

Edited : This ticket was open as a bug report, and it was a feature, linked to subttle things.

=> changed to a task : documentation for new developpers, who will probably be as lost as i was. The current documentation exists, but there are some subttle and baffling things that i plan to write as i understand them (or fall in the trap)


In S2_6, there were 4 types of defaults tileset : (iso or not) x (square or hex)

  • overview (= square shape) = tileset trident -> this one has disapeared in S3_0,
  • square iso (=diamond shape) = tileset isotrident
  • hex
  • isohex

In 3_0 there remains only 3 types in the code, where topology = square is supposed to handle both 'square' cases (iso and non-iso). This is not possible because "geography" on screen is really different :

- with 'overview' all the centers of tile are aligned horizontally and vertically - with 'square-iso' the center of one tile is at the level of the corners of its neigbours , and one nedd to go2 tiles horizontally (or vertically) to find another center.

For hex tiles, this could have been possible, if and only if the tiles where orientented in the same way, but sadly they are rotated by pi/2 (one have 2 horizontal sides, and the other 2 vertical ) (see data/*/grid.png)

(Accordingly fc30-client-gtk* , and associated file freeciv-client-rc-3.0 have changed too.)

Overview is used in several scenarios, with known map (europe, world ...), which get distorted, and this is very visible.->bad player's feeling.

Ticket History (3/11 Histories)

2021-05-24 05:23 Updated by: alain_bkr
  • New Ticket "S3_0 has lost one default tileset (square overview in 2.6)=> pb with scenarios" created
2021-05-24 05:37 Updated by: cazfi
Comentario

The lack of possibility to use iso tilesets for overhead map topology was *by far* the most reported "bug" in S2_6 where it was prevented by the way you expect. So we had to back a bit to the S3_0 way.

2021-05-24 05:45 Updated by: cazfi
Comentario

Some related tickets where the current implementation was introduced: https://www.hostedredmine.com/issues/653727 https://www.hostedredmine.com/issues/777520

2021-05-24 07:35 Updated by: alain_bkr
Comentario

I think that in gtk3.22 client, for square tilesets, one can know if the tileset fits the geometry by looking at the "white rectangle" in the minimap vue :

- it is a trapeze when tilesets does not matches topology. - it is a rectangle parrallel to the border of the screen when ok.

=> maybe for 'square' we can automagically detect it ? (this does not change the need for a 4th default tileset, but this seems an easy fix).

For hex, it is always a rectangle, but that does not prove anything , the minimap seems visually only slightly distorted (flatten in one direction and streched in the other) , but connectivity has changed too (something like ripped horizontally , horizontal road are no more connected and seems dash-dot (hex map represented like an isohex one)

2021-05-24 08:15 Updated by: cazfi
Comentario

Is there some regression relative to S2_5, which is what users wanted us to return to?

2021-05-24 09:04 Updated by: alain_bkr
Comentario

Reply To cazfi

The lack of possibility to use iso tilesets for overhead map topology was *by far* the most reported "bug" in S2_6 where it was prevented by the way you expect. So we had to back a bit to the S3_0 way.

I don't understand :-(

One can draw something isometric inside a square base (like your screen which is rectangular), and this i already the case even in overhead : we do not see only the hairs of units, we see them in pseudo perspective (maybe not isometric) on top of a square ground tile. Or maybe compared with other games ?

Having an iso-square should not prevent the usage of overhead-square.


I try to reformulate There are different problems:

  • 3.x Client lack a selector for default overhead tileset , and the corresponding slot in freeciv-client-rc and in the code. (and they existed in 2.6)
  • Currently amplio is for both overhead and square-iso, this is wrong. In order to play with trident, a player must change the default of iso-square and set a non-iso-square tileset = trident . This is a bug. (and when later he will play iso-square he will have a wrong tileset...)
  • the default .autoaccept_tileset_suggestion=FALSE #42371 make things worse

There was a big job to make these scenario maps, and we really know how England or Europe map looks like, so we cannot afford putting a wrong tileset which will distort the map (And i love 1901 scenario, it makes me think a lot, about freeciv AI, and about the WW1/2)

I want trident back , with a selector for corresponding artwork. :-) Even if i agree i would prefer a more pretty tileset, bigger. Maybe when i have time again i ll try to see if an Imagemagick script can double the size of everything. Or does it need more work ?


Strictly speaking, freeciv uses only 2 different topologies : square vs hex (8 links with neighbouring tiles, vs 6), and i see no need to add triangle (3 links) and thats all that can be done. (after doc/HACKING i have read https://en.wikipedia.org/wiki/Euclidean_tilings_by_convex_regular_polygons and MC Escher ...)

3.x is still beta, so it is still possible to fix the savefile format if needed, game3.sav.xz and client-3.rc to store

  • iso / overhead
  • square/hex (maybe triangle for a far future)
  • 4 default tilesets (6 with triangle tiles)
2021-05-25 07:53 Updated by: alain_bkr
Comentario

Reply To cazfi

Is there some regression relative to S2_5, which is what users wanted us to return to?

No regression, everything is correct as i should have guessed.

I was confused by the pi/4 map rotation when i checked stuff in 2.6 with overhead = trident , and then compared with 3.0 : the screen changed to square-iso = amplio because of default_square_tileset=amplio, and the screen vue was 'distorted' due to perspective. But topology is the same (in game distances, connections ...)

Btw, now i have understood, i notice that the same thing could done for hex <-> isohex, with pi/6 rotation when switching between tilesets (i am still lost in the code as you may have noticed, i don't know if it just s:pi/4:pi/6:g or a big task, or even it is worth some effort)

2021-05-26 10:06 Updated by: alain_bkr
Comentario

(sorry to edit again this ticket, which is now far from what i thought to be a bug.)

This is a rather subtle and important subject , so while i am at it, i write things to clarify, and will propose something in the doc/HACKING or wiki if it seems useful.

Strictly speaking, Topology is a matter of being abble to continuously transform one object into another (that is without adding or removing holes in it)

There are 2 different tiles topologies in freeciv :

  • square (8 neighbouring tiles)
  • hex (6 neighbours)

It is impossible to transform 8 connections into 6 without removing something, so they are mathematically different topologies. This concerns the server , which handles the rules (can move from here to there)

When one generates a map, he chooses :

  • the 'canonical' tileset topology (square or hex)
  • the 'canonical' view (top or iso)
  • the borders of the map, according to wapping (4 borders for a flatmap, 2 borders for 1 wrapping, no border for both wrapping N/S and E/W). But in fc internally the map always has 4 borders.

This gives the map topology

  • For a given tile topology, we can choose 2 views (top or iso) which induce 2 map topologies depending on what happens on the border : is the tile parallel to it, or is there an out of map triangle
    For square  tile topology
    
    1           2
    ------     ----------
    | | | |     /\/\/\
    ------      \/\/\/
    | | | |     /\/\/\
    ------    -------
    

* same thing for hex

=> there are 4 maps topologies.

The map topology is decided by the the server , which sends it to the client. The only case where the client send topology informations is when the client asks for the server to create a map.


Iso view or top view concerns the client, which is able to correctly display a map with compatible tiles (square or hex)

  • eg : the "square" maps can be viewed either way, with diamond (iso) or rectangle (top), but not hex .
  • when the client has the same view family (iso/top) as the tiles used to generate the map, then in the minimap the white limit is parrallel to the borders. (a rectangle in a rectangle)
  • when the client has the other , then the minimap show a inclided rectangle (by pi/3 or sth) inside a rectangle .

=> The same thing could be done for hex , with a pi/6 or pi/3 rotation of something in the client.

Here i don't know what was made for square in order to make the client display stuff correctly. To be continued ...

(Edited, 2021-05-30 21:54 Updated by: alain_bkr)
2021-05-30 21:16 Updated by: alain_bkr
  • Hito Update from 3.0.0-beta3 (cerrado) to (Ninguno)
  • Tipo Update from Bugs to Tasks
  • Gravedad Update from 9 - Highest to 4
  • Prioridad Update from 6 to 4
  • Details Updated
  • Summary Updated
2021-05-30 21:19 Updated by: alain_bkr
  • Componente Update from Server to Documentation
2021-05-30 22:43 Updated by: alain_bkr
Comentario

https://www.hostedredmine.com/projects/freeciv/wiki/26tilesets

https://www.hostedredmine.com/issues/653727 Possibility to force tileset with different topology (like v2.5)

https://www.hostedredmine.com/issues/777520 Tileset topology compatibility levels now that overhead and iso tileset settings have been combined (for square topology tilesets)

https://www.hostedredmine.com/issues/685235 2.6 tileset selection is still a bit incoherent

Attachment File List

No attachments

Editar

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Entrar