thelukester92 / swift-engine

An entity-component-system game engine built in the Swift programming language.
MIT License
35 stars 7 forks source link

Implement deserialization #74

Closed thelukester92 closed 10 years ago

thelukester92 commented 10 years ago

Need to make a "deserializer" class that can register deserializers. I wish there was some way to automate the registration process...

thelukester92 commented 10 years ago

The ideal solution is reflection, which works in Objective-C but not in Swift. I need to be able to get the class name from the class (i.e. NSStringFromClass) and instantiate a class from its name (i.e. NSClassFromString). Then I would not need LGComponent.type() and I could automatically "register" deserializers.

Swift also desperately needs to be able to check pure Swift objects for pure Swift protocol conformance. That would make this so much simpler, cleaner, maintainable, and fast (that is, swift).

thelukester92 commented 10 years ago

Implemented #20