#How to get started with dots and 2d?

1 messages · Page 1 of 1 (latest)

graceful glen
#

I can’t find any reading material on how to start a modern Unity 6 project and stay within as pure DOTS work flow as possible, I’m sure there are some glue code necessary for a few things. But I’d like to be with DOTS as far as I can pull it when it comes to systems and components.

civic anchor
#

I’ve started a 2D dots project. Moved up to Unity 6. Animation will probably be where you have to make some smart choices. You can make your own custom animation system. I might use one that’s similar to a stop-go style that CodeMonkey made in a DOTS course. But there are more advanced animation systems on the asset store.

graceful glen
civic anchor
#

Don’t take my word for it because I’m still in prototype phase.

You’ll need to balance rendering as well. The sprite renderer is not supported by DOTS. So I’ll be using mesh renderers for large quantities of entities. Then I’ll use the sprite renderer for the world art.

DOTS doesn’t support 2D physics you’ll have to use 3D for entities.

#

I’m also using tilemaps to create ‘factories’. Bridging the gap between the Tilemap and ECS is possible. But I’m fearful about performance issues.

buoyant lark
#

@graceful glen @civic anchor If you want a tilemap solution that can work in Burst, you should take a look at this:
https://github.com/Fire-Aalt/KrasCore-Mosaic

I haven't used this package so can't tell you more about it.

#

I'm the author of that repo, you can ask me anything about it.

graceful glen
buoyant lark
buoyant lark
#

Just to notice you all, SpriteRenderer.sprite = new_sprite has just got 3x faster on my machine in Unity 6.1, compared to Unity 6.0.

#

Tested with the Simple Setup ECS 2D repo. For 1000 characters, the sprite sync system now takes only 0.8ms to finish. It was 2.3ms in U6.0.

royal torrent
#

But I would suggesting trying it first before fully commiting for use in production. While Mosaic is being currently used in production, it's state is not final and there might be some breaking changes on how to send updates to the system (the final "apply changes" job is still singlethreaded). It offers magnitutes better performance but I would really suggest using it if you have your world be procedurally generated, because this is the primary focus for the tool

civic anchor
#

I was considering using Mosaic but I went with Tilemaps because I’ll only be spawning/managing < 10x10 tiles. Maybe in the future I’ll attempt to spawn and manage thousands of tiles with management systems.

#

I’m making a beehive game and originally I wanted to manage each cell in the honeycomb. So that’s like at least 20,000 cells. Oh yeah it’s hexagonal as well so I can’t use mosaic for that.

So now I’m using Tilemaps with limited tiles with ‘clumps’ of cells that represent a 100ish cells.

#

With mosaic do you have methods for WorldtoCell etc?

royal torrent