Commit graph

135 commits

Author SHA1 Message Date
Gilles Roudière
18fe0bd025 Move tile transforms handling cache to TileData 2023-12-13 17:44:59 +01:00
Gilles Roudière
fcb8d19de0 Fixes TileMap occluders 2023-12-08 10:07:28 +01:00
kobewi
99262705a8 Fix TileMap layer reverts and defaults 2023-10-24 13:44:07 +02:00
Gilles Roudière
c820c8d1e6 Allow disabling the built-in tilemap navigation 2023-10-13 17:42:28 +02:00
Gilles Roudière
30b94bb8ab Improve TileMap Y-sorting performance 2023-09-25 18:49:04 +02:00
kobewi
a9f3154da3 Add per-tile flipping and transposing 2023-09-09 00:56:38 +02:00
Gilles Roudière
8c1e28237b Improve TileMap performances by using quadrants only for rendering 2023-09-08 15:33:43 +02:00
Gilles Roudière
d6379e9a93 Move TileMap layers to their own class 2023-07-20 17:23:38 +02:00
Rakka Rage
6dbae30000 Add tile_animation_mode option:
- to tile animation properties
- when "Default" each animation starts at time 0.
- when "Random Start Times" each animation starts at random time.
2023-06-06 09:31:18 -04:00
Proggle
093cb90077
TileMap: Add method to fetch the layer for a given body 2023-04-25 12:49:50 +02:00
kleonc
c49a7feae3 TileMap Fix rendering odd-sized tiles 2023-03-12 16:20:38 +01:00
smix8
fef6ffabe5 Fix TileMap NavigationServer 'Invalid ID' error
Fixes NavigationServer 'Invalid ID' error of the TileMap.
The issue was not caused directly by the TileMap but with the late call to get_world_2d()->get_navigation_map() while everything is shut down abruptly e.g. game window closed or Editor "Reload Saved Scene" function.
2023-02-14 01:39:21 +01:00
smix8
f2c31965c0 Fix navigation support for multilayered TileMaps
Fixes support for multilayered TileMaps by creating dedicated navigation maps for each layer.
2023-02-10 17:13:40 +01:00
Rémi Verschelde
4abbc0c3fb
Merge pull request #71630 from groud/fix_tilemap_layer_delete_undo
Fixes TileMap undo not restoring tiles
2023-01-18 22:20:12 +01:00
Gilles Roudière
13e7f1a143 Fixes TileMap undo not restoring tiles 2023-01-18 17:43:41 +01:00
Gilles Roudière
68afc0afa5 Bring back TileMap::get_cells_by_id 2023-01-18 15:56:31 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
kleonc
71398ae22a TileMap Pass some parameters by const & instead of by value 2022-12-12 11:33:42 +01:00
Gilles Roudière
3ea54bb3a1 Rename get_surrounding_tiles to get_surrounding_cells 2022-12-07 11:09:10 +01:00
Rémi Verschelde
1fa80bf9d6
Merge pull request #67330 from KoBeWi/immortal_scenes
Don't free instanced scenes when recreating tiles
2022-11-24 18:54:08 +01:00
Markus Sauermann
3b14f0334c Remove redundant Variant-types initializations 2022-11-14 19:35:19 +01:00
kobewi
f8f25adc0b Don't free instanced scenes when recreating tiles 2022-11-07 00:32:41 +01:00
Gilles Roudière
fe65d7aa7b Make terrain painting not change neighbors centers bits 2022-10-20 14:47:45 +02:00
Gilles Roudière
64e0c138d9 Fix TileMap occluders having a wrong transform 2022-10-06 14:06:33 +02:00
MisterMX
407bbdda20 refactor(TileMap): Return Rect2i in get_used_rect
Signed-off-by: MisterMX <mbxd12@web.de>
2022-09-28 17:04:15 +02:00
Marc Gilleron
aed3822a93 Change return type of get_configuration_warnings to PackedStringArray 2022-09-19 16:43:15 +01:00
Micky
694190a354 Rename TileMap/GridMap.world_to_map and opposite to local_to_map
For both TileMap and GridMap:
- `world_to_map` -> `local_to_map`
- `map_to_world` -> `map_to_local`

Also changes any mention of "world" in this context to "local" to avoid future confusion.

Finally, updates the docs of both methods for consistency.
In particular, adding a note on how to convert the returned values from local to global coordinates and vice versa.
2022-09-05 18:08:39 +02:00
kobewi
7305390fdc Add a method to get TileData from a cell 2022-08-16 15:04:39 +02:00
luz paz
38aaaa3cf9 Fix various typos not caught by codespell
Revert upstream `core/input/gamecontrollerdb.txt`. Upstream fix: https://github.com/gabomdq/SDL_GameControllerDB/pull/600
2022-07-21 07:38:23 -04:00
Gilles Roudière
62d2549e9e Add terrain center bit 2022-06-10 14:37:39 +02:00
reduz
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
Igor Kordiukiewicz
8f49150b10 Changed TileMap::set_cell alternative_tile default value to 0 2022-03-02 12:13:45 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Gilles Roudière
756e76293f Implement runtime update of TileData object in TileMap 2021-10-27 18:32:52 +02:00
Gilles Roudière
a6584e4cb8 Optimize TileMap layers updates 2021-10-27 12:07:52 +02:00
Gilles Roudière
d1aef45072 Allow updating TileMap cells using surrounding terrains 2021-10-21 16:57:28 +02:00
Gilles Roudière
1a95f893c4 Implement TileMap patterns palette 2021-10-19 11:57:37 +02:00
Gilles Roudière
0de2fce3e1 Greatly improve editor performances by deferring tiles related updates
Solve few update problems
2021-10-13 14:49:47 +02:00
kobewi
ec0d72a828 Add modulate property to TileMap layers 2021-10-10 20:28:57 +02:00
Gilles Roudière
f2caab4691 Improve TileMap physics for moving platforms and conveyor belts like movements 2021-09-29 17:56:30 +02:00
Gilles Roudière
f9e6329496 Implement animated tiles 2021-09-23 17:24:37 +02:00
Gilles Roudière
4bd7700e89 Implement properties arrays in the Inspector. 2021-09-07 09:51:28 +02:00
Aaron Franke
eb4902a455
Fix some unnecessary includes 2021-08-13 00:27:38 -05:00
kobewi
665dc7805b Fix get_used_rect() calculation 2021-08-05 20:40:21 +02:00
Gilles Roudière
ad8b5cd5a4 Implements TileMap layers and move TileSetPlugins's functions to the TileMap node instead 2021-08-02 13:54:39 +02:00
Gilles Roudière
5d34a81e52 Implement atlas merging and tile proxies 2021-07-21 12:36:37 +02:00
andriyDev
9f4bf5ec80 Deleted YSort, moved its functionality directly into Node2D.
YSort now has a compatibility alias to Node2D.
Updated TileMap to use the existing Node2D y_sort_enabled property instead
of its own property.
Updated Node2D doc to include the new y_sort_enabled member.
Updated TileMap doc to remove its mention of cell_y_sort.
Deleted YSort doc.
2021-06-05 00:55:25 -07:00
Gilles Roudière
3b35733b4c Restore a way to show collsion/navigation on TileMap.
Also remove an unused function.
2021-05-25 11:51:15 +02:00
Gilles Roudière
d8bb53cd21 Implement scenes tiles in TileMaps 2021-05-20 13:12:03 +02:00
Aaron Franke
75e3f6b732
Update TileMap to use Vector2i instead of two ints 2021-05-07 16:20:02 -04:00