Thursday, December 29, 2022

The importance of reading documentation

Linux has a few great tools that allow people to game easier with better performance.

One of these very important tools is a program called gamescope. Gamescope does some very complex things, but to keep it easy for a layman, it runs your game and lies to it about how big your computer screen is. You can run a game in a normal window, instead of in fullscreen, and gamescope will tell the game that your computer is actually only a resolution of 1280x720, but output to a window the size of 1920x1080. This allows for a couple of interesting gaming hacks for better performance.

The main performance boost granted by gamescope is that it allows you to apply AMD FSR upscaling to any game. This is possible because the game thinks it is running in exclusive fullscreen, so FSR is able to treat the window as the screen and apply upscaling to it, so your game can run at a lower resolution but render out at a higher one. It also allows any game no matter how old to apply a framerate limiter as gamescope is able to lie about the refresh rate of the screen as well.

It is important to read the documentation though, as I used to think I was using gamescope on my system to help with performance, but found one very important requirement - you must run your game in fullscreen mode or else nothing will take effect. I run all of my programs in windowed mode so I can multitask easier while I play, and many games nowadays default to fullscreen-windowed instead of exclusive fullscreen, which was preventing gamescope from helping with performance. Only after a quick debugging session last night and some reading this morning did I rediscover this very important requirement. You will know gamescope is working because when you set your game to exclusive-fullscreen, the max offered (or only offered) fullscreen resolution should be your configured virtual nested resolution.

The second useful tool is mangohud, which displays frametimes and system info on top of any game (as long as it uses Vulkan). One very important note I found after reading the documentation is that: if you are using gamescope and mangohud, you must run gamescope first, and then use gamescope to run mangohud, and then use mangohud to run your game, like so:

$ gamescope ${gamescope_options} -- mangohud -- "$@"

If you do not apply things in this order, mangohud will cause gamescope to crash on startup. Also, do not use the gamescope option --steam outside of Steam, or else weird things will happen. You have been warned.

Using both of these tools together helps a system that is performance limited by its hardware use software to side step these constraints and gives a longer lifespan to the system. How fun, thanks Linux (and Valve)!

More code and stuff later next week.

Stay tuned!

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================

Wednesday, December 28, 2022

2022 In Review

What a year it's been!

2022 In pyamsoft apps

2 New Android applications were created this year. Trickle, an automatic power-saving application that uses Android's Low-Power mode automatically, was released on the first week of January 2022. TetherFi, a no-root WiFi tethering hotspot application, was released in May of 2022. Both of these applications are currently supported, run on the latest Android 13, and are available today for your device!

Sadly, I also had to retire some Android applications this year, as there is only so much free time in a day. 2 old Android applications were retired this year. FridgeFriend, a light touch food inventory application, and SplatTrak, a map rotation tracker for Splatoon 2 (3) were both retired this year. They do not support the latest Android 13, and there is sadly no guarantee they will continue to work on new devices. I hope you got the chance to enjoy them while they were around.

On the desktop front, pyamsoft continues to maintain a handful of Linux applications. pstate-frequency is still live and working (though as frequency stepping in the kernel gets more robust it becomes more and more hands off). bubblewrap-wrap gained support for pipewire audio, and is generally less-needed as more applications continue to get official Flatpak versions. bubblewrap-wrap will continue to exist though as there will be many applications that benefit from it's lighter sandboxing and home isolation, while also not being self-isolated enough to be a full Flatpak. dockerize is a new script that was created from a grouping of dotfiles, and helps to set up simple docker containers without docker-compose, that uses extremely strict sandbox security by default, and also dynamically allocates a new container user to run the container as, instead of running the container as the host machine user. It exists as a lighter, script alternative to docker-compose, though it is generally intended for simple setups instead of full service containerized environments. I generally use it on my desktop machines to isolate instances of game servers, adblocking DNS, and media servers. git-ssh was updated to include support for ProxyCommands and still sees active use on all of my personal and work machines.

