2D using Godot

As mentioned, I’ve started using Godot to create some games with my kids. We decided to start with something simple, so we created Super Memory. I’m still waiting for a graphics delivery, so right now the you play with “dad’s placeholder cards”. They aren’t pretty – but they get the job done.

I had three major goals when creating this game:

  1. Teaching the kids basic programming logic – how to think like a machine.
  2. Teaching myself a bit about Godot.
  3. Creating a game that I can push all the way to Google Play.

The first two items are done – for the third I’m still waiting for the graphics delivery. Kids are such lazy team members ;-)

When it comes to the game logic, I decided to push it all into the entry point of the game: the table scene. The main parts are in the init_game function and the _on_card_flipped function. I would consider the rest of the code support functions, or GUI driving functions.

This brings me to the GUI parts. I’m still not convinced that I understand how to properly layout stuff using Godot, but at least it looks ok now – at the cost of some fixed element sizes and such. I need to spend some more time to really understand how the anchoring and stretching really works. I guess I have a hard time wrapping my head around it as the approach is different from what I’m used to from Qt.

Looking at the rest of the code, I’ve tried to make all the other scenes (in Godot, everything is a scene) like independent elements. For instance, the card scene has a face, and an is_flipped state. It can also signal when it is being flipped and clicked. Notice that the click results in a signal that goes to the table scene, which decides if the card needs to be flipped or not.

The same goes for the GUI parts. They simple signal what was clicked and the table scene reacts. There are some variables too, e.g. the number of pairs setting in the main menu, and the points in the views where that is visible.

All in all, the code is quite messy. I’m getting used to GDScript, so parts of the code has static typing information, while others don’t. Also, naming and underscore prefixing is a bit random. I’m also a bit unsure about the onready var pattern to hold references to various scene elements vs hard coding the reference. And one more thing – some parts are in Swedish before it all shifted to English.

At the moment, I have built installers for all desktop platforms and tried them. I’ve also setup an Android toolchain and pushed development builds to a couple of phones. This also works beautifully. Next step is to get the graphics delivery and push something to Google Play. I will keep you posted.

Playing with Godot

I guess it is quite common to start the path towards programming by making games. I started with a simple guess the number on my dad’s zx81 back in the day. He must have written most of it, but I felt proud of the result, so I will claim that it was mine.

I’ve experimented with various ways to get my kids into programming. Everything from board games, online resources, scratch, building shitty robots, and so on. They get it, but it is hard to move on from the basics to being able to start from a clean sheet of paper and create something.

During the summer, I decided to look into the various options and tried using Unity and Godot. After a couple of experiments, I settled on using Godot. Partly because of its open nature, but also because as a tool, it does the job I need it to do just as well as Unity.

From my perspective, Godot is interesting, as it is a tool that is based around a visual editor. You do write code, but you add the code to the visual model, and not the other way around. This is somewhat backwards to me, as I come from a Qt background, but I’m positively surprised over how well it works.

Another positive surprise to me is that Godot also comes with export presets. These are pre-built run-time environments for common targets such as Windows, Linux/X11, Android, iOS, HTML5. Using these, it is trivial to cross compile and distribute your project – from any platform, to any platform. Very convenient. You can even build your own export presets.

When it comes to the not-so-good, Godot comes with its own language, GDScript. It does the job, and I quite enjoy working it it. You can use VisalScript as well, or C# with external tooling – you can also use GDNative to interface with the engine using your language of choice, but that is less straight forward. I do understand that there is some history that explains the choices, but to me it does feel like Python, without the huge library of Python libs.

Next up, I’ll blog about some of the games I’ve made, so prepare yourself for boardgames, classic game remakes as well as my humble experiments into VR.

Free software and the wish to be good

The free software movement has recently been going through a lot. From the introduction of Commons Clause, to the resignation of Stallman. It seems like the mood in the air is that now is the time for a redefinition of what free and open source software actually is.

My view on this is that free software, and open source, is about software. For instance, I agree to Roman Gilg’s great post about activism. What we share within the FOSS movement is our passion for software licensing. For other political issues, we do not all agree. It is important to recognize this, and that by implying political standpoints, we limit the size of the communities.

To me, we in the FOSS movement need to define tackle two issues: what is distribution (to address the Common Clause issues), and can we be neutral to what the software is used for (to address the activism issues).

