What’s new in Castle, April 4 2019

By Ben Roth // 4-4-2019
Hello! There have been several updates to Castle over the last few weeks. Here are some of the highlights:

It's easier to start new projects in Castle

We want it to be easy to get started making a game. Check out our updated screen for creating a new Castle project, where you can select from a number of starter templates, or just pick a blank file.
Starting a new project in Castle
We'll download the starter code to wherever you specify on your computer, and we'll automatically write your project's title and author in the metadata, so you can get straight to the fun part.
Starting a new project in Castle
Starting a new project in Castle
We're also excited about the starter examples available on that screen, which were created by @bridgs. Right now we have some starter code for platform, chess, flock, strategy, racer, ribbons, space, adventure, hoops/physics, and runner games. If you'd like to jumpstart your game idea, don't hestitate to pick one of these and dive in.

Castle's desktop client updates itself now

Were you tired of downloading new versions of the Castle desktop client? We were too. Castle now detects when an update is available for macOS or Windows, lets you know, then installs the update and restarts itself if allowed.
Note: If you're using Windows, and you have a version of Castle which predates this article, you might need to uninstall the old version, since our magic auto-updater uses a different method of installation. This is a one-time change.

We added an API to get the player's name and avatar

When you're making a game on Castle, you can now use the castle.user.getMe() method to fetch some information about the current player, such as their name and a url to their avatar. You can use this information to personalize your game by prefilling the player's name or picture.

Improvements to joining and creating Castle multiplayer games

When you start playing a multiplayer Castle game, you'll now receive an invite link you can share with others. If they click it, they'll join the same session of the game, so they can play with you.
A link to a new multiplayer game session
A link to a new multiplayer game session. Friends who click this link will join you in the game.
Also, since we have people playing Castle games on different continents, we added multiplayer game servers in different regions of the world. Castle will automatically pair players with the regions where they have the lowest ping.
For creators, we added a multiplayer key that can be specified in your Castle Project File. Castle will provide multiplayer-specific debugging tools if it sees this key.

The community released several new games and some library updates

Castlers released some new games recently. We're pretty excited about Jardins Du Standoff, its cousin Wasteland Standoff, and The Ballz are Lava. Give them a try!
Jardins Du Standoff
If you're interested in developing online multiplayer games with Castle, you might consider trying Moat! Moat is a library by community member @revillo which helps lay the foundation for multiplayer games. It includes several examples, including a dungeon crawler. Reach out to us if you have questions or want more information.

We changed some more things

  • Added .castle project file association on macOS, so you can double click a Castle project to open it.
  • Added a button to close the currently open game.
  • Added a way for you to manage whether, or when, Castle notifies you.
  • Added several chat features, such as @mentions, embedded game links, and emoji support.
  • Added a serverMain multiplayer configuration to allow a different Lua entry point in a game's server code.
  • Fixed an issue where multiplayer game sessions might get stuck if one of the players idles rather than quitting.
  • Fixed an issue with game window scaling on Hi-DPI Windows environments.
  • Fixed a Windows issue where Alt+F4 would not properly close the Castle window.
  • Fixed an issue where the Recents screen would show some games as untitled or missing artwork.
  • Fixed an issue in physfs that caused Castle games to render a black screen on some Windows 10 machines.
  • Fixed an issue where the game could overflow the window bounds if the window was resized a lot.

That's it for now!

Thanks for reading! If you haven't updated the Castle Desktop Client recently, please download the newest version from castle.games and let us know if you have any feedback. As mentioned before, the client will update itself in the future, so this is the last time you'll need to do that. See you online!
For more updates, check out our changelog from February 19.