I’m a software engineer, problem solver, and cofounder of Foggy Box Games.
Migrating to Firebase Functions V2
I’ll be honest - I’ve been putting this off for a while. The Firebase Functions v1 to v2 migration has been sitting in my backlog since its announcement, and like many developers, I kept thinking “well, if it’s not broken…”. But after diving into some new features in v2, I realized it was time to bite the bullet and modernize. Why TypeScript? The decision to rewrite in TypeScript wasn’t just about following trends. The v2 SDK is written in TypeScript, and the type safety it provides is particularly valuable when dealing with cloud functions. No more scratching your head wondering what properties are available in that data object - TypeScript tells you right there in your editor. ...
Local Firebase Development with Emulators
Why Emulators Matter If you’re building anything substantial with Firebase, running your entire stack locally isn’t just convenient - it’s essential. I’ve been diving deep into Firebase development lately, and the emulators have become an indispensable part of my workflow. The Setup First things first, you’ll need the Firebase CLI. Here’s what a typical firebase.json looks like for a full-stack setup: { "hosting": { "public": "dist", "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], "rewrites": [ { "source": "**", "destination": "/index.html" } ] }, "emulators": { "auth": { "port": 9099 }, "functions": { "port": 5001 }, "firestore": { "port": 8080 }, "hosting": { "port": 5000 }, "ui": { "enabled": true } } } Connecting Your App The most crucial part is telling your app to use the emulators. With the latest SDK, it’s pretty straightforward: ...
Startenders: Intergalactic Bartending
At its heart, Startenders is an intergalactic bartending game with a key focus on getting the player moving around and using machines, pouring drinks and memorizing the bar. ...
Brunch Club
Brunch Club is an action packed party game about food that can be played solo or up to 4 players with a seasoning of pop culture. Try, try, and fry again! Can you stand the heat, or will you have to get out of the kitchen? ...
BitMap: 3D Fitness Data Visualization
I’ve always been fascinated by GPS data visualization, particularly in fitness tracking. While standard 2D maps are useful, they don’t tell the whole story - especially when it comes to elevation changes. That’s what led me to experiment with MapBox’s 3D capabilities and the Fitbit API. The Concept BitMap Prototype Interface The idea was simple: take GPX data from Fitbit activities and render it in an interactive 3D environment. MapBox’s GL JS library provided the perfect foundation for this, allowing for terrain visualization and custom data overlays. ...
EVE SSO OAuth
With an understanding of how to retrieve data from the public CREST API endpoints, I want to get down the authentication side of things before I get into the fun stuff. Third-party applications for EVE Online can now make use of the Single Sign On (SSO) user flow, allowing users to authenticate the application via the EVE login servers. This is great for web-based applications but causes a bit of hassle for non-web applications. I’ll try and explain. This is a successful use case for a third-party web application: ...
EVE Static Data Export & Solar Systems
Shoot for the moon! Part of the goal for the EVE Online CREST API challenge was to visualize the chosen trade route. To do this I’ve made use of both the CREST API and Static Data Export (SDE) to populate a series of uGUI buttons for each region. There’s not a whole lot of reasons to use the CREST API to poll static data such as regions, but it shows that I know how to use it. The next task is to show the constellations - which are collections of solar systems. ...
LINQ Queries
Ok, so we’re back in development mode now. I’ve pulled lots of data from the CREST API and it’s being displayed but we need to be able to filter and sort it so it’s useful to us. Hopefully you’ve come accross LINQ at some point - Language-INtegrated Query. This stuff is great, it’s basically cheat codes for programming. The first thing we want to do is sort all sell orders by price because we want to know where to go for the best deal in New Eden. I was hoping the resulting LINQ query would look more impressive but this is it: ...
Stop Calling Them Scripts
Or don’t, I’m not a cop! Ok, this is more a personal habit but a sensible one - hear me out. The most commonly referenced thing in unity is the idea of a Script, Unity even uses it in its context menus when creating new C# Scripts. This idea is a remnant from the days when programming in Unity was made to look approachable by non-technical game developers and frustratingly stuck around. ...
Meta Data
With the data in and stored in sensible C# classes, we can start to have some fun - I’ve added in some meta data about the current search item. By checking the lastest history item with the latest but, comparisons can be made about their differences. in this case, the change in price and percentage change. double _latest = hist.items[hist.items.Count - 1].avgPrice; double _latestButOne = hist.items[hist.items.Count - 2].avgPrice; double _change = (_latest - _latestButOne); double _percentChange = (_change / _latestButOne); DateTime _latestDate = DateTime.Parse(hist.items[hist.items.Count - 1].date); TimeSpan _outofDate = (DateTime.Now - _latestDate); The TimeSpan class is great for this as it can be calculated with a the DateTime class. ...