Two JavaScript Discord bots that I wrote initially in late 2021 got updated in 2022 to use Typescript and run completely self-serving inside of Docker. mousewatch is a simple Discord bot (not on the Bot Marketplace) that checks the Anaheim Disneyland Resort Magic Key Calendar periodically, and pings you when a spot opens up on a given day. stonk-bot is a simple Yahoo Finance bot which gets you company quotes quickly.

Overall, 2022 was a productive and interesting year for me on the side of code and creation. I am excited to see what new creations and advances 2023 brings for me in the world of product and application development.


2022 In Gaming

Personally, I think this year was a bit rough for gaming. At the start of the year I was generally glued on the Nintendo Switch, though as the year went on I moved off the Switch and more towards the PS4 and Steam gaming on Linux. I think the big winner of the year for me as far as new gaming advancements is Heroic which kept me connected to the Epic Games store and all of it's various freebies throughout the year. The easy integration with Wine is almost as seamless as Valve's Proton project is, and its always good to keep healthy competitors in the ecosystem. I may have a larger gaming focused posting later on, but suffice to say the games that kept my interest this year are largely the games that did last year too: Super Smash Bros Ultimate, Tetris Effect, Bloons TD6, Slay the Spire, Mario Tennis. Some newcomers to my generally rotating catalog were: OpenRCT2, Trombone Champ, and Orcs Must Die 3. Mario Kart 8 made a resurgence given the release of it's Booster Course pack, and I see myself continuing to pick it up in 2023. I've started playing Orcs Must Die 3 on Steam and its a fun co-op time. I look forward to Disney Speedstorm, whenever it ends up releasing in 2023.

You may notice that many of these games did not release in 2022. I think that summarizes my general thoughts on new releases in 2022. There were some releases I did pick up that I think are enjoyable however.

Elden Ring was a smash hit in February, and though I am awful at it and have fallen off of it since it released (because I am just not good enough), I do not deny that I had a ton of fun with it for the couple of months that I was able to keep up. Modern Warfare II released, and it is fun, but extremely buggy and I generally find myself lacking a reason to keep coming back to it. I have yet to play God of War, but its on my radar - and I've heard only good about it. I enjoyed Cult of the Lamb on Nintendo Switch when it released, and beat it within a week, but it was a buggy slow mess and I have not touched it at all since the first completion. 

So many Nintendo Switch games were disappointing this year. Nintendo Switch Sports was a huge disappointment, even if I only really purchased it to bowl - it was still a sorry excuse for a follow up to Wii Sports. Lego Skywalker Saga was a good game and a solid Star Wars entry, but as with many games this year, once you take a small break, you fall off forever and never come back. Same with Disney Dreamlight Valley. Same with Splatoon 3. Same with Pokemon (both Arceus and Violet). The best games that came to the system this year, aside from Kirby, were remakes. Persona 5, 13 Sentinels, Skyrim (again, again (again)), Stanley Parable, Nier Automata. The Switch this year was rough. The console is showing it's age. Or maybe I am.

2022 In Health

Not the best, not the worst. Mentally I feel still motivated to do new things and see new places. I'm generally comfortable where I am. Physically I don't find myself any unhealthier after the holidays than before - which I suppose is a win in my book. I've fallen into a bit of a rut and have found that forcing myself outside to break up the monotony of being at home in a single room apartment helps. The market continues to tank, but honestly I've learned to ignore it. There is other wealth in life besides money, and as the year ends I generally find myself rich in these other measures. I am still very active in trading though, as I continue to find it intellectually stimulating and very enjoyable.


Happy Holidays from pyamsoft, and here's to a Happy New Year!

Stay tuned!

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================

Tuesday, December 20, 2022

Tailscale and Your Traveling Setup

Let me set the stage for you.

I've got 2 computers. One which has a ton of media on it, the other which is my main (development) machine. Both of my computers are small form-factor, though the media machine is 10L (about the size of a backpack) and my main machine which is 4L in a K39v2 (it fits in the backpack).

