Jump to content
  • entries
    657
  • comments
    2,692
  • views
    898,499

Revised station shots


SpiceWare

933 views

In the prior builds the stations would randomly shoot in 1 of 8 directions. I've revised the routines to do the following:

  • station shots can travel in 32 different directions
  • identify the pod closest to player
  • randomly decide to shoot from that pod, as well as the 2 adjacent to it (the chance of firing is tied to the difficulty level and the sector you're in)
  • each pod now has a unique cool down timer before it can shoot again (before it was 1 timer for the station as a whole). Cool down duration is tied to difficulty level and sector you're in.
  • station shots can take out asteroids and mines (and the player earns points!)
  • station shots are now slower than the player's ship


It took a few iterations to get this working, and I thought y'all might find the test builds interesting!

First off was the "closest pod to player" detection test.
draconian_20170613_closest_pod.bin
blogentry-3056-0-35752100-1497750733.png

 

Then was direction to fire from the identified pod. Identified direction is drawn using a line of stationary shots, though they are still deadly. This showed a few issues such as if you attack from the bottom of the station the station preferred to shoot straight down, making it easy to hit an open core, while if you attack from the top the station preferred to shot at an angle, making it easy to take out the pods.
draconian_20170615_direction_test_2.bin
blogentry-3056-0-27078300-1497750929.png

After a few iterations I go the targeting to work much better. In this build the line of stationary shots is no longer deadly as I extended the line.
draconian_20170617_direction_test_3.bin
blogentry-3056-0-96192800-1497750957.png

While the routines are functional there's a few things I need to do before they're finalized:

  • decide if the firing should be from the 2 pods closest to the player rather than 3 pods (the closest pod and it's neighbors). I'm leaning towards 2 pods as I often see one of the neighbors shooting slightly through the station.
  • fine-tune the cool down timer
  • fine-tune the random chance of firing



For Harmony or Stella (requires Stella 5.0.0-pre8 or newer)
draconian_20170617.bin

  • Like 3

8 Comments


Recommended Comments

I agree on the 2 Pods only firing, the 3rd often shoots thru the station. But even in this scenario, a shot from "A", a diagonal shot ( currently inside the circle) can sometimes go thru the station

 

draconian 20170617

 

Thanks for posting the steps, it is neat to see the pod AI visualized.

  • Like 1
Link to comment

Closest pod and neighbors include pods that have been destroyed, so if all 3 are destroyed the station won't fire at all.

 

As such, A shouldn't be shooting at all as the closest is the pod aabove the ship, and it's neighbors are the leftmost pod and the destroyed pod to the right.

 

Shooting from A could happen if you were flying to the left just before that screenshot was taken.

Link to comment

Thanks for posting the steps, it is neat to see the pod AI visualized.

Usually I'd be posting the source as well, but CDF's still a work in progress. We don't want the driver to get out until we've finalized it as it's possible we'll have to change how it works, and thus break backwards compatibility in Stella like we did with BUS.

Link to comment

Closest pod and neighbors include pods that have been destroyed, so if all 3 are destroyed the station won't fire at all.

 

As such, A shouldn't be shooting at all as the closest is the pod aabove the ship, and it's neighbors are the leftmost pod and the destroyed pod to the right.

 

Shooting from A could happen if you were flying to the left just before that screenshot was taken.

I'm pretty sure I was flying left to right then turned down just as I took the screen shot, I'll try again

Link to comment

Yes, I was flying left to right, the pod at "A" fired thru the station just as I crossed the threshold between lower left intact pod and the destroyed lower right one. my ship would have been dead centre between the lower two pod spots

Link to comment

You could still do 3 pods firing, you'd just have to detect if a shot will go through the station and not have the "problem pod" fire at that angle. A lesser angle could be used, however inaccurate it may be. Or not fire at all.

 

Wha does the arcade game do?

Link to comment

Had a busy Sunday - my folks & I headed down to met my sister & brother-in-law for lunch at The Pumphouse in Victoria, Texas in celebration of Father's Day and my sister's upcoming birthday. Victoria's midway between Houston and Corpus Christi(where my sister lives).

 

 

Wha does the arcade game do?

 

Not sure what the arcade does, playtesting while trying to figure that out results in my ship getting destroyed :lol: That's one of the reasons for Rules of the Game, to get community feedback to build a better understanding of how Bosconian works.

Additionally there'd be the tradeoff between extra code for "sometimes fire from the 3rd pod" or "space for better sounding samples". In this instance, I'd most likely choose the samples.

Link to comment
You could still do 3 pods firing, you'd just have to detect if a shot will go through the station and not have the "problem pod" fire at that angle. A lesser angle could be used, however inaccurate it may be. Or not fire at all.

Wha does the arcade game do?

The arcade game doesn't shoot thru the base, destroyed pod or not ;)

 

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...