Dev Log 7 — THE ECONOMY IS ALIVE (And crashing into traffic pays)
WE HAVE A DEALERSHIP AND COLD HARD CASH NOW!!
HEAVILY expanded the game loop by moving past the sandbox stage and introducing our first functional progression systems. I built out a clean, modern landing page/start screen to welcome players before they drop into the city, complete with smooth backdrop blurs. From there, you can hop straight into the brand-new Garage and Dealership overlay. The dealership features a fully populated grid displaying every vehicle class, complete with UI image previews for each ride and real-time ownership states. To complement the new screens, I also gave the HUD a massive facelift, swapping out the basic UI for a beautiful, responsive analog speedometer that dynamically reacts to your current vehicle profile’s top speed.
Got the baseline currency engine fully wired up and tracking across the session. Money isn’t just a static variable anymore; you actively generate cash dynamically based on how you play. You get a steady flow of passive income just for cruising around, a high-speed multiplier that drops more cash the faster you push the speedometer, and a “reckless driving” bonus that rewards you with a payout whenever you trigger the arcade crash physics and launch AI traffic into orbit. To make balancing and tuning the car prices easier during development, I also thrown in a temporary on-screen Test Panel that lets me inject cash or reset the balance with a click.
There were some problems I encountered on the way while getting all these UI layers and states talking to the main Three.js engine. Figuring out the DOM overlay Z-indexing took a bit of trial and error to make sure the menus sat cleanly over the canvas without breaking the mouse-drag orbit controls. The biggest headache, though, was managing performance. Everything ran fine until I started adding more features, causing some massive main-thread lag and heavy input delay. I originally thought the new UI rendering or the currency calculations were locking things up, but it turned out to be a massive bottleneck with the PCFSoftShadowMap rendering at 2048x2048 resolution, especially when combined with high device pixel ratios and individual shadow calculations on every single moving traffic car. I managed to optimise it heavily by killing off shadows on the ambient AI cars completely, letting us keep flawless input response times while keeping the player’s car shadow intact.
Next up: Now that the economy is working, I really need to make sure the AI is behaving correctly at intersections. I still want to implement that GTA-style police system to give players a reason to run from the law once they’ve racked up cash from crashing into cars. Any suggestions on car pricing or how much cash you should get per crash, please let me know!
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.