------------------------------ Update -----------------------------
Haven't had time since my last update, but I should still have the code on my broken laptop.
------------------------------ Update 17/06 -----------------------------
Haven't had the time to check if I still have the project on that broken laptop... I will, however, have a look at it within a couple of weeks. That's a promise!
Changes of the Unity Engine
Unity has changed a lot since I stopped working on this project. The biggest change being that they have started moving to data-oriented design (dubbed data-oriented tech stack DOTS) instead of conventional object-oriented design. In short this means that data and logic is separated, which allows for better programming practices and incredible optimizations. If you are interested in this topic you can read into the details
You must be registered to see links
. Sadly only a fraction of all functions that are currently available in the engine have been adapted to work with DOTS...
Figure 1. Unity using object-oriented design
- Objects, handle data and logic/behaviour
Figure 2. Unity using data-oriented tech stack
- Entity Component System ECS
- Entities, a way to reference to sets of components
- Components, containers for data
- Systems, logic/behaviour that modifies/accesses components
- Job System, allows for easy multi-threading
- Burst Compiler, compiles jobs to optimized native code instead of slow managed code
All that being said, DOTS is the way I want to go for porting PristonTale.
------------------------------ Update 19/06 -----------------------------
Experimented a bit the last couple of days:
- Created a Bootstrap script that initializes Entities like a Player (capsule) and Enemies (boxes moving away from the Player in a circle), each with their own Components.
- Created an EnemyMovementSystem that moves the enemies.
- Created a PlayerMovementSystem that moves the player based on Keyboard input.
- Created a CameraSystem that moves the camera around the Player based on Keyboard and Mouse input, which was a lot more work than it sounds because the Camera isn't ported to DOTS yet.
- Created a crappy way to handle Keyboard and Mouse input (that works with DOTS).
My Intel Core i3-7100U processor with integrated Intel HD Graphics 620 handles 20.000 entities easily.