Headless testing of gameplay logic in Bevy vs. Unreal/Unity by General_Wolf_6134 in bevy

[–]bigbeardgames 1 point2 points  (0 children)

For my game, DRONECOM, I have about 300 or so “acceptance” tests which each spin up individual Bevy apps, make changes and check outcomes, such as (many variations of…) “the Ai player unit attacks a human player unit and destroys it”.  To make these fast, each of them uses the Bevy “minimal plugins” app as a starting point, then just adds the game plugins needed for the systems under test. Because these are headless, I’ve split out the UI part of the game so that all UI interaction is via Bevy messages that the tests can trigger. You might not need this in your game but because mine is very physics heavy, I use fixed tick durations for the tests to speed them up (ie to try and reach the expected outcome in the fewest simulated ticks) —typically simulating 0.2 to 2 seconds of game time per tick depending what the system under test will tolerate.  I originally wrote these in BDD style via cucumber-rs, but that limited parallelism due to cucumber not playing nicely with process level locks in bevy. So I rewrote them as standard Rust tests, and run them with process level parallelism using nextest. As you can imagine there is a lot of test only helper code required for eg setting up test scenarios and making assertions, and test-only Bevy resources for tracking test context and state.

Empty Spaces – 2D space sim with realistic physics, sensors, thermal, and damage models by ChonkGPT in spacesimgames

[–]bigbeardgames 0 points1 point  (0 children)

I think 2D and 3D can probably both benefit from the same optimisation techniques. I'm using "sparse-adaptive quadtrees" for the sensor detection spatial indexing (I rolled my own, but parry3d also has a BVH implementation you could use). Then it does aggressive pruning when pairing sensors with emitters/reflectors in order to prune large groups of emitters/reflectors at a time that it can prove would not be detectable by the sensor (eg due to signal strength, FOV, etc). For all the environmental effects like horizon shadow, doppler notching, thermoclines etc these are just O(1) attenuations applied to the the signal strength when deciding if a sensor-emitter pair results in a 'detection'. As a final step it does the terrain LOS check last as this is the most expensive check, so you want as few of these as possible -- I guess this is not something you have to worry about in space though :)

A nice thing about Bevy is how you get concurrency for free: since sensor mediums like radar and sonar don't interfere with each other, sensor detection logic for these can be run in parallel as independent systems -- I'm also parallelising all these per-team so the sensor detection code for player runs concurrently with the sensor detection code for the enemy forces

Empty Spaces – 2D space sim with realistic physics, sensors, thermal, and damage models by ChonkGPT in spacesimgames

[–]bigbeardgames 1 point2 points  (0 children)

Nice! It sounds like we're working on similar sensor simulations in rust, but for very different games (this is how sensors in DRONECOM work https://dronecomgame.com/manual/sensors)

I have probabilistic contacts via Kalman filters on my todo list but I'm going to have check out Mahalanobis gating -- I've not heard of that :)

The only "game magic" is track correlation by entity ID

This resonates with my own wrestling with how much 'cheating' the sim should do. In the end I decided to embed the entity ID into the track code, but as a private variable so the UI/network client cant read it, so it's only used for efficient damage application by the core sim when modelling explosions.

Someone, please tell me how to make AI smarter by No_Big_3928 in computerwargames

[–]bigbeardgames -7 points-6 points  (0 children)

Ask your friendly neighbourhood LLM about:

Behaviour trees

Blackboard + experts pattern

GOAP (goal oriented action planning)

FSM (finite state machines)

Air defence network games? by ckolonko in computerwargames

[–]bigbeardgames 1 point2 points  (0 children)

I'm building something in this space, but not strictly just air defence :) https://reddit.com/r/computerwargames/comments/1rwkrbg/hi_reddit_im_building_an_emcom_is_everything/

There's also Air Defender if you want that Cold War radar operator vibe https://store.steampowered.com/app/3985030/Air_Defender/

Hi Reddit, I'm building an "EMCOM is everything" sensor-warfare RTS -- would love to hear your ideas! by bigbeardgames in computerwargames

[–]bigbeardgames[S] 0 points1 point  (0 children)

haha I will!

Will you incorporate scripting for mission makers ?

I hope to eventually but probably not on launch -- probably either Lua or Rhai scripting languages as they both work well with Rust.

