• Register

Hostile Mars is a Tower-Defense Factory-Building game. You must create efficient supply chains, salvage destroyed enemies, and upgrade structures to support your gigantic cannons that defend your base against thousands of enemies.GIGANTIC GUNS

Post news Report RSS Hostile Mars Devlog #06

Development Update: Energy Shields, New Spawn Mechanics, The Harvester Building, And Playtesting Preparation!

Posted by on

DevLog 06 Cover min

Preparation For Playtesting

A lot of tasks were completed in the last week, one step closer to getting the game into playtesting. A few days were spend on cleaning up things for the playtest alpha, such as UI elements, the objectives system, and inventory management. I've also tweaked the way enemies spawn. Previously they would spawn as a continuous stream of enemies, giving the player a chance to harvest the scraps and any valuable materials they drop when destroyed. Some playtesters found this to be cumbersome at the start when they were trying to figure out how to play the game and navigate the systems. They now spawn every couple of minutes based on a wave timer.

Objectives are shown on the left-hand side:



Obviously, waves are nothing new in the tower defense genre but I do feel like it plays better at the start. And when the base gets bigger the enemies start to spawn more frequently, still allowing some major farming to happen in mid and late game.

UI Tweaks

I've been also tweaking the UI a bit. It is not finalized and the assets are still placeholders until some more testing happens to find out if the necessary information is there before investing time in making a final design. (UI work is probably my least favorite part of development, and I usually try to hire someone that enjoys it and is more talented than I.)



Lots of Enemies and the IK System

I spent a good amount of time refining the IK system that I made to work with Unity's DOTS framework. It has been more of a challenge than I anticipated, simply because of how translations (positions) and rotations are updated each frame. I should say "not updated each frame" and that is what caused some headaches with having to update the positional and rotational data for multiple iterations inside of a multithreaded job. But it's coming out nicely and there should be some walkers out in the following weeks finally.



Most of these enemies have already been implemented prior to the decision to move to DOTS, so these tasks are mainly converting them over to the new system.

Force Fields

I decided to add a force field to the player and the buildings. It plays well with the health recharge of the player, which adds power back to the shield in increments after not being hit for so long. Health is very limited but the shield is the main defense the player has and can be easily recharged if in cover or after clearing a group of enemies.



Harvester Upload Station
A new building is ready to show, the Harvester Upload Station.



This is built along with a harvester robot to collect ore that is on the surface of the environment. This is different from the rock and mineral harvesting you do manually as the player (which later turns into a drill-bot to do it for you).

Instead, the harvester gathers ore embedded in the ground that the mining tools can't harvest. This is much more efficient than harvesting these materials through rock processing and deconstructing.

I've also added some visual effects to show the power range of Home Base and power distributors alike. They both have a wireless range for electricity to energize buildings, turrets, and traps. Each of these requires power to operate. The only buildable items that do not require power are some storage systems and base building panels.

A few new rock variants have been made as well.

VFX System Causing Crashes

I squashed a nasty bug that was causing crashes in the playtesting too. There was an issue with the way that images were stored within the Visual Effects System. Due to wanting to have thousands of effects in the game at once, I had to write a custom system to handle the visual effect spawn locations.

Normally a new effect would be spawned on demand one at a time, like an explosion or a bullet impact effect. This wasn't effective when pushing into the hundreds all at once so I created a system that would take the positional and rotational data of each effect and save them as a pixel in an image as color data. each color is 3 points of data (red green blue) and positions/Euler rotations match up perfectly with that data. So effectively each pixel represents the location to spawn a new visual effect particle which spawns all of the effects needed that frame in the same vfx group, reducing draw calls, calculations, and additional overhead. It works really well and I've tested up to 30,000 explosions at once without a problem!

(a video of the vfx testing with 30,000 particle effects: Imgur.com )

But I am relieved that the bug was a simple fix. I was assigning a new image to the variable each frame and it was being saved in memory. they added up and eventually crashed the system. All I had to do was resize the existing image and reassign new colors instead of creating a new image. Problem solved.

That's it for this week, come back next week for another update on development, and information on the start of the first private playtesting!

Take care,
-Jake

PS - I'm going to start adding Bug Fixes and Design Changes in the dev logs moving forward now that playtesting is approaching. I started recording everything a few days ago so it doesn't include the entire week. Future weeks will have the entire list of fixes and changes.

BugFixes:
Changed character collider collision detection to extrapolate to fix rare occasions of the player falling through the terrain.
Fixed bug that caused a crash when an enemy entity was removed while in the middle of a pathfinding calculation. The entity now waits until the path calculation is complete or doesn't start it when an enemy is queued for removal.
Fixed a crash caused by reassigning a new image in the VFX system each frame by assigning new data to the existing image.
Fixed UI bug that caused the selected machine crafting item to un-highlight making it hard to see what was selected.

Design Changes:
Changed enemy spawning from "continuous over time" to "intermittent waves" to allow the player more time to figure out the mechanics when starting the game and to better expose them to the combat system.
Moved Objectives panel to the bottom left corner to avoid being covered when the inventory is open.
Added text on the screen to display the time until the next wave is spawned.
Changed the layout of the Craft machines and Deconstruction machines to clearly show the input and the output in separate blocks.

Added:
Game Over text screen for when the player dies or Home Base is destroyed.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: