Friday, March 22, 2019

Menus, Items, and Saving

Hi guys,
The following may get a bit technical, but recently in Conception Maiden I've created an Item database system, an inventory system, a save/load system, and a multi-purpose menu system.  Aside from that I've also added the fighter system from my last post into the main game(though they can not take damage yet and only Victoria's sprites are set up for this so far).


The item system is very simple right now but can be used to easily create new items for the game.  The inventory system builds off of the items system, and basically keeps track of what items and how many are in your possession(along with money) like in other RPGs.  It can also be used to create multiple inventories.

One of the highest proprieties after I adding the stuff from my last post, was to create a Save/Load system so the game could be saved.  For this, the game needed to know what should be saved, which turned out to be mainly data relating to characters/fighters, inventory, system info, and the general current state of the game.  In order to save, the player would also need menus to select where to save, so I also made a multi-purpose menu system.
This is different from menus I made before and took far longer to make than the items/inventory systems.  The basic idea is to have a menu system that can be used almost anything in the game.  It looks very basic right now but it can be used to make lots of different menus with transitions.

After everything was set up, I added pausing to the game and a pause menu, with one of the options on it being save:


This is how the save menu looks at the moment.  The save time is shown as well as a screenshot.  Each time the game is saved, two files are created/overwritten for this.


The ".sav" file contains all the save data while the ".png" file is a small screenshot to go along with it.  This save system would need a few more test but should likely be fully-functional on the next demo.


Character Menu Layout in progress

Right now, the pause menu have 5 sub-menus, Characters, Items, Save, Options, and Quit. Though only Save/Quit will probably be usable in the next demo.  Save files can now be loaded from a new menu on the title screen.


-------------------------------------------------------------------

Also, about load times between maps(rooms):
This game is rather optimized, but there is one major thing that makes the player wait, this is the time it takes when the game changes maps.  For example, at the very beginning of the last demo, immediately after the title screen(right before the games first line of dialog), it's noticeable that it takes the game a moment to load. 

This is because autotiles are being merged together in real-time before the map can be played.  (Autotiles are images used as tiles on the ground, and then automatically merged together based on where they are from each other.  This can make the map look very nice.)  The more autotiles on a map, the longer it takes to load before playing.  This basically accounts for most all of the waiting time in demo once the title screen appears(without it, loading could be just about immediate aside from asset sprites/sounds/etc loading when needed).

The best way I can think of to fix this would be to have all the tiles per-merged.  This means nothing would need to be merged while the player is playing.  However, with pre-merged game maps, I won't be able to easily edit the maps(my custom tile editor would probably need a complex update to account for this) and the animated autotiles(like animated water) aren't currently designed for per-merging.  I will try to fix this in the future, though I probably won't have time to do it by Demo #2.

------

With the basic Save/Load working now, I will probably focus on the writing of the storyline now and a few other smaller things.  Once I have the stroyline far enough, I will likely focus on adding/updating fighters and eventing.

Once that is all done(Though I am not sure when that will be right now), I think Demo #2 will be completed and ready.  This demo will include the Utrila h-event.  Thanks so much for your support so far guys, I will let you all know when the demo is ready.


Um, that's all for now,
see you later.


No comments:

Post a Comment