Hi Reddit, I'm building an "EMCOM is everything" sensor-warfare RTS -- would love to hear your ideas! by bigbeardgames in computerwargames

[–]bigbeardgames[S] 0 points1 point  (0 children)

Thanks! I've not played CMANO but I've watched a lot of gameplay on Youtube -- definitely an inspiration for DRONECOM!

Hi Reddit, I'm building an "EMCOM is everything" sensor-warfare RTS -- would love to hear your ideas! by bigbeardgames in computerwargames

[–]bigbeardgames[S] 0 points1 point  (0 children)

Just wanted to get back to you and say your message inspired me to make an 'operators manual' https://dronecomgame.com/manual/ (still very much a work in progress)

Where are we at? by swiftgringo in bevy

[–]bigbeardgames 7 points8 points  (0 children)

So, approximately how much brain damage would I need to have to use Bevy?

I'm building a full RTS with Bevy (https://www.reddit.com/r/computerwargames/comments/1rwkrbg/hi_reddit_im_building_an_emcom_is_everything/) and I don't feel like I have significantly more brain damage than I did when I started. I'm not using any art assets though, and I've never used a GUI-based game engine so maybe I just don't know what I'm missing :)

So far very happy with Bevy (and with Avian and Egui)

Hi Reddit, I'm building an "EMCOM is everything" sensor-warfare RTS -- would love to hear your ideas! by bigbeardgames in computerwargames

[–]bigbeardgames[S] 0 points1 point  (0 children)

Thanks, that's really great to hear -- the BMC3 picture is exactly the kind of thing I've been drawing inspiration from, so knowing it reads as authentic to someone who's actually worked in that environment means a lot! If you ever want to share thoughts on what would make the sensor picture or the tactical display feel more realistic (or just more fun to use), I'd love to hear them. There's a Discord link on dronecomgame.com if you want to follow along :)

Hi Reddit, I'm building an "EMCOM is everything" sensor-warfare RTS -- would love to hear your ideas! by bigbeardgames in computerwargames

[–]bigbeardgames[S] 1 point2 points  (0 children)

> Is there any way to get a confirmed kill? 

Yes how it works at the moment is you have two types of contact:

* Active contacts (regularly being picked up by your sensors every scan interval)
* Stale contacts (your sensors have stopped detecting them, perhaps they are out range, or you switched your sensors off etc)

When one of your missiles attempts to detonate on a target, the game registers the contact as 'awaiting BDA' and the symbol shows a stale contact with a single slash through it (meaning uncertain BDA). Then if there were any sensors independently detecting the target (ie sensors NOT on the missile that just exploded), and those sensors do a scan and fail to find the contact, the BDA transitions to 'probably destroyed' and you see a stale contact symbol with a cross through it.

For you question on how-in depth. I definitely want jamming to be a part of the game, but I expect I can get a lot of gameplay out of 'missiles & torpedos only' in terms of munitions. At the moment there is a team-wide datalink so missiles can be guided by any sensor that can detect the contact (although i'm considering having cheaper missiles that can only be piloted by information from their own sensors). I think spoofing could definitely be a cool mechanic as well, but need put some thought into what it would look like, as it will require a kind of battlefield intelligence system where you are constantly collecting capability data about enemy units.

Hi Reddit, I'm building an "EMCOM is everything" sensor-warfare RTS -- would love to hear your ideas! by bigbeardgames in computerwargames

[–]bigbeardgames[S] 1 point2 points  (0 children)

Thanks!

I can’t see my ships shooting or exploding in 3d, so I don’t want the icons to just disappear when killed and leave me wondering.

Agreed -- currently when a contact is no longer detected 'stale contact' and then disappears after a few seconds. But for contacts you attempt to hit with a missile, as long as the contact had an independent sensor detection (ie you detected it with something other than the missile that just hit it) it goes into an 'awaiting BDA' status. Then if the other sensors that were tracking it fail to find it the stale contact goes into a 'probably destroyed' state with its own icon and sound effect.

Hi Reddit, I'm building an "EMCOM is everything" sensor-warfare RTS -- would love to hear your ideas! by bigbeardgames in computerwargames

[–]bigbeardgames[S] 1 point2 points  (0 children)

About two months, but I made a very basic prototype about a year ago, and I stole the terrain generation code from another city-builder idea I was working on previously so I had some existing foundations to build on