Devtober Day 1

In an effort to get back on track with the project, I am trying my best to take part in Devtober this year. It’s heavily inspired by the popular Inktober, which is a challenge about doing an inked drawing every day of October. Except here the focus is on game development. The rules for this challenge are simple

  • Work on a game a little every day
  • Post your progress on social media (use the hashtag #devtober!)
  • On the very last day, write a post mortem

So to kick off this Devtober, I fired up Unity and Visual Studio and got to work converting my Utility AI System from Monobehaviour to Unity DOTS, Data Oriented Tech Stack. Today was a day of learn how to think about how to structure code. The power of ECS/DOTS is being able to handle work in batch and splitting that work load work to different threads. The challenge is that is a completely different mind set from MonoBehaviour and  GameObjects. Also, the development is not completed either.

 

Once the ECS/DOTS click for you, it really starts to become quick in easy.

Code 1.png

First attempt at write the code to evaluate distance to target 

code 2.png

Final Version 

Both of the methods above perform the same calc. However the first attempt take rough .56ms to distance to a point for 500 Entity/GameObject, while the second takes only .07ms on a 1800x running stock. This test were run in editor.

With one day down and better understanding of the API, this could be a great challenge

 

 

This entry was posted in Dev Log, Uncategorized, WIP and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s