As I joked, my entire main machine, along with keyboard, mouse, and portable monitor fits inside of one (heavy) backpack. I'm pretty proud of this completely portable setup, since I work from home and thus - I work from anywhere.

One thing that I can't always do though, is connect my main machine to my media machine when I'm away from home. Or, at least, I couldn't until recently. Let's chat briefly about networking solutions that bring two remote PCs together for LAN like communication.

Enter Tailscale, an open-source solution that lets you create a mesh VPN between multiple devices on the same tailscale account. I have it running on my Android phone, and both of my machines. This allows me to ping my media machine running on my home internet when I am outside (or on mobile data), without exposing any ports or my IP address to the outside world.

Because Tailscale lets me treat my machines as if they were on a local network together, I can open my SSH port on my media machine to LAN connections, and SSH into my media machine from anywhere in the world - as long as the SSH client is from my Tailscale account.

Since I can access my media machine from anywhere, I've also started running Gnome Remote Desktop on my media machine. I can connect via a fast RDP client, like Remmina to my media machine, to graphically manage it, from anywhere in the world.

I've been enjoying this setup so much, that I also enabled it on my Android phone! I have the Tailscale client on my phone, which allows it to connect remotely to my main machine and my media machine. I have the Remote Desktop Manager app which allows me to use RDP to connect to both of my desktop machines. All it takes is a USB hub for peripherals, and a TetherFi proxy for the devices around me, and I've got a completely mobile setup that uses my main or media machines compute power for builds and even things like video games.

One note about Android Tailscale: By default, something is wrong with the interaction between the Private-DNS setting and the VPN service. You can see more information about this issue here. This matters to me because my Android device uses a custom ad-blocking DNS setup via NextDNS - out of the box the Tailscale settings would not allow it to connect Private-DNS while the VPN was running. To resolve this, I followed a workaround in that issue above - Disable MagicDNS, and remove all other nameservers (you may also have to reboot your phone). Once done, even though Private-DNS in Android still displays the annoying "Couldn't Connect", it actually does connect just fine and my NextDNS dashboard confirms the connection. Odd.

In summary:
Use Tailscale to connect your devices together from anywhere.
Use SSH and RDP to remotely use and manage your devices.
Dongle a USB hub to your Android phone to plug peripherals in.
TetherFi proxy any other devices to your phone to share the Internet.
Remote work, remote play.

How neat. While I usually can just pack my main machine into a bag, in the rare instances where I don't have it with me but still want to get work done, I can use this remote setup. Does this make me any more productive though, or make updates come out faster? No!

Stay tuned...

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================

Monday, December 19, 2022

Old and New Again

PYDroid 26.1.0 will come with some new features when it releases sometime later next year.

First is that I am re-enabling the Version Update flow in app - so when a new pyamsoft Android application is uploaded to the store, you will receive a notification in the app to download and apply the new update.

Second is the changelog for updates will become optionally viewable upon upgrading. You will be able to click an easy button to view the changelog.

Finally you may notice non intrusive in-app rating prompts appearing after you have used each app for a while. Good reviews really help me out and motivate me to continue updating and creating new and interesting Android applications.

In speaking of new and interesting applications, I also bring some sad news. I have decided to drop support for SplatTrak, the unofficial Android frontend to Splatoon3.ink. The project is archived on GitHub, and unpublished from the Play Store. I no longer have time to maintain the application, it always lagged behind Splatoon3.ink because that was where it sourced data from, and I believe that Splatoon3.ink is just a better service to use. If you were using the application you can continue to do so, as it should still work, but it will not receive any more bugfixes or updates.

New applications should be coming soon though, so keep an eye out here for more exciting updates!

Stay tuned...

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================

Friday, December 9, 2022

PYDroid 26

PYDroid 26 is being published which brings some significant API changes.

