Five or More Modernisation: Overview

Before jumping right into the Five or More implementation plan and details, I would like to keep you updated with the progress made thus far.

I started working on some project-related tasks during the community bonding period, to cover up for the upcoming exam and research session and any other time frame in which I might not be as active as I would like to. Also, during this period, I had a previously announced one week trip, which kept me from working more on the project.

I began by reading the Vala tutorial; I considered this was a very important first step as I have to first be aware of all the capabilities of the language before being able to put them to good use in porting Five or More to Vala.

In order to practice a bit with Vala and Gtk+, I proceeded to set up a basic project in GNOME Builder. I encountered a couple of problems, out of which one was solved by updating to the latest Builder available on flathub, and the other one led to opening an issue on the gnome-builder GitLab repository. The two experiments I worked on mostly revolved around analysing the code generated by GNOME Builder as best practices starting template, and can be found on my GitHub repository. While working on the two simple apps, I also used Glade to better understand how the UI templates work and the GtkInspector tool to analyse them. I plan on doing more such experiments in the future, while working on the migration of Five or More to Vala, and add them to the previously mentioned repository.

Now moving onto the implementation plan for Five or More, as mentioned in my previous blog post, I would like to split the development process in a series of steps, working on one component at a time; this will allow me to test each new component after integration and fix issues in a timely manner, and also to better track the progress. I agreed with my mentor, Robert Roth, on following a top down approach, which essentially means that I will be starting with porting the topmost component, the application itself, and then progress towards the more complex tasks, such as implementing the game grid.

I will first create a second src folder (e.g. src-vala) where I will work on the Vala code, since I plan on maintaining a functional C version in the repository, until the port is complete. This way, I can easily ensure both the C and the Vala versions have the same set of features and the functionality remains the same.

Then, I intend to create a basic Vala app and window based on the template generated by GNOME Builder, only using the UI file that already exists in the Five or More repository. If everything goes as planned, I will start adding one component at a time in the short run, starting with the application menu, the callbacks for the UI buttons, the preferences window, the score and the preview widgets, and lastly, the game area.

Only after I’m done replicating the existing functionality, I will take into account adding new features such as the ones mentioned in the previous post, namely sound, gamepad support or design changes.

Suggestions and feedback are highly appreciated, especially in the early stages of development, so don’t hesitate to leave me a comment or contact me via the channels provided.

Comments