When it comes to distribution, the open source definition explicitly says “No Discrimination Against Persons or Groups” and “No Discrimination Against Fields of Endeavor“. I think we all can agree that software is used for both good and evil. However, what is good and what is evil depends on your viewpoint. I believe that the license should be free of this type of politics, as opening the discussion will be like opening a Pandora’s box.

If we, as a community, want to define good and and bad, and restrict usage accordingly, I would argue that we should make sure to use an established, and accepted standard such as The Universal Declaration of Human Rights. This would avoid creating an impenetrable forest of various uses that each author feels strongly about and prohibits. The latter would make it very difficult to ensure compliance.

When it comes to compliance, including a definition of good and restricting usage accordingly has an interesting effect. Common day objects such as cars, can be used for both good and evil. Is it allowed to use FOSS licensed software in a car, if that car could be used in activities breaking the human rights?

Another problem with incorporating human rights into the license, is that those who ignore the human rights probably don’t care about software licenses either.

The second point is the definition of distribution. Here I’m approaching the discussion from a GPL standpoint. The GPL licenses are triggered when software is distributed. By taking the distribution concept further, e.g. including access over a network, the license can be further extended.

Here, the balancing act is going far enough, but not too far, and to provide a range of licenses that make it easy for the authors to control how the software can be used.

The problem that I see with going too far, is that entire fields of endeavor might be excluded by extending the license to far. One example of this is the anti-Tivioization clauses in (L)GPLv3. We all know what purpose they serve. The side effect is that they exclude entire fields where the OEMs feel that, for liability or compliance reasons, they need to introduce Tivioization.

I see this in the automotive sector, but would assume that it exists in medtech and other industries where the final product needs to fulfill safety requirements.

For me, I think that the license should prevent Tivioization from an end-user standpoint. It should be possible to change and deploy the software. I believe it should be explicitly allowed to detect the non-OEM software and, for instance, void warranties and warn the end-user, but not prevent usage of the product (this in itself is interesting – can other physical devices refuse to talk to the device, e.g. a cloud backend, or other ECUs in the same car? – it will be tricky to define the boundaries here). This opens the door for FUD warnings, but it also extends the reach of FOSS.

Both these topics form a complex discussion that needs to be given time. The current open source definition serves us well, and the current licenses are familiar. Introducing more licenses, or even challenging the definition of open source, will introduce complexities and side effects, so we need to tread carefully.

Change of Plans

TL;DR; foss-north IoT and Security Day has been cancelled, or at least indefinitely postponed, due to health reasons.

For the past three weeks (from August 11, to be exact) I have had a fever that I couldn’t really shake. At the same time my wife had pneumonia for which she was successfully treated. Antibiotics is treated with care in Sweden, so I basically waited for my CRP tests to return a high enough value for my doctor to be convinced that I had an infection.

On Friday 24th I got my first round of antibiotics. They did not help, so on the morning of the 27th I returned and got another, stronger, antibiotics. I was also told to go directly to ER if I got any worse. I did. On Thursday morning I landed in ER.

It turns out it was not pneumonia at all, but blood clots throughout my lungs – way too close to a proper game over for comfort. It took me four days to stop degrading, and six days before I could leave the hospital. Right now I’m on ordered rest for at least two weeks. Something I apparently need, as I’m super tired as soon as I do the smallest thing. Right now my exercise consists of walking around the block, ~400m, twice a day.

Hence, there is no way I can arrange the foss-north event planned in the end of October. I’d like to thank all the sponsors who signed up, and those which whom I postponed the meetings. I would also like to thank everyone who submitted talks – the line-up would have been amazing. Finally, I’d like to thank the friendly people who helped cancel everything – it really took a heavy load of my chest.

This is a hugely frustrating situation to me as an individual – I want to work and I want to run, but I guess it is time to slow down for a while and then come back stronger. There will be another foss-north, and I will run 10km trail under the hour. Just not this year.

One week to go!

There is one week left of the call for papers for the foss-north IoT and Security Day. The conference takes place on October 21 at WTC in Stockholm.

We’ve already confirmed three awesome speakers and will fill the day with more contents in the weeks following the closing of the CfP, so make sure to get your submission in.

Patricia Aas

The first confirmed speaker is Patricia Aas who will speak about election security – how to ensure transparency and reliability into the election system so that it can be trusted by all – including a less technologically versed public.

Also, this is the first stage in our test of the new foss-north conference administration infrastructure, and it seems to have worked this far :-). Big thanks goes to Magnus for helping out.

foss-north call for papers

