site banner

Tinker Tuesday for September 3, 2024

This thread is for anyone working on personal projects to share their progress, and hold themselves somewhat accountable to a group of peers.

Post your project, your progress from last week, and what you hope to accomplish this week.

If you want to be pinged with a reminder asking about your project, let me know, and I'll harass you each week until you cancel the service.


Well, it seems this thread is still not doing too badly relative to the other regular threads, so let's stay on a weekly pace.

3
Jump in the discussion.

No email address required.

HighSpace

This week was also pretty slow, but I'm pretty satisfied with the progress.

  • Icon for bomber wings

Nothing fancy, but it's here! Still, an important feature when deciding which ship you want to send in for the job.

  • Finishing the map AI

Last I was only able to set up a basic AI system that took the player ship "aggro" into account. However, all that meant was relative prioritisation when there was more than one player ship on the map. In the event there being only one ship (or several being grouped into a fleet), it would mean instantly drawing the attention of every single enemy on the map. The goal for this week was to make it a bit more subtle. Not wanting to implement a whole-ass sensor system, that make the player invisible to the ships further away, I opted to add a distance component to the aggro calculation, and a threshold for reacting. I also wanted to make aggro "infectious", so:

  • Ships detaching from a fleet would inherit the fleet's aggro
  • Ships joining a fleet would infect it with their aggro, if it's higher.

Killing an enemy ship now also causes an increase of aggro for all ships participating in the mission, so as you progress through the map, you will draw the attention of more and more ships. This doesn't mean much right now, as enemy ships don't join each other to form fleets yet (unless by accident), so this does not increase the difficulty of each mission. But I like how it already causes a few things to emarge from it. You can, for example bump up aggro for your fighter wing, and use it's superior speed to draw the enemy away from rescuable ships.

I made a little video to show off the mechanics, but it's been a pain in the ass to get to to a manageable size and still have it be readable. I'll give it another go tomorrow.

Goals for next week were:

  • Fix bugs introduced in this week

- Something weird happens when a friendly ship gets shot down causing a crash. - Shooting down a ship does not remove it from the list of active AIs (which is why the debug aggro information is still shown after the mission, in the video above).

Are two known ones. Hopefully there aren't any more, but I wouldn't bet on it.

  • See if there's any low-hanging fruit to make the AI more interesting.

Like I said joining into groups would be cool, as that would increase the difficulty of the mission upon encounter. I was also wondering if I should it "lore friendly". Right now, once an AI locks in it will automatically course-correct as it chases you. I was thinking of forcing it to way until it exits subspace, adding a subspace cooldown, etc. OTOH it might be too early for this right now as it would make the enemies too easy to dodge, it might work with a sensor system, and having ships be invisible while in subspace.

  • Reinforcement mechanics

I was considering having the System Map be active even in-mission, and letting the player call in reinforcements from there. The problem with that is it would imply time still flowing in the system map, which in turn would imply the possibility of parallel battles. I think I'll opt for High Fleet mechanics again, where the world-time will freeze for the duration of the battle, but ships that happen to be close enough to it can be called as reinforcements (perhaps with some distance-dependant time-cooldown).

  • More annotations / code refactoring

If I need something menial to not tire the old noggin too much, I might opt for this one instead. There's a whole bunch of stuff one can break by accessing each object's fields directly, so I want to hide them via annotations, expose some methods to change, that will guarantee everything working correctly.

I made a little video to show off the mechanics, but it's been a pain in the ass to get to to a manageable size and still have it be readable. I'll give it another go tomorrow.

With some scaling / zooming / cropping / cutting away, I managed to get it down to something manageable, though even here I had to split it up.

  • Player fleet approaching the enemy. There's a constant aggro factor of 50, while the final level increases as the ship approaches. When the fleet splits, the split-off Alpha wing inherits the aggro, and is detected as the ship AI should target, as it's the closest.
  • After the battle. Upon successfully destroying the enemy cruiser, Alpha wing's constant aggro factor gets increased to 60.