Update a game from an URL in pdxinfo

Hello ! I'm developing an app that's going to be a compilation of mini-games. I wish to publish it when three games will be ready, but I also would like to add more mini-games to the app after its first release, so I will need to update the app.

I've seen that web requests are limited to season 1 games at this time, and that solutions implying QR codes have been made to simplify the process. On my side, I redirect people to my itch.io page and tell them to follow it to know when updates will be available.

I've also created user scripts for browsers in the past. To auto-update those scripts, we have to put a @downloadURL or a @updateURL at the beginning of the file with an URL leading to the last version of the script.

So would it be possible to add a similar functionality to the Playdate games, through the pdxinfo file ?

Here is an example of a pdxinfo file from the first version of a game that would use this functionality :

name=MyGame
author=Me
bundleID=tld.domain.playdate
version=1.0
buildNumber=123
pdxinfoURL=https://github.com/me/my-game/blob/master/pdxinfo
gameURL=https://github.com/me/my-game/releases/download/my-game.pdx.zip

When the console checks for updates for the games, it also checks the updates for third-party games through the pdxinfoURL field if it's available, that links to an up-to-date version of the pdxinfo file. version field found in this file is compared to the version field found in the file of the current installed version of the game ; if it's different, the game has to be updated, and is downloaded using the gameURL field that links to the zip folder containing the pdx folder with the new version of the game.

That would be an easier and safer solution to implement updates mechanisms in the games without allowing URL requests on the whole game (but maybe it's still not that safe) ?

2 Likes

Presumably, this update checking could be handled on panic’s servers, incorporate whatever safety checks the sideloading process already has in place, and simply automatically add the new versions to the existing sideload interface. There could be a checkbox for each game for the user to enable/disable automatic updates (and maybe also a button to report problematic/offensive updates), and from the console’s point of view it wouldn’t be any different than having the user upload a new version to the sideload page like we have to do now.

Just spitballing here, I have no idea if Panic is already working on some solution for this.

Yes, but since we would have to upload the game on Panic's servers, this kind of solution would work better as part of an official Playdate Store, which may not be ready before some months.

At this time, most of the third-party games are available through itch / GitHub / GitLab / custom servers, so the initial idea implies that the games are already uploaded to another server because no public Playdate Store exists today ; so those servers would allow Playdate users to update their third-party games.

But yes, since URLs won't be checked by Panic, devs could put malicious code in their apps and that would be a problem (in fact, the initial installed .pdx can contain malicious code, so the problem partially exists already).

Sorry if I wasn’t clear, I meant that it could work exactly like your idea except panic’s server would load the update from the developer’s url in the pdxinfo and download the update on the server side, rather than having each console reach out to a whole bunch of third party urls.

Then they could implement whatever safety checks they want on their update checking server. I think they already do some basic checks like making sure it’s a valid pdx bundle and maybe validating some of the metadata. This way, they could still do that while letting devs host updates on our own servers.

1 Like

Auto-updating in some way would be great! FWIW, here's the best method I've come up with as it now stands: