April 2018 Week 2 Release


So this release doesn't really offer much. It is mostly enhancements and bringing back features from older Milestone 2 builds. Here's the rundown of what's changed.

  • Re-added color to the Terminal - some commands in the game use color to make things easier to read and tell apart from other things - for example, ls colors directory entries blue, and files white. Help also colors command names yellow and their descriptions gray. The bash command prompt is also colored. Your username will be white if you're not signed into itch, and orange if you are.
  • Begun work on proper 4K support - well, not really. It'll take a while and probably a redesign of the Peace Engine's UI framework to support scaling. There's a lot that goes into getting this stuff right and it'll take us months. I don't want to release any of those kinds of changes to itch.io until they're fully completed and tested to be working. So for now, Peace Engine locks the resolution to a highest value of 1080p - please note that you can still run in multimonitor using NVidia Surround or AMD Eyefinity, that'll still work just fine, you just can't run the game with a vertical resolution higher than 1080p unless you want unreadable text. (You won't find resolution options higher than it in Settings. Not sure about manual config.json edits.)
  • The /bin directory now shows a list of program binaries. You can't run them yet.
  • The /etc/peacegate/menu directory shows a list of .desktop files for each Peacegate Menu item - these files give the name, description, category and launch path for each item. Eventually, double-clicking these .desktop files will do the same thing as selecting their respective item in Peacegate Menu. This will allow you to put your common apps on the desktop itself - much like desktop shortcuts. (And you can even use this /etc/peacegate/menu folder to get all app items in something like a Lua script when we implement those without directly accessing Peace Engine components)
  • No more "^C" text at the end of server-side Terminal command output!
  • Clicking the Panel Clock now opens the full Clock UI, as suggested by the REAL Philip Adams after testing the OSFirstTimer mission.

The 4K Problem

Okay. So here's the thing. For a few months now, we've been quietly dealing with an issue with the Peace Engine GUI toolkit that ruins The Peacenet in 4K resolutions (or anything higher than 1080p), and makes things hard to fit onscreen in 4:3 resolutions or resolutions lower than 1366x768.

I dub this "The 4K Problem" simply because it affects players with a native 4K resolution the most. It makes text in the game too small to read. We've tried adding a Font Size option, but this just increases font sizes and not the size of the rest of the UI (a.k.a, things get clumped together more). And that's if you can even get to the Font Size option before getting an eyestrain headache.

So how do we fix this? Well, there are many options.

  • Render the game to a 4K render target and downscale. Write the game's UI to look best in 4K.
  • Apply a scale factor to every UI element to change its size and position onscreen based on the resolution. The UI's coordinate space is pixel-based, and based on a 4K screen. The scale factor is calculated by dividing the actual game resolution by 2160 (4K is actually 2160p, aka 2160 vertical lines onscreen) with 1.0 being native 4K.
  • Make the UI's coordinate space percentage-based, and when rendering, lerp the percentage for each coordinate to a value between 0 and the width/height of the screen respectively. Text is scaled like the above option.

We've tried all but that last option, and that'll be our next attempt at this. The first option is the simplest and requires the least amount of GUI layout porting (besides increasing the size of things, getting higher-res textures, etc), but possesses one BIG con. Have you ever tried viewing a 4K, 16:9 image on a 4:3, 800x600 display? Well, I have. Needless to say, there's not enough pixels to go around and text becomes totally unreadable. Not to mention, pixels get really tall and skinny.

The second option came closer to working, but would require a complete rewrite of the game's UI and the UI toolkit itself. Using the existing UI toolkit and trying to shoehorn this enhancement in will just grant you lots of layout issues, rectangle/polygon/texture puke, misaligned text, etc. Not good.

The third option would simply make the coordinate system different. Now, the UI's layout code is COMPLETELY independent of the game's resolution. I can just say "Place a Terminal at 50% on the X coordinate, 50% on the Y coordinate, have it take up 32% on the X axis, and 18% on the Y axis", and expect to see a moderately-sized Terminal in the center of my screen that takes up the same amount of space onscreen regardless of what resolution I run at. I imagine this'd break Eyefinity and NVidia Surround because of how math works in this regard, but it'd be the closest we can get to a DPI/resolution-independent GUI. And that's EXACTLY what we want.

And as for text, it'll follow the same coordinate system - so that should be simple. It'll also have the ability to scale measurements and text render calls, so it'll be fine.

I'll keep you guys posted on the progress of The 4K Problem, but don't expect to see any solutions in the game or engine on itch.io for a while. Anyway, for now, 1080p will do as a max resolution. Not like the game benefits much from higher detail. You just get more screen real estate the higher res you go.

Anyway, that's all for this update. See you guys in the next one :)

Files

the-peacenet-windows-weekly.zip 78 MB
Version 2 Apr 15, 2018

Comments

Log in with itch.io to leave a comment.

make coordinates a percentage of the smaller of the two dimensions on both axes, so things will be the same size at 1080p whether that be 1440x1080 or 1920x1080

thanks for breaking 32:9 support in theory