First, the hard requirement of having to extend an Application class to install PYDroid, and use the PYDroidActivity base class is gone. Now instead, you can install PYDroid into your application using the Application.installPYDroid extension function, and you can extend your own BaseActivity and use AppCompatActivity.installPYDroid() to initialize it's UI bits.

This should help developers implement PYDroid into their own applications more easily, as we no longer have a hard dependency on PYDroid existing as a BaseActivity.

Future work in 26.1.0 will refactor pydroid-inject to use an explicit object graph instead of overriding getSystemService in a very hacky way. This will help reduce crashes from bad system graph initializations, and should further remove our dependency on very specifically structured Android code.

PYDroid 26 will be present in all pyamsoft application updates, which will be hitting a Play Store near you hopefully in the next week or so.

Happy Holidays!

Stay tuned...

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================

Tuesday, October 4, 2022

Empty Fridge

Never the most fun day when apps need to be unpublished, but such is the price of progress.

FridgeFriend is unpublished from the Google Play Store from this point onwards. The GitHub repository will be archived for historical purposes, but will not receive any bugfixes or new features.

FridgeFriend was my first application that really captured modern Android development. It was the first time I used Room, the first time using Kotlin, Coroutines, Flow, a complex Dagger setup, the whole kitchen sink. As a result of this, the app is always the largest one I work on and the one that takes the most time.

It is also, painfully, the one that is least useful to me in my day to day. Managing the contents of a physical fridge is a difficult problem to solve with technology. The solution must be smart, update in real-time, and not be more of a hassle than simply remembering or checking the fridge periodically. While a program may seem like a decent solution on the surface, issues arise in practice.

Because the app was not integrated with the fridge itself, whenever items in the fridge were eaten or moved or frozen or spoiled, I needed to remember to open the app and check off boxes and swipe away cards. This task (which was inconvenient at best) quickly became a chore.

Because there was no good way to really determine the expiration date of opened packages or produce, I would constantly ignore the notifications from the app and check the fridge myself.

Since there was no way for the app to know when I was in a grocery store (thanks Android Location policy restrictions), I would frequently forget to make a shopping list, or forget to consult the list I made once I was in the store. This led to me coming home with more things than I needed, which defeated the point of the app.

Essentially, when so much of the rest of my life is smart and kept in sync, having one app that adopted a piece of my day-to-day work that was not integrated properly became a huge burden. Since the app is no longer useful to me and I have no interest to maintain things I do not use, I will have to retire FridgeFriend. Moving forward, the only supported pyamsoft Android applications are:

Home Button, TetherFi, Trickle, and (the newly updated) SplatTrak. I hope to add TickerTape, a new stock portfolio application to this list soon.

So long and thanks for all the fish, FridgeFriend.

Stay tuned!

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================

Monday, October 3, 2022

SplatTrak and the wonderful world of Compose

Been a little bit.

Lots of developer related updates, PYDroid is preparing for version 25 which has been actually deployed into pyamsoft applications on the Google Play Store now for the past couple of months, but it's not fully API stable yet so tagging the release will have to wait. Lots of work has gone into making the API surface as easy and small as possible, so you can just drop it in your app and get building. Make something cool.

As for app updates, all supported apps continue to receive regular enough updates, I am close to getting everything prepared for Android API 33. Specifically, I just released SplatTrak into Open Testing, which brings support for the new Splatoon 3 game in app version 13.

Since I no longer play Splatoon 2, SplatTrak will no longer support 2 and it's map rotation. All updates going forward will be Splatoon 3 specific.

The new SplatTrak version brings support for the Splatoon 3 lobbies (open, anarchy series, anarchy open), the new coop rotation and weapons, and info about current and past Splatfests!

In the future, I hope to support map and coop rotation alerts and festival notifications, but I will talk about that more at a later date.

Stay tuned!

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================

Monday, July 25, 2022

Jetpack Compose Weird Bugs

Jetpack Compose is very cool and also very buggy.

One bug I just recently squashed had to do with random builds failing with no explainable error message, or a build succeeding which will randomly throw an error looking something like

