Now they talk to each other!

It takes a bit to see but essentially what happened there was:

  • A bunch of bots spawned and started guarding their assigned assemblers
  • I shot at one of the bots which alerted the other bots to where I was located
  • As bots were assembled they went to my last known location and looked around
  • When I shot at them again my last known position was updated and other bots started searching where I fired.

This works by a hierarchy of multicast delegates (https://dev.epicgames.com/documentation/en-us/unreal-engine/multicast-delegates-in-unreal-engine) that passes the players known location from bot -> assembler -> game mode then then game mode alerts all of the assemblers and then alerts each bot.

In other news I did a bunch of backend work that isn’t pretty to look at: essentially I swapped out all of the old classes and re parented them to a generic “BlackLaceGameMode”:

This lets me make generic functions and I can pass some of the capability from the survival game mode into this new game mode (which I’m calling control).

Also performance seems to take a hit after around 20-30 bots in the world at once:

This isn’t the end of the world here (I can move a bunch of stuff into c++ and memory optimize it if I need to) but I think I shouldn’t be this bad with just a bunch of skeletal meshes. I bet if I started doing some occlusion culling (https://dev.epicgames.com/documentation/en-us/unreal-engine/visibility-and-occlusion-culling-in-unreal-engine) I would be able to get everything up to a very high fps. But I’ll punt performance optimization till after I get a game working. Next up is messing around with the terminal so it actually does something.

I think the sequence I’m thinking the player accomplishes to “hack” the system.

1.) The player clicks “transfer group id”

2.) There is then a password prompt that the player can guess or they can click “forgot password”

3.) Then a bunch of trivia pops up that the player needs to answer

4.) Then a new password is flashed across the screen

5.) The player enters the new password

6.) The player takes over the connected assemblers by pressing a button on the screen.

After #1 I think I want the turrets I made before to pop up out of the assembler and start shooting at the player, along with a bunch of red light spinners:

Another thing I’ve been diligent about is trying to make sure I don’t do anything dumb to preclude multiplayer in this game. I think getting multiplayer shipped is another animal but getting lan or local games working shouldn’t be too bad.

So like nothing is straight up crashing (which is good, also might not be too possible because I’m straight up wearing water wings by using blueprints), but you can see the bots aren’t persisted, the weapon selection isn’t persisted etc. I can poke around on getting that all working but again I think it will take away from the base “game” part of it. Definitely if I get it on steam then I think the first thing I’d try to attack is multiplayer. I’ve done that before in another game, you essentially gotta mark stuff as “replicated” or “non replicated” and if you mess it up you’re sending or recieving way to much data, oorr you’re giving control to someone who shouldn’t have it (such as giving a client the authority over where a player is located). You can also pull in achievements/scoreboards and server stuff but it required converting the game to full c++ then building in libraries that unreal cannot include normally (such as steamworks libs). So yeah, fun experiment but not doing that now.

I also added an “ai/ml” category for the site (it’s the lil brainy):

And this still seems like scrapers or bots:

I’ll get around to checking at some point.

Leave a Reply