User chosen Screen Resolution (SOLVED)

I think I have a handle on dealing with layout/resolution issues within a game. But based on my experience shipping for Windows, I will need to give players a way to choose whether to play full-screen or not, and what size 16:9 window. Unity has a configuration dialog that deals with this. I didn’t see a way to provide this with Defold (perhaps because its focus is mobile, where you don’t get to pick your screen size after buying the device).

Haven’t used it yet myself so I might be mistaken, but I believe you need DefOs.

Yes, the DefOS extension is definitely what you need. DefOS will provide you with the functions to set different window sizes, toggle fullscreen, change window configuration and set a custom mouse cursor. You need to create the settings menu yourself and use that to call the DefOS functions.

Ah thanks, that looks like it would handle things adequately.

1 Like

I wanted to do a “Defold game launcher”-thing for long time. In fact I once did a launcher-thing that could work as a actual Defold library, with minimal integration into existing games: https://github.com/andsve/launchoptions

It used Defolds own GUI system and runtime to actually display a “dialog” with options. Can’t find a forum topic for it, so I must have forgotten to post about it. I can’t remember in what state it is, but I’m also not very satisfied with the implementation.

But I also started on a standalone native (Win+Linux+macOS) version on one of our exploration days, sadly also not finished. :slight_smile: I took a look at it today when I saw your thread just to check what state I left it at and there are still a lot of work for it to be usable. (Spent some time today to add some urgent missing features.)

It looks something like this:

It’s written in C (well, C++/C-ish), and I can hook you up with the repository if you want to take a stab at it. One major issue is that the UI-library I’m using is very early in development and missing some critical features that I had to add on my own in a separate fork… :frowning:

7 Likes

Defold (Best)

Ain’t that the truth.

2 Likes

Interesting. I am still at the engine evaluation stage, so I don’t need the repo. My needs are likely different from King’s but I want a good 2D engine that can deliver a good Mac and Windows experience. I was in the mobile world for a while and didn’t realize what a big deal this is for some players.

(Nintendo Switch too, though that I don’t think that is relevant to this thread.)

2 Likes

Yup, DefOS works. It’s been in my top two pet peeves for years that Defold doesn’t really support desktop out-of-the-box, but fortunately, DefOS covers 95% of these, and it’s trivially easy use. It’s gotten a lot better in the last year, there’s just a couple functions that don’t work on Linux yet.

If you like things lightweight, fast, and reliable, don’t want to write your own scene editor yourself, and don’t want to pay a subscription or royalties…I haven’t found anything that can match Defold.

Being able to make web builds with little or no effort makes it waaay easier to get people to test your game too!

Note: In some areas of desktop gaming, the number of Linux and Mac users are roughly the same (both vastly outnumbered by Windows users), so you might consider targeting Linux as well.

Switch has been mentioned multiple times before. I think if Defold supports a console in the near future, it would be the Switch.

4 Likes

Not to get into a platform war, but Steam suggests Mac is over 3 times the number of players. (Though that is overall, and not specific areas. I’d be curious to know what genres are outliers.) Supporting Linux is obviously a plus, but doesn’t impact my choice of engine. Sadly, Switch compatibility might — I like a lot about Defold from my initial investigation.