jess-hammer/dual-grid-tilemap-system-unity
소개
Run the project, then use the mouse buttons to place or remove dirt.
기타 프로젝트측정된 스타 증가
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +2
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original✨👯 Dual-grid tilemap system in Unity 👯✨
This is a demo of how I implemented a dual-grid tilemap system in Unity 2023.1.11f1
👀 Looking for an alternative implementation? 👀
- Check out DualGrid by skner! It is structured as a Unity package, is compatible with RuleTiles and has automatic tile setup.
Demo
Run the project, then use the mouse buttons to place or remove dirt.
It does NOT use RuleTiles directly, but does act similarly to them. It uses a custom script with hard-coded "rules" to control the placement of regular tiles.
The main reasons I love the dual-grid approach as opposed to RuleTiles is because:
- it allows the tiles to have perfectly rounded corners
- a maximum of only 16 tiles are required in the tileset, as opposed to 47 (and you could cut that number further down to just 6 if your tiles have symmetry)
- the tiles are not ambiguous for the player, in that each "dirt" or "grass" aligns with the world grid
One could also argue it's more efficient, since each tile only checks 4 neighbours as opposed to 8. But I haven't done any performance testing so no promises.
I also made a Godot version which you can check out here
It is possible to get a dual-grid system working using custom RuleTiles too, however it did become quite convoluted when I tried. I made a post about it a while ago here if you are curious though.
References
See Oskar Stålberg's original proposition of a dual-grid system: https://x.com/OskSta/status/1448248658865049605
Regular tile cut:
On-the-dual tile cut:
The dual-grid system is also mentioned in ThinMatrix's video, which is what inspired me in the first place!
If you have any questions or ideas for improvements feel free to contact me at [email protected]
관련 프로젝트 살펴보기
불러오는 중…