• Howdy! This is my weekly post where I talk about whatever programming stuff I’ve been up to. Let’s just dive right in!

    dotBeat Internet Time

    You might have noticed that last week I released a small macOS app called dotBeat Internet Time. Let’s talk a little about the why and how I built it.

    When I started streaming a few weeks ago, I figured it would be a good idea to think of future ideas to build on stream. I even started a GitHub Project for stream ideas. Earlier in the week, my friend Dan Crum and I had been talking about the glory days of the internet, and one of us mentioned Swatch Internet Time, a throwback to 1998. I thought of this when coming up with project ideas, I thought it’d be pretty easy to create a menu bar app to show the internet time, and threw it on.

    Before setting to work however, I wanted to size up “the competition”, to see what else was out there already.

    The first app I found, BeatBar does the job, basically. It shows the internet time in the menu bar, and then features a drop-down SwiftUI interface for converting internet time to local time and vice versa. There’s a couple downsides to this app, in my opinion:

    1. It uses SwiftUI, which means you must be running macOS Catalina or newer, which I learned with PiBar is a big negative to some people.
    2. The drop down UI is confusing, with two sliders that change times in a weirdly arbitrary way (the top slider does increments of 10 .beats, the bottom slider does increments of 15 minutes).
    3. The app is priced at $4.99 in the Mac App Store. That seems like a lot of money to me.

    Next up, iBeatTime in the Mac App Store is a free app, which also displays the internet time in your menu bar. It has a ‘converter’ interface for changing your time to internet time and vice versa. Somehow the interface ends up being even worse than BeatBar, with just two fields and you have to select which conversion you want to do. This makes little to no sense to me, but at least the app is free.

    BeatTime has apps for every platform, but the macOS app is basically a glorified widget and doesn’t appear to display the time in the menu bar.

    There are also a couple iOS apps in the App Store, like Internet Beat and Swatch Beats and they all look pretty terrible. There’s an Apple Watch only app, @Watch which doesn’t look too bad.

    So all in all I came away with the impression that there’s definitely room for improvement in regards to the apps out there currently. They either have somewhat bizarre UX or just poor design and appearances in general. I figured I could definitely do better, though there isn’t exactly a lot of space for improvement: displaying the internet time in the menu bar is pretty straightforward, and the ‘converter’ function doesn’t seem that elaborate. In one app I saw (not sure if I found it again and linked to it above) the ‘converter’ functionality allowed you to set a timezone. This seemed like a good idea to me: when you receive an internet time, you obviously need to convert it to your local time; but when you are sending an internet time, it becomes more important to be aware of what the other person’s timezone may be. You don’t want to set an internet time that is going to be 3AM for the recipient.

    But what does a good UX for that look like? The one app that had this feature just had a bunch of timezones in a drop down. This works, I guess, but you have to already know what timezone the person is in, and when you have one timezone picked, you can’t see the others. So I figured… why not display them all? Additionally, I simplified the ‘selection’ interface down to a single scroll bar. This scroll bar adjusts the .beat from 0 to 999, showing you your local time the whole way. No need for multiple scroll-bars or different inputs.

    You can watch me build most of the app and ruminate over these design decisions in the VOD for the stream. The stream misses out on some of the more fun work, like programmically building out the massive timezone UI, which you can see in the final SimulateTimeViewController. You can see the code is actually pretty simple. I set up an array with all the timezones I want to display (and there are actually many more timezones than the 32 I display in dotBeat) and a fallback name in English. Then when the window loads, I iterate on that array and do some extremely lazy pattern matching to set up all the constraints for them.

    It’s really Apple’s Date, TimeZone, and DateFormatter classes doing nearly all the heavy lifting. You get a lot of good functionality out of those classes, namely localization. While I haven’t run dotBeat in any non-English locales, it should automatically adjust the times and names of the timezones to match a users locale. If you set your mac to use 24-hour time, it’ll change the times in the app to match. That’s pretty neat!

    As with my other projects, dotBeat is open source and free to download. You can check out the source and download it on GitHub. If you’re interested in supporting me as a developer, you can also purchase it for $1.99 on the Mac App Store.


  • This week on stream I built a small macOS menu bar app I’m calling dotBeat Internet Time. It’s a small, focused app with two features: 1) It displays the current Swatch Internet Time in the menu bar, and 2) It allows you to figure out how Internet Time corresponds to your local time, as well as most of the timezones on earth.

    What is Internet Time? Back in 1998, Swatch (the Swiss watch company) thought that in our rapidly globalizing world of the early internet, a globalized method of telling the time was necessary. They decided that each 24 hour period would be broken up into 1000 “.beats” instead of 1440 minutes, and that they would start counting from midnight “BMT” (GMT+1). These beats are notated with an @ symbol. So for example, @42 is 4:00 PM local time in California, but it’s 5:45 AM the next day in Nepal.

    dotBeat Internet Time screenshot

    You can download it for free from the releases page on GitHub.

    You can also buy it on the Mac App Store for $1.99, if you want to be nice and show some support for me as a developer.

    The app, like my others, is open source.


  • Howdy! This is supposed to be my weekly post where I talk about whatever programming stuff I’ve been up to. Let’s just dive right in

    Laravel & Streaming

    Like I said last week, I planned to start streaming this week and was going to use it as an opportunity to learn Laravel, so that I could make a web-based game. Well, I did it! I streamed four times (Monday, Tuesday, Wednesday, and Friday) for 3 hours each time. The only full-time viewer was my friend Dan, though a few people wordlessly filtered in and out. I don’t think it’s very exciting to watch me program, though you do get to hear about my thought process as I build things.

    The first two days of the stream were spent watching this Laracast series, Laravel 8 from Scratch so that I could learn some of the basics really thoroughly before jumping in. This was a bit of a slog, the tutorial lies in the sweet spot where an inexperienced programmer could get lost, and an experienced programmer could get bored. I got bored about 7 hours in, which is pretty good considering it was a 9 hour tutorial.

    Instead of jumping into my ultimate goal project, I decided to revisit an old project of mine called Textlike. It was a very rudimentary web-based roguelike I built out of PHP about 10 years ago. I figured it would be cool to try to rebuild it in Laravel, since it’s inner workings are still somewhat familiar to me, so I can focus on learning the ins and outs.

    By the end of the week, I got pretty far into some of the basics: floor generation is complete. Initially I got moving between rooms working, and once that was working I set my sights on handling room generation. The way Textlike generated rooms 10 years ago was entirely on-demand and didn’t make for very interesting floor layouts. This time around I decided to lean on maze generation, which I researched a bit. Then I found some existing PHP code and adapted it for my needs, using it as the data model used to create all the rooms on a floor and define the connections between them.

    So now some important things are done: account creation (very easy thanks to Laravel Breeze), character creation and deletion, and room navigation. I’ve already got enough code in place that I think it’s starting to get a bit smelly. I’ve put a lot of business logic inside my models, which I think is a code smell. I’m also not well versed in Laravel Livewire best practices, and I feel like the way I have things set up right now is a bit weird, with multiple components… I could get more into it, but maybe I’ll wait for a later post once I know more about Livewire.


    That’s actually it for this week. I’m writing this on Tuesday, so I’m late, and I’ve already done some cool things I’ll have to write about next week! Maybe there will be an announcement post tomorrow, for a project I started on stream yesterday and finished today. We’ll see!



  • Howdy! This is supposed to be my weekly post where I talk about whatever programming stuff I’ve been up to. But if you’ve been paying attention, it’s been an entire year since I last wrote a blog post. That’s because I haven’t been doing any programming for the past year, outside of my job anyway (winky face). But this week I did start doing some programming stuff again, so… here I am, writing another post about it.


    Streaming

    I’ve been thinking about streaming. After a couple trial runs playing video games, I realized I don’t think I would enjoy streaming video games, so instead I decided I would try out streaming while working on programming stuff. I haven’t streamed much so far, though I am streaming right now as I write this, but I feel like it’s kind of enjoyable, even if no one is watching outside of two of my friends.

    So, as Paymoney Wubby would say, I’m streaming right now live at Twitch.com/amiantos. I’m probably not, but I am going to try to stream every time I am doing programming stuff, so there’s no schedule at the moment, but if it’s night time or the weekend there may be a good a chance that I am online and streaming programming junk.

    Or, by the time you’ve read this, I’ve already decided it’s too much work and makes my throat dry when I have to talk continuously on stream to nobody.


    Gamebook Engine

    Over the weekend I got an email from someone that said:

    all my friends used to play games on gamebooks but now we cant find how to download it anymore.

    theres a testflight link on https://github.com/amiantos/gamebookengine but my friend cant get it to work.

    how do i download gamebook engine in 2021??

    thanks so much for making this cool app!!!!

    This is pretty cool, because I didn’t honestly think anyone ever used Gamebook Engine. But it turns out some people have, and have even developed a little habit of making gamebooks with or for their friends. That’s pretty fuckin’ neat if you ask me!

    So yesterday I loaded up Xcode and pushed out a new build so that you can now download Gamebook Engine to your iOS devices if you so choose.

    In a response, this user brought up some feature suggestions that I added to the Issues on GitHub, because I think they’re pretty decent ideas. And besides, who are you going to listen to if not the people who use your own app more than you do?

    do you think you will add a way to organise variables (like put them in folders for them or something)? it would also be cool to separate a game into parts or chapters or something so the overview isnt so complicated for big games


    Life Saver

    I got a second email over the weekend from a fan of my Life Saver screensaver and wondered if there was any chance I would release an M1 compatible version.

    I had been previously contacted by a user of PiBar asking for an M1 version and doing so was simply a matter of opening Xcode and doing an new build of the app. So I figured I could do this for Life Saver.

    Since the last release of Life Saver nearly two years ago, someone submitted a pull request to add the additional grid sizes from the Apple TV version to the screensaver. They did it in kind of a sloppy way, so I had to do a tiiiiiny bit of work to clean up the UI, thanks to a suggestion from my friend Dan while I was streaming the session. But other than that it was no work at all, and I pretty quickly stumbled my way through code-signing the new version of the screensaver and punted it off to the person who emailed me.

    However as I started writing this post, I got an email from them saying that the screensaver still does not work on their M1 mac. So that’s too bad. I’m going to have to look back into that and see if there is some special build option or something else I’m going to have to do to get M1 compatibility.


    Laravel?

    I recently started playing an idle game called Melvor Idle, which I like quite a bit. I went poking around the website version only to see that it was built somewhat similarly some of my earliest PHP-based projects, just with more javascript.

    I’ve been hankering for several months for a new project to work on, and Melvor inspired me to pick up web development again. I like iOS development, but I just want to fuck around, and I don’t want to have to learn SwiftUI and Combine and whatever other new stuff is going on in the world of iOS. I also feel like web apps can reach more people more easily, so more people will mess with my stuff than those who have to download an app and so on. And besides, if I build something awesome for the web, I am more than capable of building an iOS version, so there’s no real loss here.

    So, inspired by Melvor’s use of PHP, I decided I wanted to learn Laravel.

    Laravel looks really cool, and with stuff like Laravel Livewire you can do a lot of dynamic stuff without manually writing a bunch of unique APIs and dealing with AJAX calls everywhere. So it seems well-suited to building some sort of web game, either an idle game or some other sort of interface-based game.

    I’ve only started dipping my toes in, but it seems really cool so far, except for the fact that I have to start writing semi-colons everywhere in my code, which is pretty damn jarring as a python developer. What can you do?


    Well, I think that’s it for me this week. I’ll probably continue learning Laravel and faffing about on my stream. So, if you’re around and bored, and want to listen to my incredible voice, it’s free of charge over on Twitch. Have fun!


  • Cyberpunk 2077 is quite an achievement. Is it absolutely perfect? No. But the ways it’s not perfect can (and likely will) be fixed with patches. Will it ever live up the absurd levels of marketing hype? Probably not, but that’s okay. The hype was ridiculous, and the ways it has fallen short of it are fairly unimportant to the gameplay in my opinion.

    The main thing about Cyberpunk 2077 is how immaculately set-dressed the world is. Nearly every accessible part of the world is just a huge mess of garbage and grime, but also things of technological beauty. The amount of detail and design work put into the drivable vehicles alone is mind-boggling. Cyberpunk’s rendering of a large capitalist dystopia is akin to Red Dead Redemption 2’s rendering of the American west. It’s basically the perfect idea of these places. Is it 100% realistic? No, it’s the theme park version, but isn’t that better?

    The nicest graphics in the world wouldn’t save the game if the gameplay wasn’t fun, and Cyberpunk delivers there as well. The gunplay feels great, very punchy and visceral. The RPG progression eventually turns you into an overpowered unstoppable murder machine, but isn’t that how it should be? You start off having to hit people 5 times in the head to kill them, and by the end you’re doing somersaults and slicing people’s heads off with retractable mantis blades. Sounds about right to me.

    The main story and the sub-stories that compose the bulk of your first 40 hours in Night City are the glue that holds the whole thing together. The main storyline is fairly interesting, and some of the other storylines definitely go interesting places, but it’s mainly the characters that actually make you feel things here and there. Sometimes that might be annoyance when the characters make mistakes despite your best efforts, or admiration when you see another side of a character you didn’t expect.

    Cyberpunk is unfortunately a buggy game, with some rough edges here and there. I don’t think the bugs I’ve encountered are anything worse than you usually get with a game of this scale, but we’re in an age of the internet where every minor complaint must be amplified until it becomes a scandal that must be brought up every time the game is mentioned. That’s too bad, because it almost prevented me from getting the game. That said, maybe all the negative hype on release helped me adjust my expectations, so that I’ve been able to enjoy what is a monumental achievement, instead of sitting around nitpicking it to death.

    As a bonus, here’s some pictures I took with photo mode while I played the game. There shouldn’t be any spoilers.