softwareantics / FinalEngine

This repository is a WIP cross-platform Game Engine developed in C#.
Apache License 2.0
69 stars 5 forks source link

Issues found from Star Warriors #124

Closed softwareantics closed 1 year ago

softwareantics commented 2 years ago

EntitySystemBase

When iterating over an IEnumerable with foreach it should not matter if an entity has been added or removed from the collection. Users should have simplicity in mind and rely on real time rather than having to iterate over a collection backwards to avoid any issues. This can be found by doing the following:

When an entity is added or removed from an Entity World it should be stored in cache (ie; entitiesToRemove). Before any Entity Systems are processed the cached entities will be added/removed from the Entity World and any Entity Systems that matches their aspect.

Another issue is that if we create a common TagComponent we need a way to match entities on their respective tags. Right now the implementation below doesn't support that:

protected abstract bool IsMatch([NotNull] IReadOnlyEntity entity);

A solution to this would be the following:

We need common components implemented such as:

Along with the above we should also implement common Entity Systems such as SpriteRenderSystem.

IWindow

We should have the ability to add icons to the Window.

Viewport

To access the viewport, we currently have to use IWindow, we should add support to IRenderDevice to get the viewport.

Simple Physics Support

A few notes:

softwareantics commented 2 years ago

A time based entity system.

Also allow systems to operate asynchronously