Home // Blog // Ugly Briefs Update #3

Let me have CONTROL!

Right, so this issue with “Controllers” in Unreal has been an on going annoyance since the beginning of the project. Anyone who has done work with Pawn Possession or Multiplayer has had to deal with Controllers (Player Controllers / AI Controllers). Imagine having to deal with assuming control of your ship, but the AI still wants to fly and shoot regardless of you being there. Or not having your HUD display for you since the Server executed the ship initialization logic without confirming you are the Client that’s actually in control of the ship. All of this we will get into in this Ugly Brief Update.

“Controller” Definition;

Basically a “Controller” class is the main bridge that a Player (or even AI) interfaces with the game. Think of it like the Player’s “soul” where the Player can apply inputs into the game, even if they aren’t in “possession” of a “Pawn”. Things like calling up Menus, or requesting to respawn in Multiplayer, or in our game – triggering Telepresence between Ship and the PDI. Basically it allows for high level control inputs to occur that aren’t Pawn dependent. The problem(s) arise when the Player either takes control of a AI Controlled Pawn or even when a Player takes control of a Pawn in Multiplayer and needs to validate with the server before something like the HUD can initialize.

Multiplayer Control woes

With Multiplayer, several times we’ve run into the issue with a respawn of a player (just doing some quick Death Match with ships) where we had several cases that Players didn’t have their Ship initialize (start up and given flight control/weapons) and/or not have their HUD initialize either. The problem here with the Pawn is that the “Event Possess” seems to trigger on the Server side first before the Client seems to know that they are in possession of the Pawn itself, so if the Server runs the logic of the Event Possess first and tries to pass the info to the Client’s Controller, there’s no handshake between Client and Server to verify this possession was successful first and both sides know that “THIS” Client is the one in possession. This is extremely frustrating since you would assume that on “Event Possess” in Multiplayer that the Client would automatically announce to the server that “Yes I am in possession”, but nah… ugh. It looks like I will need to put in some checks on the client side first to make sure THEY are the ones to trigger this properly so that HUDs and Throttle/Weapons, etc can all be initialized properly.

GTFO My Cockpit AI!

Another really dumb thing about Controllers seems to be that even though “Player Controllers” and “AI Controllers” use the same “Controller” base class in code, they are still treated differently on the Pawn which means that both an AI Controller and a Player Controller can Possess the same Pawn at the same time! You’d think this would be funny (and yeah it kinda is at first), but it’s pretty annoying that I need to specifically tell the AI Controller to stop all of it’s behaviours and then remove it “properly” from the Pawn BEFORE allowing a new Controller to take hold of the Pawn…. You’d think that it would be simple with Controllers, right? I mean my assumption was that you could only have one Controller at a time, but nope, not the case apparently… Still, I recall back in 4.22 that I was still having a problem when calling “Detach from Controller pending Destroy” on the Pawn where AI Controllers weren’t being detached, but I haven’t checked it again in awhile (might be a memory leak there with multiple AI Controllers just being added on to the Pawn every time you telepresence out!). Either case, I seem to finally have a handle on this at least from the Single Player side of things. It’s gonna be a bitch to validate this on the server side though, but I’ll get there.

AI Autopossess on Spawn PLZ, K THX

So with Spaceship Hangars being able to produce new ships with a very basic economy (and sped up build times), you’d think that the default “AI Autopossess” flags would work right away with both “Placed In World” and “Spawned” right off the bat, right? Well, before 4.19, apparently there wasn’t a flag for both “Placed In World AND Spawned”, there was only one or the other. AND “Place In World” still allowed for “Spawned” in Pawns to act as if they were “Placed In World”…. I mean wtf?? So it took until recently to figure out that that new flag was there and wasn’t the default setting and with 4.25 integration, this became apparent when all of our “Spawned” new ships from the Hangar would just spawn but not fly out of the hangar… UGH this is so annoying when these small feature changes and default changes to things like Possession screw with a lot of core mechanics of the game!

Summary

In Summary – Controllers are a great way to control high level logic/inputs for Players and how they interact with the game/engine, but I really wish alot of these Controller issues were a bit more streamlined in the engine for ease of Possession. Either way, I’ll get through these and we will have the capabilities of Possessing AI ships in Multiplayer, but I will also lock out being able to have multiple Players Possess the same ship haha.

This doesn’t begin to scratch the surface of the dumb “Game In Focus” crazy with the UI and the amount of hoops I need to go through before I can talk about the PDI and displaying and using the cursor (or even click and drag box selection). But that can wait for another Brief. In the mean time I’m going to move these Briefs Mondays and Thursdays to allow more time to focus on the work ahead.

I hope you all enjoyed.

God speed, Warden

-Kami

0 Comments ON " Ugly Briefs Update #3 "

Subscribe to the Solar Warden Newsletter

Solar Warden on Social Media

Facebook

Twitter


YouTube


Reddit

Join Live Chat on Discord

Solar Warden on IndieDB

Solar Warden
  • Utility spacecraft
    June 14, 2018
    A tugboat like craft (maybe variant(s)s of the H.U.R.K. transport?) built for dedicated reclaiming of resources, destroyed Warden craft and Silicoid husks, pilots and API boxes that successfully eject from destroyed Warden craft, and moving satellites ...
  • Artificial Pilot Intelligences
    June 14, 2018
    APP or API - artificial pilot personality or artificial pilot intelligenceFielded after research into artificial intelligence nets the necessary breakthroughs, artificial pilot computer systems could be installed into Warden craft to function as human...
  • Shell company space-missions
    June 14, 2018
    The idea: using shell companies for deploying civilian cargo into space to make money on the side. Such missions could also use transport craft to get other, more important resources into space.  Thus with limited transporters the commander would have ...
  • Asteroid-based resources
    June 14, 2018
    The idea is that resources could be reclaimed from asteroids that Silicoid arrive in, are sent to distract fire in a Silicoid rush/damage Earth's surface, or end up on a course to just pass by.H.U.R.K. transports could be deployed to carry a mining la...
  • Re: Capital ships humans-aliens
    February 17, 2018
    OMG you just make me happy to hear that ty agent for the replay beautiful i can't wait to play your game 
  • Re: Weapons rarity alien containers and Bosses
    February 17, 2018
    ty for the replay is sounds good can't wait to see what the game hase to offer once it is realised
  • Re: Capital ships humans-aliens
    February 16, 2018
    Thanks for the support!To answer your first question. We do have ships that are larger than the fighters which are the "Corvettes". They are much slower in handling, but pack quite a punch with their multiple turret mounts as well as larger weapons yo...
  • Re: Weapons rarity alien containers and Bosses
    February 16, 2018
    No worries, your English is fine .We don't believe in an RNG loot drop system as we feel that it pulls Players out from the immersion factor and reinforces a more "gambling style" reward, rather than a hard work pay off. However there is still RNG, ...
  • Weapons rarity alien containers and Bosses
    February 13, 2018
    Hello all me again any plans for Weapons rarity and alien contaners for the game for as example alien contaners where you need to hack the container to get a RNG alien Weapon rarity ore armor parts from tier 1-5 Killing a alien boss to get the weapo...
  • Capital ships humans-aliens
    February 13, 2018
    Hello all first i will like to apologize for my bad english i help my self with google second amazing game 110% i will buy it now for the mane topic will the game have capital ships like cruisers battlecruisers battleships carriers dreadnoughts and log...

Polar Zenith Copyright © 2022 Polar Zenith, LLC. All Rights Reserved.