"Class cast Exception, cannot case LamdaImpl to kotlin.jvm.Function0" or something to that effect.

The error would only happen at runtime and would only happen as a result of a ComposeView calling setContent (in my case from a Fragment class).

Fixes usually are some flavor of clean and rebuild, but what helped me especially was also double checking that the gradle configuration property "parallel" was off in my gradle.properties file, and that "compile in parallel" was unchecked in the Android Studio settings.

That was a fun two days.

Stay tuned!

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================

Saturday, June 4, 2022

TetherFi and modern rootless Internet sharing

Recently a new pyamsoft application called TetherFi was released.

In short, this app allows you to create Wi-Fi networks hosted by your Android device that can share your mobile data or Wi-Fi powered Internet connection with other devices, like desktops, laptops, and game consoles.

The application works by creating a local Wi-Fi Direct Group and sending Internet requests from your other devices like a game console through your Android device via an HTTP Proxy running on your phone. As a result, Internet traffic from your device looks like it's all coming from the phone, which prevents carriers from seeing your network traffic. It doesn't require root, or installing a program on your computer, or any kind of complex setup. All it takes is a relatively modern Android phone and some reading comprehension.

TetherFi is most useful in situations where your phone has Internet connection but nothing else does (say you are in the middle of nowhere with no Wi-Fi, but you do get cell signal). Maybe you have a hotspot plan that is capped at a small amount of data or throttled after a certain amount is used. While TetherFi will never be as fast as a direct Internet connection (due to extra time it takes to process proxy traffic), it should be at least faster than a speed capped connection and does not have a hotspot data cap.

The only caveats for usage at the moment and that it can only generally support "normal" Internet browsing, like websites and emails. You are unable to do things like play complex online games, due to the fact that you may end up being limited by things like CGNAT and port forwarding (though a port forwarding VPN may be able to fix this in theory).

It's free, it's open, and as always I would love it you could try it out on the Play Store and test the application! Let me know what you think and how it can be improved!


Stay tuned!

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================

Monday, March 28, 2022

Fun New Things

Fun new project! Over the past couple of days I've been hard at work on a small project that I've temporarily dubbed "WideFi", which is an Android application that you can use to share your Android device's internet connection with other devices like a laptop or game console.

This came about after a weekend in an area with no Internet. I had connection to the Internet on my Android phone, but my Nintendo Switch could not get online to download updates from the eShop. I thought to myself there must be a better way, and thus after a week of frustration, WideFi was born.

WideFi is a play on the word WiFi, and the idea of opening up the "single" internet connection to a wider audience - your other devices.

WideFi is currently a work in progress but I hope it will get to a state of "generally working well" soon.

WideFi works by creating a WiFi network using your Android device via the Wi-Fi Direct technology. WideFi creates a Wi-Fi Direct legacy group with a network name and password that any device can connect to. Now normally, this Wi-Fi Direct group does not give access to the outside internet, but WideFi solves this problem by also running a very small HTTP proxy server on the Android device. A connecting client device can connect to the Wi-Fi Direct group, and set their network proxy settings to WideFi's proxy server at 192.168.49.1 and port 8228.

By doing so, any device can use the internet connected Android device to proxy it's connections. You can use this to connect to the web for general internet browsing and "normal" usage. Due to limitations with Android, it is currently not possible to use WideFi to get your game console an open NAT type to play multiplayer games, though you should be able to browse most game stores (note that the connection to the Playstation Network fails currently, so the PS store can't be accessed). This can allow you to do things like connect to and download games from the eShop when your Switch does not have access to Wi-Fi.

I hope to one day better understand what causes an open NAT type on a game console so that WideFi can be used as a full proxy to allow you to play multiplayer online games as well. But first thing's first, I will need to finish up the starting version and release it onto the store.

Until then, you can find WideFi's source code here on GitHub, though it's heavily a work in progress.

Stay tuned!

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================