10/10/2023 Data Serialization / De-Serialization
So I've been investigating different serialization solutions as I want to be able to take advantage of C# inheritance as part of my game engine named, "Chuggine" that uses Monogame as it's framework. C# built in JSON serializer doesn't support inherientence. At least reading your classes back in doesn't pull in the derived properties correctly. JSON.Net doesn't support this feature as far as I could tell either...
So I wrote my own one! It's working now but it does lack a couple features I'd still like to have, specifically:
- Enums
- Dictionaries
- Arrays of Arrays [][]
Importantly though it supports inheritance! Which I really needed!
I have spots in the code where I can add support for these but my test data didn't need them yet... So I'll add support when I need it. At the moment though I want to focus on getting scenes to load based on the data saved/loaded. Once I can do that I've essentially have the equivalent of Unity's Scenes/Prefabs working. Although my architecture is going to be a smidge different than Unity's. After research I'm inclined to test out the idea of using an Entity Component System. So I'm going to do some tests with that and see how I like it.
Cheers everyone!
Get Pyxel Knight
Pyxel Knight
Be the Hero!
Status | In development |
Publisher | |
Author | DietChugg |
Genre | Platformer |
Tags | 2D, hero, Local Co-Op, Local multiplayer, Metroidvania |
Languages | English |
Accessibility | Configurable controls, Interactive tutorial |
More posts
- 10/18/2023 Code Generators!Oct 18, 2023
- 10/06/2023 Porting to MonogameOct 06, 2023
- New build releasedApr 18, 2020
Leave a comment
Log in with itch.io to leave a comment.