Forging the core 2/??
Hi! No image this time, as I can't really show you thing that.. are not new / do not still exist haha.
So, I worked on a lots of thing, not only the core, but also the UI, and for now, we will talk about the core.
Last time, I showed you the loading process of a "simple" asset, and let me tell you: It was totally destroyed and reworked from 0, why? Well, I wanted to work on the Serializer for the engine.
But what is an Serializer some of you could ask? Well to put it VERY simply:
If you have an image, you need to have a way to save this image in a file, well, this is the work of the serializer, it will get all the image data, convert it in a comprehensible format for your software/engine and you can then save it where you want it.
Simple? No, not at all, there is a lots of thing that can go wrong with this (infinite loop, wrong/weird data, etc...) and, yes, I had those problem.
First problem that I got is simple: How can I let the engine know what is needed to be saved? this was simple, I just created an "universal" method that will give the engine a list of thing that needed to be saved, simple.
Second problem: How the hell can the engine know what those data are? Like it could be an image, a song, just a text file, etc... Create multiple new extension? Like .jpg, .mp3, .mp4? No, it would be nice, but I don't want to (to many extension to manage), so I fixed myself to use "xml" (for now at least, next thing to work on is allow the engine to use different format, but well, this is not the subject here for now). And I then can add an "attribute" the the first element in the xml file (exemple: <Object Type="MyVeryGreatAsset">) so now the engine know that this file represent an asset of type "MyVeryGreatAsset" and can give you back this asset ready to use.
Now a third problem but this is only due to my own stupidity when writing the serializer, let me explain:
When an object is serialized (converted to a saveable file) it will be in multiple steps:
- Ask the object what information to save
- Convert those information in an object called "SerilizationInfo"
- Convert this "SerializationInfo" in a string so we can save it
Simple, clean, nice
Now when an object is deserialized, it SHOULD be like that:
- Get the file where the "SerilizationInfo" was saved
- Get all the info inside the SerializationInfo
- Give them back to the object
Yes... But it was not what I've done (and please, don't do the same as me)
- Get the file where the "SerializationInfo" was save
- Get all the info inside the SerilizationInfo
- Convert those info back to the object
- Convert this object to an Serialization info
- Give this serializationInfo to the actual object that will be used
- Then the object will go and pick the data inside the serialization info
....
Yes
It was very stupid
After a lots of work on it, I found this and I was like "Why? Why did I do this?" and I worked so it will be like it was meant to be, simple, clean and nice.
Now what is coming next?
Well, as I said, the UI has been fully reworked, and now I'm working on the autotiling, so you can expect information on this next time, and ho god, there is already a lots of thing to say right now, it was not a simple journey trust me.
Anyway, I still don't know how to end those post, so I just hope you have a good day or night,
Ward.
Get RPG Creator
RPG Creator
An open-source, free, and modular RPG Maker alternative
Status | In development |
Category | Tool |
Author | Ward727 |
Genre | Role Playing |
Tags | 2D, 3D, Game engine, Indie, Open Source, Royalty Free, RPG Maker, software |
Languages | English, French |
More posts
- Forging the core 3/?? - Assets management40 days ago
- Forging the Core 1/??May 01, 2025
- Save file, and layerApr 09, 2025
- First (pre-)view of the new versionApr 03, 2025
- Explanation for the wait and why there was no newsMar 10, 2025
- Assets manager - Assets previewer & more!Dec 01, 2024
- WIP - Assets ManagerNov 19, 2024
- Assets Manager V1Nov 09, 2024
- Status Editor V1Nov 06, 2024
Leave a comment
Log in with itch.io to leave a comment.