Pycraft Progress Report!
Tags: programming, python, opengl, gamedev
Published: 2022-10-16 19:32:09

Hello there reader,

Welcome to the second written progress update! If you didn’t catch the one last week, we are not going to be migrating the progress updates from Twitter to here anymore, and instead will be writing a summary of the changes we made since last week.
Last week we focused on what has been happening in the time we have been away from Dev, and mainly the large restructuring of Pycraft that is now mostly finished, although there is still some work to be done to some areas of Pycraft.
This week then, we started out by continuing our rollout of docstrings throughout Pycraft, we are now nearly finished on that task and we hope that it makes future development by either us – the PycraftDev team – or by anyone else that wants to help out or is interested in Pycraft. The docstrings will become a part of the new documentation that we will be working on early in the new year, as the current documentation isn’t very helpful and is also long and confusing.

With the boring bit out the way, we then started to transition from a bunch of writing to progress in the settings menu, adding in a way to create a custom theme (with either RGB values or HEX or by using a catalogue of known colours), that was very briefly in Pycraft v0.9.2.5 but had to be removed due to the pending restructuring of Pycraft. Then we added in toggles for compiling maths-based functions in Pycraft’s game engine (where possible) for performance reasons, and also for enabling seasonal events, which gives Pycraft the go-ahead to change some functionality and stylistic choices for Pycraft to celebrate events. Currently this toggle has no effect, but we are going to be gradually adding in customisations for different events as they happen. The following events have been chosen to be added:
- Halloween
- Bonfire night
- Christmas
- April Fools
- Pycraft’s anniversary

With other events coming in the near future. There will also be options to opt out of different events too!

Now onto what we spent a lot of time on this week, text formatting and translations, something that was locked behind needing to get the dropdown widget finished, we can now allow Pycraft to be translated into different languages with help from the Google Translate API. In order for this to work you will need an active internet connection, however we are also considering a way to cache common languages for translations on the go without an internet connection.
To do this, all we have to do is change every string and piece of text (except for names, error messages and logging details) that the end user sees, a monumental task! However, this also opens us up to the opportunity to add in text formatting, something that we have talked about in depth over on Twitter. More details on text formatting will be announced soon, with a poster that will be adjusted as more options are added. This process is going well, and whilst we have yet to share visual progress there, we will be able to soon. However text formatting doesn’t get scheduled for adding into Pycraft until v0.9.4, so the basic functionality will be there, but more complex methods wont be until then, and it will have no application in Pycraft v0.9.3!

Finally, we are announcing some changes to the way we structure versions in Pycraft. We are doing this in light of reviewing how user friendly Pycraft’s versioning is, and are doing this to make it more user friendly and better follow the Semantic versioning system.
To start with, we are dropping the leading zero at the start of Pycraft’s version code.
Then we are combining the developer updates and patches together, so they appear as the third digit at the end of a version code.
This means that Pycraft v0.9.6.0-3 (which is the full version code for Pycraft v0.9.6-3, the current version of Pycraft) will end up looking like: Pycraft v9.6.3 which we hope is much more user friendly.
This change will roll out from the 24/10/2022 (DD/MM/YYYY).

Attached below are some visual highlights from the last week of development!


![Pycraft's new resolution dropdown widget](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k8adqb2g3dlds4490crp.png)


![Pycraft's new languages dropdown widget](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ohibuvehg39sj863r1g7.png)