ardazishvili / Sota

Editable generator of discrete structures for Godot 4
MIT License
31 stars 2 forks source link

API to manipulate Polyhedron #20

Open ardazishvili opened 2 months ago

ardazishvili commented 2 months ago

6 introduced Polyhedron made from hex cells. Cell may be of different form, e.g. simple prism. This issue is about definition of API to use it. Each API method should contain following information:

  1. Specific action
  2. What to return
  3. Scenario in which described action is useful

Example for Polyhedron made from hex prismatic cells of 4 types (Mountain, Hill, Water, Plain):

  1. Click on tile
  2. Return prismatic cell. It has properties its own properties which describes e.g. its type
  3. Turn-based strategy game where buildings are placed depending on type of tile
HKunogi commented 2 months ago

Would be cool an option to have in such API to animate individual tiles. An example would be: Given tiles could "fall" inwards the center of the sphere, leaving holes on the place they were into (one could for example use this to anime an hexagon swap, where one hexagon falls inwards and a different one rise from the center outwards). This could be made similar to select an individual tile, then make such tile "invisible" while at same time spawning a new hexagon that looks exactly like the tile made invisible on the sphere mesh and then animate that spawned tile as desired (in case of animating such tile back to the original state of the sphere, the copy could then be freed and the invisible tile would become visible again), another addition to such thing would be making so the physics body would take into account tiles that aren't present, making so other objects on top would fall as well inwards in case the gravity is set to the center of the sphere.

ardazishvili commented 2 months ago

Sounds nice, let me think a bit about it

ardazishvili commented 1 month ago

Would be cool an option to have in such API to animate individual tiles. An example would be: Given tiles could "fall" inwards the center of the sphere, leaving holes on the place they were into (one could for example use this to anime an hexagon swap, where one hexagon falls inwards and a different one rise from the center outwards). This could be made similar to select an individual tile, then make such tile "invisible" while at same time spawning a new hexagon that looks exactly like the tile made invisible on the sphere mesh and then animate that spawned tile as desired (in case of animating such tile back to the original state of the sphere, the copy could then be freed and the invisible tile would become visible again), another addition to such thing would be making so the physics body would take into account tiles that aren't present, making so other objects on top would fall as well inwards in case the gravity is set to the center of the sphere.

Brief description of WIP #71: Implemented previously: polyhedron consists of tiles and each tile has mesh - subclass of godot::PrimitiveMesh In progress: