trillek-team / tec

The Trillek Engine
http://trillek.space
GNU Lesser General Public License v3.0
138 stars 21 forks source link

Begin work on save system #199

Closed adam4813 closed 3 years ago

adam4813 commented 3 years ago

Fixed issue were in tests FilePath::PATH_SEPARATOR was not being set correctly.

Fixed tests in general.

Entities are no longer loaded on the client and therefore the world will appear empty. The assets that contains the correct set of entities cannot be transmitted over the wire and therefore when you connect the world will remain empty.

Description

The purpose of the SaveGame is to provide an interface into saving/loading the game's state to a file. Currently loaded is the entities within the world as well as the user's state (position) associated with their user_id and username.

When the world entity list is loaded it emits an EntityCreated event for each loaded entity. However it has no way to get the list of entities during save.

If a user is retrieved from the SaveGame::UserList and updated, then when saving that state is saved to disk.

Motivation and Context

How Has This Been Tested?

New tests have been added to demonstrate usage and ensure expectations are met from the feature.

Screenshots (if appropriate):

Types of changes

Checklist: