Kid dream, part III: Collection Manager

When I was describing Game Engine development in previous article I mentioned a collection manager tool. I also wrote that is not interesting well it wasn't because it looked very simple as you can see on the image bellow.

Old collection manager

I really hated it, it was good as working concept but if I want to manage a collection it was useless. It was designed for adding items one by one, so for adding 30 items you have to click 30 times to add button and also I don't like the design. You may say that the design is not so important and you may be right but I am the person who don't like using apps with bad GUI even that they are functional very well. So I've decided to redesign the whole tool. The result is shown on the next image.

Collection manager

I've added extract function that allows extracting item from a collection back to single file on disk. It is also possible to select and add more than one file to a collection.  I think that overall looks is also better and I really enjoy using this tool. 🙂

In the next paragraphs I will describe the application from developer view. So finally you could see something under a pot lid.  As I mentioned in previous articles I'm using MVP pattern with passive view. Let's take a look on these parts little bit closer.

For better code reuse ability I've sliced the application view into multiple views:

  • NavigationView
  • ManagerView
  • ImagePreview
  • SoundPreview

You can see the navigation view on the left part of image it displays actual drive, folders on disk and directory files.

ManagerView is the main view that consists of the NavigationView and ImagePreview or SoundPreview which is the group box in top right corner and displays a preview of collection item. The other Windows.Forms components are also parts of ManagerView.

Each view has his own presenter except the ImagePreview and it is because the view consists of PictureBox only. So there is no need to use presenter. Code with presenter would have more lines and as far as I known the main role of presenter in MVP is to divide the logic to more units and in this case it would be contra-productive.

I am using two models NavigationModelManagerModel. The purpose of these models is to hold information about selected files, current directory path and in case of the manager the actual loaded collection. I almost forget on two additional models for holding information about directory nodes TagHolder and OperationParameter specifying source and destination for IO operations.

UML diagrams produces the best example of described architecture and you can see it on pictures bellow.



Overall progress
So after I developed the collection manager I successfully implemented textures drawing to Game Engine. I am solving the order of rendering map objects now and also finishing the Map Editor which has been changed a little. I think that I should be able to finish it during October  and of course publish the results. After that I would target on game world and his mechanics.