The summer is flying by and it is already August. The call for papers for foss-north IoT and Security Day is still open for a few more days, so make sure to get your talk in. We are looking for talks touching on connected embedded devices and how to do them securely.

The foss-north IoT and Security Day will be a one day event, October 21st, in central Stockholm. The venue, WTC, is located right by the central train station, so it is very easy to get there. Tickets will be made available soon. Make sure to save the date!

More foss in the north

Today is midsummer eve. In Sweden, this is probably slightly larger than Christmas. Everyone goes someplace to meet someone and enjoy a day of food, dance and entertainment. And you’re supposed to have flowers on your head as shown below!

The blog post author in full midsummer outfit

This year, midsummer is on June 21, which marks four months from the first foss-north event outside of Gothenburg. That’s right – foss-north is going to Stockholm on October 21 and the theme will be IoT and Security. Make sure to save the date!

We have a venue and three great speakers lined up. There will be a CFP during July and the final speakers will be announced towards September. We’re also looking for sponsors (hint hint nudge nudge).

Now I’m off to enjoy the last hour of midsummer and enjoy the shortest night of the year. Take care and I’ll see you in Stockholm this autumn!

Federated conference videos

So, foss-north 2019 happened. 260 visitors. 33 speakers. Four days of madness.

During my opening of the second day I mentioned some social media statistics. Only 7 of our speakers had mastodon accounts, but 30 had twitter accounts.

Given the current situation with an ongoing centralization of services to a few large provides, I feel that the Internet is moving in the wrong direction. The issue is that without these central repository-like services, it is hard to find contents. For instance, twitter would be boring if you had noone one to tweet to.

That is where federated services enter the picture. Here you get the best of two worlds. For instance mastodon. This is a federated micro blogging network. This means that everyone can host their own instance (or simply join one), and all instances together create the larger mastodon society. It even has the benefit of creating something of a micro-community at each server instance – so you can interact with the larger world (all federated mastodon servers), and your local community (the users of your instance).

There are multiple federated solutions out there. Everything from nextcloud, WordPress, pixelfed, matrix, to peertube. The last one, peertube, is a federated alternative to YouTube. It has similar benefits to mastodon, so you have the larger federated space, but also your local community. Discussing the foss-north videos with Reg over Mastodon, we realized that there is a gap for a peertube instance for conference videos.

Sorry for the Swedish. We basically agree that a peertube instance for conference videos is a great idea.

I really hate to say that something should happen, and not having the time to do something about it. There are so many things that really should happen. Luckily, Reg reached out to me and said – what about me setting it up.

Said and done, he went to spacebear and created an instance of peertube. Got the domain conf.tube. I started migrating videos and tested it out. You can try it yourself. For instance, here is an embedded video from the lightning talks:

If you help organizing a conference and want to use federated video hosting, contact Reg to get an account at conf.tube. If you’re interested in free and open source, drop in at conf.tube and check out the videos.

foss-north 2019 – it is happening

Pinching my arm, to ensure that this is real. It feels surreal that we’ve gone from seven speakers to an amazing 33 in four years.

This years experiments are the training day, and community day. Looking at the various RSVPs for the community day, it looks like we’ll be 130+ attendees. For the conference days we have only ten tickets left out of 240, beating last years record attendance with 90 people.

The only question left is – what did I forget :-)

foss-north 2019: Community Day


I don’t dare to count the days until foss-north 2019, but it is very soon. One of the changes to this year is that we expand the conference with an additional community day.

The idea with the community day here is that we arrange for conference rooms all across town and invite open source projects to use them for workshops, install fests, hackathons, dev sprints or whatever else they see fit. It is basically a day of mini-conferences spread out across town.

The community day is on April 7, the day before the conference days, and is free of charge.

This part of the arrangements has actually been one of the most interesting ones, as it involves a lot of coordination. I’d like to start by thanking all our room hosts. Without them, the day would not be possible!

The other half of the puzzle is our projects. I am very happy to see such a large group of projects willing to try this out for the first time, and I hope for lots and lots of visitors so that they will want to come back in the future as well.

The location of each project, as well as the contents of each room can be found on the community day page. Even though the day is free of charge, some of the rooms want you to pre-register as the seats might be limited, or they want to know if they expect five or fifty visitors. I would also love for you to register at our community day meetup, just to give me an indication of the number of participants.

Also – don’t forget to get your tickets for the conference days – and combine this with a training. We’re already past the visitor count of the 2018 event, so we will most likely be sold out this year!