Jonk, Inc

I wanted to announce my new game that is still under development, but with a disclaimer that I still have about 3 weeks of development left before it goes into an official beta. It may take longer depending on how quickly I can get all the new custom assets in the game which are still being created as I type this. Most of the art is placeholder still, but most of the features are completed right now. There’s just a lot of polishing work remaining. I will probably do a couple weeks of closed beta testing in the app stores before I decide it’s ready. It’s sort of looking like April right now in terms of going live.

Jonk, Inc is an idle game with the central idea around building a junk empire. You start with a modest junkyard you inherited and your job is to grow it into a mega junk empire. You find vehicles in a marketplace or through barn finds. You operate a fleet of utility vehicles to pickup and drop the vehicles into your yard. Get customers into your yard using different advertising strategies. Rent tools out to customers to help get the parts off the cars faster and easier. You can also pick parts out of cars yourself to sell them at a premium in your parts warehouse. Then send the exhausted cars into the crusher and sell the scrap. Expand by getting more service vehicles and everything is upgradeable. Then get to the next level by automating processes by unlocking special Jonk cards.

Below are some screenshots of the current state of the game. It’s now changing daily with new art and polishing being done constantly. It will probably look completely different in 3-5 weeks.

That’s just the first release I’ll be doing in the next month or so. It’s just the start. I built the entire game to be expanded and I have plans for a lot of amazing scenarios that have never been tried before in games. It will feature a lot of new idle game innovations. I plan on expanding the game throughout 2021.

The idea originated with the idea of creating an idle grand theft auto type game about a year ago. I have a lot of experience with working on shitty cars so it seemed like something I could build with some real depth to it. That combined with my 15+ years of dev experience I started researching idle games and fleshing it out for several months before I really set out on the development. I worked with Unity for about 5 years now mostly in a hobby capacity, but I wanted to take on this project like I would in my professional capacity as a developer. I took some vacation time to start getting deep into the development of the game. After about 4 weeks I had a working proof of concept that isn’t too far from what I have today. After that point I knew I had something pretty special and was the Turing test to prove I was capable of doing such a big project.

I spent about 3 months total so far developing what I have right now in the game. It’s been a breakneck pace for this sort of game even for actual mobile studios with a team. I’m the solo developer contracting the artist (https://twitter.com/orhken) and composers (https://twitter.com/WillSavino and https://twitter.com/derriskharlan). I spent a lot of time designing a good architecture using a lot of coding techniques that many top shelf studios use like Niantic. Dependency injection, Reactive programming and Redux states are the core of it, but there’s also the use of the Blueprints, Data Factories, Mediator pattern, heavy separation of concerns via data contracting throughout. Every entity uses custom behavior trees for AI. There’s almost 22,000 lines of my own code spread across 398 C# files right now. It’s one of the nicest code bases I’ve written and it’s enable me to start going really really fast without technical debt at every corner. I can leave large pieces of the code in a refactoring migration pattern while working on other things and refactor as I go without breaking half the game. I also have light unit testing in place in certain critical areas and a full speed run Play Mode test that exercises all the features of the game in 3 minutes at a 10x time acceleration to verify nothing broke.

The architecture I created for the game. I have changed only one thing over the course of development and it’s the config.json file. I instead created blueprint factories. The entire game config is created in code and the entire config is abstracted using interfaces. There is an IOC container config for each stage which defines what blueprint versions to pull in. Eventually I will probably move towards a custom GUI editor using ODIN. The game config built at runtime using blueprint factories straight in c# code has been good enough to get me this far.

I never built an idle game or a 3D game, and this has turned into a project that really tested every aspect of my development abilities. I have grown substantially after powering through a lot of the technical aspects of developing such a large game and doing it solo. There’s a lot you don’t think about when it comes to idle games. I do believe it’s a severely underserved genre and I can see why now. These games are incredibly difficult to get right. There’s a lot of things to go wrong when building a self playing game. It’s a genre that is too difficult for most indie devs to tackle, and too small for big studios to take on. There’s a lot of room left in the middle for innovation and creativity. That’s just my thought.

The biggest challenge has probably been just how to manage the chaos. Everything in the game has a mind of its own. I use behavior trees to create the AI. There’s hundreds of behavior states to manage and they all have to work together seamlessly to convince the player it’s their own little world and it’s working like they expect it to, but most importantly…the player feels like they are orchestrating the madness somehow.

The pathfinding was also one of the more trickier things to solve. I ended up using a node graph to create the path networks. Creating smooth pathing was also tricky. The node network has has to have at least 4 points on each corner to generate good splines on the fly. That seemed to be the easiest path to really make pathfinding that has no limitations and performs excellent with a lot of entities. In the end I ended up with no canned paths or animations. That was the only way to really make the game scale and feel like it’s truly a bustling business.

There’s a network for each area. Road, Junkyard and the forklifts have have their own as well. Each blue line is a spline path generated from a found route in the network (yea I know it looks like I doodled the lines, but they actually are rendered in the game for debugging).

There are no predicted results. Everything works off queues with priorities to feed behaviors various tasks. Customers never take the same path twice. Customers can change their mind if something changes in the middle of an action because something else became more important and they can figure out how to get there from anywhere. On top of that everything also has to respond instantly to upgrades, buffs, etc. This is typically a giant disaster for developers to manage so many events. I can see why idle games are hard to get right or even at all.

NodeCanvas behavior tree for a customer. I still have no idea what I am really doing. This was a really early implementation of a BT.

As far as tools and libraries go. I recently went to Unity 2020.2 and i’m now using Rider 2020.2 IDE. I have transitioned to rider for all my C# development over the past year. The core libraries I lean on are Zenject, UniRx, UniTask and MediatR. I use LeanTween for animations. NodeCanvas for AI. Easy Save 3 for save game, but I may transition that to a MessagePack serializer instead. I split all the libraries into an assembly and reference it in my game code assembly to reduce build times.

Some might be interested in my dev environment. I am using twin 32” 1440p monitors, Kinesis Freestyle 2 keyboard, Evoluent VMDMW wireless mouse. Autonomous desk and chair. I only added the arm support recently because my wrist pain was coming back from working so much.

I built the pc about 3 years ago. I reused my old Thermaltake Suppressor case, but got the temper glass panel and PSU cover. It’s got an 8086K in a Z370 AORUS Gaming 7 motherboard. I delidded the CPU and it has a custom CNC machined copper heat spreader with liquid metal on both sides with an EK monoblock. The GPU is a Gigabyte WaterForce 1080 TI all plumed into a custom water loop cooled by a 3” thick Alpha Cool radiator. There is an EK water pump hidden under the PSU cover. I don’t run a reservoir because the radiator is soo massive. I cut a hole in the top of the case where the fill plug is for the giant radiator. I filled it 3 years ago with Koolance fluid and a bunch of alpha cool growth inhibitors and haven’t touched it since besides adding another 1TB NVME drive. Still runs @5ghz all cores and doesnt get above 55c. It’s ran like that for years and I have zero stability issues. Coolant appears to still be good. The monoblock has a nice clear window and I don’t see any build up on the fins even after 3 years so I’ll probably run it for another year. It’s been a skookum dev machine. I also have an old 2013 i7 iMac used to do ios builds.

That’s all I really have to say for now. I’ll post again when the game is ready for release.