#multiplayer

1 messages Β· Page 613 of 1

winged badger
#

in this case, unless you're changing possession at runtime, character is the simplest of the 3

vestal ferry
#

Sorry for the stupid question but i don't get it so i'll try to simplify, what do i connect to the location on the teleport node in the overlap box?

winged badger
#

you cast the otheractor to your character

vestal ferry
#

But how?

#

That's exactly my problem

#

I have several character classes

winged badger
#

thats why they have a common base

#

with shared API

#

anything else is kinda suicidal

vestal ferry
#

Can you explain this point a bit more? I did make the other characters children of a base character

#

So there is a shared base and if i edit the base character blueprint they are all updated

winged badger
#

im at work, and can't go into lengthy tutorials

vestal ferry
#

Thanks for your help anyway

#

Appreciate you trying πŸ™‚

vestal ferry
#

Found a solution, thanks!

bitter talon
#

Hi, happy new year !! πŸ˜„
Does anyone have a solution to quit a replay without having to reload the game level?
I manage to record it, I manage to stop recording, I manage to play it but I can't find a way to exit and return to the game without relaoding the level.
I'm trying to build a sort of kill cam but for a multiplayer sports game. A system that allows you to review the goal that has just been scored.

south ether
#

Quick question, if I switch to using the ReplicationGraph, from what I'm understanding from videos and reading the source, I don't need to handle RPCs or code calls differently, correct? It seems like ReplicationGraph is isolated to relevancy and handled under the hood

bitter oriole
#

Pretty much yes

south ether
#

Awesome, thank you for confirming πŸ™‚

pallid mesa
#

Hah, indeed, the possession system would need to be simplified to an extent

#

but too much stuff going on in the background

winged badger
#

well, its less quirky then 4.22 πŸ˜„

gloomy tiger
#

Yo! Question about shooting replication.

Pretty much, our game is a co-op game and we don't mind security against cheating. But we do value performance and experience. That said, how is your approach when it comes to replicating weapon shooting?

#

To be a little bit more specific, do you just signal the server a player is firing and handle the rest there? Do you expect the client to send the target of their shootings?

#

We're pursuing the most performant way to achieve that, and we simply don't care about cheating.

bitter oriole
#

Fire the weapon locally, play effects, anticipate damage etc ; tell the server, and wait for it to confirm damage / ammo etc by replication

#

It's perfectly fine to send the aim vector to the server

#

Sending the result works too if you don't care about cheating but it's not really 'better'

gloomy tiger
#

Well, yes. Exchanging the result works for us. But what worries me it's like a shotgun. It casts several linetraces, and the bullets apply damage to several targets at once. Do you think sending all these targets over the network wouldn't stress it?

bitter oriole
#

Yes it would

meager spade
#

i optimized that by only sending the first shot, along with a seed

bitter oriole
#

The aim vector is usually the preferred way

meager spade
#

and having clients simulate

bitter oriole
#

^ along with a seed for randomized weapons

gloomy tiger
#

Also, for automatic rifles. How do you approach that? Do you have events like StartFiring and StopFiring or do you submit a signal to your server every time the weapon shooting ticks?

bitter oriole
#

Yes, start/stop

#

Way too many reliable RPCs if not

gloomy tiger
bitter oriole
#

And again, aim vector updated through unreliable RPC on tick

gloomy tiger
#

I'd have to predict stuff, right?

bitter oriole
#

You will have to no matter what

gloomy tiger
#

Well... yes. But if I the client submits the targets to apply damage to, alongside with the damage, then I have greater accuracy 'for free', don't I?

bitter oriole
#

Well it's not free for starters because you have to upload the damage data

gloomy tiger
#

Also, isn't submitting an actor to the server vs. a vector, more lightweight?

bitter oriole
#

And it's not more accurate because desyncs happen and other players will see impossible stuff

gloomy tiger
#

The Actor submits a NetId IIRC, which is a byte

meager spade
#

i actually follow how fortnite do weapon shooting

#

they produce the target data client send, send to server, and server multicasts the FX. Tho there is optimizations to do

#

they trust the client to some extent, server just does basic trace to make sure nothing blocked the shot that the client has not seen yet

gloomy tiger
#

Gotcha

#

Yes, in our case we can fully trust the client. But that comes with a cost: packet weight.

meager spade
#

for a non competitive a game, you can get away with this. if its competitive, then you need some anti-cheat measures

#

but Epic would not disclose that to me 😦

gloomy tiger
#

πŸ˜‚

#

Shall we ask them? lol

meager spade
#

i did, but they won't share anti-cheat protection stuff lol

gloomy tiger
#

yea i was kidding

#

but anyways - yes, i guess i got the material i wanted...

#

thank you guys πŸ™‚

#

the only thing i'm still unsure is

#

how do I predict stuff server-side?

meager spade
#

they did tell me some of the basic checks, like yaw angle etc

#

@gloomy tiger i would look at GAS

gloomy tiger
#

geez and I looked at it already

#

BUT I couldn't kick start it

meager spade
#

the pinned messages has a GAS Shooter project, which is a nice thing to look at. Does things differently to how i would do it, but it works

cold vigil
#

So I am currently having a problem with getting the Steam overlay to show up on UE4(4.25.3). I turned on the Steam Plugin in editor along with adding the settings to DefaultEngine.ini file. Afterwards I packaged the project and made sure to have Steam was open when running the game, however I got nothing.
Then I tried to set it up with UE4(4.24.2) an older version I had following the same steps I did for the UE4(4.25.3) project and it worked...
I'm confused as to what changed between versions so I can get Steam overlay working with UE4(4.25.3) as I'm trying to make a networked game using Steam.

#

If anyone has any suggestions I'd be happy to hear

silent valley
#

Steam_appid.txt or set the appid in the ini file as per the docs?

cold vigil
#

isn't that just the 480 id?

livid seal
#

I am replicating montages and that is working. I am now trying to replicate projectiles that spawn based on the montage's notify. As of now, notifys are only handled on the server and when a specific notify triggers the spawning of the projectile, that should be happening server side. The projectile spawning includes creating a timer and then that timer calls the run on server and multicast events to actually spawn the projectile. Similar setup to what I have for the montages, but it is not working. Projectile is set to replicate.

signal lance
#

@meager spade I believe when Fortnite first came out shooting was fully client authoritative, it was full of cheaters shooting through terrain πŸ˜…

#

they changed it very soon after that

bitter oriole
#

Vehicles too

signal lance
#

yeah, not sure if they changed it now
Haven't played it a very long time

meager spade
#

they still use client side shooting

#

but have a lot more anti-cheat and stuff on the server

signal lance
#

ah that's very interesting
If I understood it correctly any client side shot is sent to the server, verified and info sent back
That's sounds like whole lot of traffic and RPCs

bitter oriole
#

I don't know, a common weapon implementation would be client-side fire -> send hit info to server -> server checks the shot and fires a client RPC to confirm damage (hit marker etc)

signal lance
#

yeah don't really see any other way with client side weapons

#

with server authoritative client would only need to let the server know that it started firing

bitter oriole
#

Yeah but which game actually does that ?

#

A client RPC seems inevitable to visually confirm hits

signal lance
#

yeah

meager spade
#

i send a ClientRPC back if the hit was successful on the server, client sees muzzle flash, etc, so he is firing real time. Only when client RPC comes back, does he get the hitmarker.

bitter oriole
#

Yeah I think that's a very traditional design

#

Valorant does that for example, AFAIK

#

You see the hitmark much later with the latency

summer tide
#

So I've all connected players in my game mode, how can I show that info on all players widgets.

fading birch
#

you can loop through the players in the game state, which has an array of all the connected player states @summer tide

quick flint
#

How do you guys combat wall hacks?

#

I read that Valorant does ray traces to turn replication on and off, but like, you're going to need multiple ray traces lol

#

At least 4 minimum I imagine

#

Someone else the other day was mentioning using "IsReplicationPaused"

#

But in terms of th e action code, and detecting it using ray traces, I'm not sure what you guys suggest

#

IsReplicationPausedForConnection If this returns false, does this mark the actor as "Not relevant"

quick flint
#
bool bNewPaused = true;

        for (const FNetViewer& NetViewer : NetViewers)
        {
            if (!Actor->IsReplicationPausedForConnection(NetViewer))
            {
                bNewPaused = false;
                break;
            }
        }

        const bool bOldPaused = IsReplicationPaused();

        // We were paused and still are, don't do anything.
        if (bOldPaused && bNewPaused)
        {
            return 0;
        }```
#

looks like thats all it does

minor grove
#

Did someone try to connect project with steam in any way?
steam sub or uworks or something else?

meager spade
#

i reckon a lot of people have, considering a lot of UE4 games end up on steam

quick flint
#

I've d one it before

#

Just read steam documentation

#

and import the dll files

#

from the sdk

minor grove
#

thanks

steel vault
#

You don’t need to import dll files on a listen server. I believe that is only necessary for dedicated.

summer tide
#

@fading birch The game state has PlayerArray which returns all player states. Thanks i got it

summer tide
#

Another question: So I have a list of all the connected player names on screen with speak icons next to them. So when a player press and release the key T, I want to toggle the icon as well.

#

How can I do that?

plush wave
#

Is actor attachment replicated?

peak sentinel
#

If I am not wrong if you multicast the attaching function you dont need to take care of the rest

dark edge
signal lance
#

Pretty sure it is

dark edge
#

Id rate myself about an 8/10 in BP and 2/10 in C++. Should I screw around with doing Steam on my own or just buy Steamcore?

#

Listen server only

winged badger
#

see if UWorks is still available

#

no difference from SteamCore, but it doesn't cost as much

vocal cargo
#

Hiya, is there any method included in CharacterMovementComponent that properly replicates rotation that's not AddControllerYawInput?

#

Or, make so that AddControllerYawInput doesn't rotate the camera as well?

summer tide
#

Is there an updated version of SteamVoicePlugin?

#

Or something similar?

stoic acorn
#

Sorry if this is something that's asked on a daily basis but how do you show the correct names in the title bar of PIE windows for Server and clients?

meager spade
#

@stoic acorn what you mean?

#

if its the title bar on windows and your on 4.26, it is a known bug

fossil veldt
#

Got a bit of an irritating issue with packet order, not sure how to solve it. I have this code which spawns an actor and then RPCs to the client to tell it to pickup that actor. The issue is the spawned actor hasn't actually repped down to the clients yet when the pickup RPC arrives so I can't pickup. Any ideas?

meager spade
#

welcome to replication race

fossil veldt
#

hah

#

yep

#

Gratz on the promo to mod btw!

#

I could run some kinda callback when the item reps for the first time maybe?

meager spade
#

i would probably set it as a property, and wait for the OnRep (RepNotify) to run

fossil veldt
#

hmmm yea

#

is there a way to do that without making it rep lifetime?

#

just because there's lots of items and that overhead might stack up

meager spade
#

no

fossil veldt
#

bugger

meager spade
#

you could client rpc, and if its null, poll for it, till its valid?

#

its what i do for weapons

fossil veldt
#

yeah that might work better actually

#

yea i'l do that, good shout

#

ty

meager spade
#

i just set a timer, that runs, till its valid

fossil veldt
#

just set timer next tick?

meager spade
#
{
    if (NewInstigator != nullptr)
    {
        SetInstigator(NewInstigator);
    }

    AKaosPawn* KaosPawnInstigator = Cast<AKaosPawn>(GetInstigator());
    
    if (KaosPawnInstigator == nullptr || !KaosPawnInstigator->IsWeaponInInventory(this) || !KaosPawnInstigator->GetAbilitySystemComponent())
    {
        bPendingClientGivenTo = true;
        GetWorld()->GetTimerManager().SetTimer(CheckPendingClientGivenToHandle, this, &AKaosWeapon::CheckPendingClientGivenTo, 0.1f, false);
    }
    else
    {
        GetWorld()->GetTimerManager().ClearTimer(CheckPendingClientGivenToHandle);
        bPendingClientGivenTo = false;
        ClientGivenTo_Internal();
    }
}```
fossil veldt
#

tyvm πŸ™‚

meager spade
#
{
    if (bPendingClientGivenTo && GetInstigator() != nullptr)
    {
        KAOS_ALOG(this, LogKaosWeapon, Verbose, "Weapon pending client check")

        bPendingClientGivenTo = false;
        ClientGivenTo_Implementation(nullptr, bPendingAutoActivate);
    }
}```
#

like this

fossil veldt
#

much appreciated

eternal canyon
#

found this in the source code

#

and yes

#

it probably is what ur thinking of

stoic acorn
uneven cliff
#

Multiplayer is kind of hard, as I'm sure you're aware, but I've been getting a pretty good handle on it. What I still kind of suck at is the "oh yeah" moments I get regarding game design things. Couple that with having to go back and make sure things still work with multiplayer has given me an idea. Create a single player vertical slice version of the game (which is designed to be played single player as well as multiplayer anyway), then once I've got my core gameplay figured out, use the multiplayer knowledge I've accumulated thus far to turn that game into a multiplayer game. What I'm wondering is if this is even sort of a good idea, or if I'm setting myself up for failure here.

vivid seal
#

i have been working on a combat system for my game for like 8 months and i have the sneaking suspicion that i could recreate literally everything in a weekend if it was single player. nearly every issue or challenge i've run into in the last few months has been networking or prediction-related.

#

if you made that single player slice, you would essentially have to start over completely for multiplayer to be added

#

but that doesn't mean its a bad idea, as you'd be able to test your core gameplay out before dedicating months to networking it

#

also, multiplayer is only as hard as you make it. if you want client prediction and to prevent cheating its a whole can of worms. a slower paced game or one where you're not concerned about making everything server authoritative is a lot easier

uneven cliff
#

I know I'd basically be starting over, but I'm really tired of getting a system "complete" only to realize later I need to change half of it to account for something else, and then I have to change a lot of it after that to make sure it still works for multiplayer.

My game is non-competitive co-op and because of the single player aspect of it, user data will be stored on the user's computer then pushed to the server. It'd be pretty easy for people to cheat, but also no real advantage gained from it either.

vivid seal
#

what type of game is it? shooter, turnbased, rpg, etc.?

uneven cliff
#

wave based survival with elements of tower defense; third person action rpg

steady musk
#

Guys, afaik variables with RepNotify should call function on bots server and remotes, am I right? Cause rn I can see that its only executes on remotes

uneven cliff
#

@steady musk RepNotify, in my experience, triggers first on where ever the variables being changed (if you change it on the client, RepNofity gets called on the client then called on the server), but yeah, it should be getting called on both

steady musk
#

kk, need to review my actors then, thanks

vivid seal
#

i think in that case @uneven cliff there's not as much of a burden in keeping multiplayer working. most of the real challenge (at least so far for me) has been dealing with the server disagreeing with the client who already assumed he could do something

#

@steady musk are you in c++ or blueprints

steady musk
#

c++

vivid seal
#

in c++ the server does not automatically call OnReps, only clients do. you can manually call the OnRep function after changing the value on the server if you need to

uneven cliff
#

@vivid seal Alright, that makes sense. Thank you

vivid seal
#

in blueprints the OnRep is called any time the value changes on server or client

steady musk
#

Damn, another setters πŸ˜„ Hoped that it would work on both

vivid seal
#

yeah, usually you can just make a setter for whatever value it is, and just call the OnRep right after, that way its always called when you set it

#

not sure why they did it that way when blueprints works differently

steady musk
#

Or I will use BP. Should work too. Thanks for that, almost broke my brains on that πŸ˜„

summer tide
#

So my steam setup that worked in UE4.25 doesn't work in UE4.26? Any idea what changed?

summer tide
#

I tried both packaged and right click then launch game.

bitter oriole
#

So what is your Steam setup like ?

#

What doesn't work ?

#

Does the Steam overlay does ?

dark edge
#

Do you get the overlay?

summer tide
#

That overlay doesn't appear. Strange

little shuttle
#

anyone already used the EOS for multiplayer?

bitter oriole
#

Are you logged into Steam ?

summer tide
#

nvm i got it working.

#

THanks anyway

dark edge
summer tide
#

I had to logout then log back in on both my pcs. Then start the projects on both PC.

#

Beside that do you how to get the Voice chat working?

#

I tried the console command ToggleSpeaking 1

little shuttle
summer tide
#

I have both lan and steam setup. I use Advanced Session Plugin.

little shuttle
#

ah ok, i dont want to make something homebrew

#

need matchmaking and p2p

#

EOS sounds not bad, going to test it soon

summer tide
#

I only need the voice chat. I got everything working including text chat. I don't need matchmaking.

#

And I only need push to talk that's it

little shuttle
#

hmm ok, well i would have tested all before

#

but i cant imagine the steam apis wont work

summer tide
#

no -one knows the basic setup that works. I got something going based on a tutorial.

bitter oriole
#

@little shuttle UE4 does not support P2P

#

Only listen servers (one player hosting)

little shuttle
bitter oriole
#

Depends on your game

little shuttle
#

i want matchmaking, chat, p2p

meager spade
#

why p2p?

#

what type of game is it?

little shuttle
#

just pvp 15 player per game, im not very familiar with multiplayer, first time i do it, usually i ask, catch some advise and then read the papers or docs, thats why i ask

bitter oriole
#

PVP and P2P are mutually exclusive

#

P2P means anyone can cheat with no overlook

#

And 15 players is too much for a P2P game anyway

little shuttle
#

true that

bitter oriole
#

What kind of game are you doing ?

meager spade
#

15 player listen server, unless its very simple, would be expensive on the host (bandwidth and CPU wise)

little shuttle
#

3d game, with maps, couple of players on it (8-15), some NPC Bots too (GOAP driven), some nice concept (not 100% ready yet), first i need to do the recherche, tech concept, then prototype, thats why i ask, just if you point me to some direction i will check it out

bitter oriole
#

15 competitive players = need dedicated servers, with all of the hosting costs and anticheat and all that nice stuff

#

Especially with bots since that's gonna drive up the server cost

eternal citrus
#

Hey guys I am having a problem here
I am trying to display death widget to the player that died but it is displaying on server's screen for some reason, any help?

bitter oriole
#

Damage happens on server I guess

eternal citrus
#

hmm

#

but weirdly it destroys the correct player

meager spade
#

ofc it would

#

but you cant put the widget on the server, so you need a client RPC, and a small delay before calling DestroyActor so the RPC goes through.

eternal citrus
#

yea

#

I just figured that out and you message me lol

#

haha

#

thanks both of you still

#

πŸ‘

little shuttle
meager spade
#

i would design the game first, think about this stuff last

little shuttle
#

i know its scenario dependend

little shuttle
dark edge
#

Make it work with 1 weapon, 2 players, 1 bot, a simple map, a game flow, and a server on your lan. That'll give you the experience to see how big of a project it'll be.

#

You don't need to cook a dedicated server, you can just launch project as server.

little shuttle
#

the network part is the unknown variable for me

bitter oriole
#

@little shuttle Consider that this is the kind of game that will be expensive to get the players for, expensive to run and requiring constant work on anticheat, hosting, etc after the players are long gone

dark edge
#

What is the state of the game right now?

bitter oriole
#

On top of being technically difficult since multiplayer is like 5x harder

#

Competitive multiplayer in particular

little shuttle
#

im quite a good coder no problem, i just need to see the facts myself, cheating is very good point

#

never thought about it

bitter oriole
#

You don't need to be a good coder, just a rich one

little shuttle
#

i recognized the services are pretty expensive

#

just had a look at the common ones AWS and so on

bitter oriole
#

Anyway, sounds like you need to look into UE4 dedicated servers, look up the costs for Linux VPS that can run UE4, find an anticheat service with decent costs

little shuttle
#

what about EOS?

dark edge
#

If you got the thing working with the dedicated server that you can run on some $5 a month cloud server, you can easily figure out how to scale it up. but I wouldn't worry about scale until you get the damn thing built. Nobody's going to cheat at a game that doesn't exist.

little shuttle
#

cant i include epic online services?

dark edge
#

Yes or steam. It's fairly easy.

bitter oriole
#

EOS is just a matchmaking service

#

Steam does it too

#

GOG does it too IIRC

#

Most platforms you can sell on do really

dark edge
#

Just develop and figure out how to make a nice containerized dedicated server as you go. When the time comes to scale, you'll be a lot more set up to do it. be careful, don't get an off by one error and have a million dollar AWS bill

little shuttle
#

but EOS has p2p, maybe i can find a workaround that i will use it, or alter the concept, i have to think about it, maybe alter the concept a bit

bitter oriole
#

EOS is not a multiplayer stack or a hosting service

#

It's just a bunch of tools for friends, matchmaking, login

little shuttle
#

ok i understand

bitter oriole
#

UE4 does not do P2P, end of story

little shuttle
#

alright

dark edge
#

You're confusing listen servers with P2P I think. You can easily have a listen server architecture just using EOS or Steam but any sort of scalable backend will require money.

bitter oriole
#

It does listen servers, and that won't work with 15 players + bots

little shuttle
#

yes i know that

bitter oriole
#

So if you really want UE4, it's source build + dedicated server

little shuttle
#

thanks a lot for the information!

bitter oriole
#

The matchmaking service is irrelevant, you'll probably use a different one for each store

little shuttle
#

i see

#

thanks again

little shuttle
#

this talk saved me lots of efforts for sure

torpid elk
#

I have an issue with firing weapons in multiplayer. I have the client call an event to replicate to server, then the server calls a second event to multicast to all clients. However, I don't know how to tell the client that owns the gun to ignore the multicast so it can have real-time weapon firing animations and not wait for the multicast.

bitter oriole
#

Check if the role is autonomous proxy in the mutlicast and ignore in that case

steel vault
#

Or, since firing a weapon could be considered a state change, make it a replicated variable and ignore owner.

torpid elk
#

That also makes me wonder what best practice is here. I currently have ammunition in mag, chambered ammo, and fire mode simulated on all clients so if someone has one bullet left and starts firing full auto, but the moment they start firing they experience latency, the other clients will see them shoot one bullet and then hear the click of the hammer, automatically stopping the firing.

steel vault
#

If ammo count is replicated as well, then replicating the state change to is firing should also run through the process of firing, losing ammo and then reloading.

torpid elk
#

I haven't actually been replicating variables. They've been calculated on each client individually. I'll try that.

#

I'm pretty new to this xP

steel vault
#

It's a long road to learning everything. Doing it the right way the first time around is almost never going to happen. Do and learn as you do.

torpid elk
#

How do you replicate applying an impulse on an object? Is there a way to replicate object motion in a similar way to PlayerController replication?

#

I understand the obviously simple way of doing it with events but I feel like that isn't the proper method.

#

Stranger, I tried your solution. All of the clients see the gun as simulated proxy and not autonomous proxy, although I have my character script setting the owner of the gun to Self.

Upon further thinking, the FirstPersonCharacter isn't a PlayerController. I'm fixing that now. I wasn't going to sent this but I see you're typing now.

bitter oriole
#

It's simple - you use events, aka RPCs, to replicate, well, events - things that happen and that's it

#

You use replicated variables for the persistent state of things

#

Ammo needs to be a replicated variable, weapon effects an event

torpid elk
#

Even if ammo is rapidly changed?

bitter oriole
#

Yes

torpid elk
#

Alright. Could you give me a hint as to how the client has a PlayerController associated with it but the actual character I'm controlling is a FirstPersonCharacter? I believe my problem is a lack of understanding how those two are related and how to make the FPC owned by the PC.

bitter oriole
#

The client can use another local-only variable for ammo that will be used for display, but the one replicated by the server, even if updated slowly, much later and possibly with holes in the data (like 10 9 8 5 bullets remaining), it's the one that matters

#

Character is owned by the PC

#

re: ammo variable - basically what you're looking at in general is that client-side will simulate things in real-time, but when the server sends back updated state, the client needs to check for consistency

#

Same goes for everything

torpid elk
bitter oriole
#

Like, every time you fire you could send the current time to the server along with your fire event, and the firing event on server, after updating ammo, will replicate the ammo value + that time value

#

The client would also store locally a list of firing events with ammo + time

#

And every time ammo replicates you can find in the list what the ammo was at a particular time, and correct discrepancies

#

(Or you can simply assume ammo only decreases until a reload, and only update the local ammo when the server's version is lower)

torpid elk
#

In checking for a discrepancy though, wouldn't it still just be easier for the server to say "hey the value is X now"?

bitter oriole
#

That's what a replicated variable does really

#

But the variable replicates 3-4 frames after the client fired

#

You might have fired again since

torpid elk
#

Ohh I see now.

#

So other clients are (in this example) predicting shots because of automatic fire and then occasionally checks with the server to see if the count is accurate.

#

I almost feel like this is an over-the-top solution because other AAA titles seem to not consider this at all. If you fire your weapon and lag out, everyone else sees you firing indefinately until the host relays to everyone that you've been disconnected.

bitter oriole
#

I'm talking about the authoritative client here, the one firing the shots

#

Remote clients are much simpler

#

But your client cannot fire twice, see ammo go from 3 to 2 to 1, then back to 2 (server replicates for 1st shot) then 1 again (second shot)

#

That just sucks

torpid elk
#

Yeah that would be stupid

#

Is there an event for a change in a replicated variable?

bitter oriole
#

You can have one yeah

kindred widget
#

Looking for some direction. I'm unsure of how to structure my latest inventory iteration. In short, there's going to be a ton of basic items that really only require three variables. But I also have a few that are going to need quite a few more to keep state. I'm unsure how to structure this because I don't really want to have simple items replicating extra variables. Do I simply have two different replicated arrays, one for simpler items, and a second for more complex items, and combine them on the UI?

torpid elk
#

I can throw in my two cents but, believe me, it's not worth more than two cents.

Could you possibly have an array of an InventoryItem object, which parents SimpleItem and ComplexItem?

kindred widget
#

Does that work with structs? Can you make two child structs and then an array out of the parent and have elements replicate differently?

grizzled stirrup
#

Unless an actor has been torn off, is it best practice to only call SetLifespan on the server to destroy an actor on both server and client?

steel vault
#

I don't know the answer to that question specifically, but I do know that calling destroy on the server takes care of replicating to the client so I would assume that means the same thing for SetLifespan. It's going to get destroyed on the server which replicates down so there is no reason to call it in both places unless it's not replicated anymore.

steel vault
#

Doesn't seem like it would be too hard to throw together a small example. Parent struct with one property, two different child structs with one more different property. See if they replicate when put into the replicated array.

#

You probably just need to try to cast them to each child struct and see which succeeds and there you should have your child struct.

stoic acorn
#

What's the correct way to track which player has interacted with something? Is it by the player controller?

meager spade
#

PlayerController, Pawn or PlayerState

#

are good choices

#

depends why you need to track it

stoic acorn
#

My prototype requires that a player can switch sides during a round

#

If they are captured they 'work' for the opposing team

#

So I'll be destroying a player pawn so they look different when captured

native pagoda
#

Im having a strange problem.
When I packaged my game and sent it to my friend, we connected via Steam SDK (its a multiplayer game). Up to this point everything seemed well.
But when he made his first move, game crashed.
Nothing like this had ever happened before (I was testing is inside PIE, but server traveling is unable there).

#

Have you ever had similar problem ?

bitter oriole
#

Debug it.

#

Get the crash dump from their machine, debug it with VS

gritty lodge
#

I am having a problem in 4.26 with my cameras always resetting their rotation to 0,0,0 on possession on a dedicated server. Does anyone have any thoughts on this?

Steps to replicate problem:

Create new third person template project.

Remove preplaced pawn.

Add two new player start with different rotation.

Remove default pawn class.

Go into GMB and make it spawn and possess two third person characters at the player start transforms.

Launch game in "play as client."

Expected: Characters will spawn with same rotation as playerstarts and camera will match rotation.

Outcome: Characters spawn in right spot with correct rotation, both cameras default to 0,0,0.

gilded vapor
#

@meager spade I have been trying to get calling RPC's from UObjects working without much luck. Seems to be crashing the client. Do you know of any common pitfalls?

meager spade
#

the UObject has to be replicated ofc

gilded vapor
#

Does CreateDefaultObject work the same with components and subobjects?

#

CreateDefaultSubobject**

meager spade
#

you mean with components and uobject?

gilded vapor
#

yes

meager spade
#

yes

gilded vapor
#

hmm not sure what I am doing wrong than.

meager spade
#

@chrome bay was it you that also made a post on your blog about RPC's in UObjects?

#

ah it was i found it

gilded vapor
#

Thanks I'll check it ou

#

out*

chrome bay
#

yaah was me

vocal cargo
#

Weird question here, not sure where to ask... had a few people joining my client and joining a server. The server IP/Port display by reading from a JSON in an website and then people can join different servers.. this one guy couldn't see the server list, but also, when I told him to open by level by typing Open LevelName, he couldn't do it either. The game "refreshed" but he didn't actually change levels

#

Other people both from US and EU could join without any issues

torpid elk
#

Somehow I've made negative progress. Now calling a "Run on Server" event, even with Reliable checked, isn't working anymore.

unkempt tiger
chrome bay
#

yeah pleased with them so far, got a backlog of things I wanna do!

austere grove
#

Hello, im doing a multiplayer game for UE4 and ItΒ΄s a party game where all playes have health, the thing is, that I want to have persistant health from each player between levels, and also be able to tell if one player health becomes 0 so that everyone looses, any advice on how to do this in multiplayer, I was going to do a GameState but I have heard that itΒ΄s better for persistant variables tu use a game instance, any advice?

chrome quest
#

Player state?

winged badger
#

def. PlayerState, with seamless travel and CopyProperties override

#

any player that hits 0 should signal gamemode (on its server instance) to end the match

feral tendon
#

Hey guys!

Multiplayer related question here - any ideas/tips or references would be very welcome!
In shooter games when player uses shoot functionality as far as I know the shoot event is also called from client side (to avoid delay) and later on validated by server if it hit something. So here we have a case where we can't see the bullet.

What about games where we have 0-gravity visible bullet that bounces and we have to keep the fast-paced movement information in sync for all the clients.
As bullets travel quite fast and with small lag from client side, when player moves too fast - bullets just overlap with the player and nothing happens (from client side).

Maybe I have some problems implementation-wise, but it is possible that I don't know some crucial information, so I'll ask that anyways.
Thanks in advance!

livid seal
#

How do I replicate pausing a montage? Pauses fine in singleplayer. Montage plays in multiplayer, but does not pause. Server is running a multicast montage pause. Also tried using play rate 0.

livid seal
#

The visible bullet would just be a static mesh with no collision, just for show.

livid seal
feral tendon
# livid seal The visible bullet would just be a static mesh with no collision, just for show.

Thanks for your answer.

Unfortunately, collision is required element for the bullet for gameplay's sake, so that when bullet bounces back from player, other player can react on it.
Another thing, it would be required to trace not only the target location, but also the surrounding area (let's say some other moving object collides before bullet arrives to destination) - so it seems really expensive.

livid seal
bitter oriole
#

@feral tendon There is a reason few games do this, it's just really painful to do. Physics are one option - but multiplayer physics in UE4 suck so you're better off with a bullet that traces multiple times per frames basically substepping on tick. We did that on Helium Rain with hundreds of projectiles, though obviously not in multiplayer

#

It's not that expensive CPU wise

#

The problem is more that the travel time of bullets is much smaller than ping

livid seal
#

Trace and fake it is the only viable option really.

#

You can even do ricochets by getting your normals and redirecting the trace.

#

And do penetration with traces.

#

You just gotta get creative and use randomness and math.

#

Could even account for wind direction with traces, hehe. Just add a slight angle adjustment from previous trace.

#

If you shoot something going 100,000 cm/s and a player has default 600 max speed. Yeah, it won't miss them if it is on target.

bitter oriole
#

@feral tendon The only thing that makes sense in a multiplayer context is to trust the client to some degree, predict movement of moving objects assuming constant velocity, run the simulation instantly on the firing client based on the current scene state, and then send the server an array of locations that the bullet bounced at. The server can then tell that to other players. All players then replay the simulated trajectory over time, entirely locally. This way, you don't have a bullet actor or component to simulate or replicate, it's very light on networking and only requires a tiny bit of CPU time on the firing client.

#

The reason you need to simulate everything once is that determinism in Unreal is poor

#

You can try checking on the server that the shot makes some sense for anticheat purposes

chrome quest
#

How about Chaos? Do you think we'll see improvements in multiplayer physics with Chaos?

bitter oriole
#

When it's ready

#

Don't expect determinism though, that's nigh impossible in a game with variable framerate

chrome quest
#

Oh. Right

torpid elk
#

Among the multiplayer tutorials and VR tutorials, I can't find very much on multiplayer VR tutorials. Does anyone have some tips that could save me and my friend some headache down the line?

#

Of course, we want to replicate player controller positions, finger positions, and head position to other clients.

bitter oriole
#

VR multiplayer is going to look a like like VR, and multiplayer

#

Technically it's just the constraints from both

#

The main concern for you is going to be the player base

torpid elk
#

As in the player controller?

#

Or the demographic?

#

I know this seems pretty ambitious but we're trying to develop cross-platform between VR and PC.

#

Yesterday I realised it would probably be easier to develop VR first, then make PC users emulate a VR user and not using animations like a traditional FPS.

bitter oriole
#

@torpid elk As in the demographic.

#

Multiplayer for indies is difficult because, well, a lot of such games never find their audience and end up entirely unplayable

#

VR is a niche market, so multiplayer VR as an indie seems like a difficult bet to me

torpid elk
#

My friend and I are just doing it for fun and experience. We're not trying to be competitive in the industry right now.

#

Although from what I know about indie games, one of the biggest factors for getting popular is unique gameplay. We have some ideas that we're going to prototype and see if they are enjoyable.

bitter oriole
#

Hey, you ask for tips, I'm giving tips πŸ™‚

brave solar
#

Is it really not possible to call RPCs in pawns you have ownership of but don't currently control?

kindred widget
#

@brave solar Any Actor who's Owner AActor pointer variable that is set on the server to the correct instance of the player controller wanting to RPC, then that client can use that actor to Server RPC. Pawns simply have this set for them when a controller possesses them. So if you set a pawn's Owner on the server to a client's controller, and nothing else possesses it, you should be able to RPC from it. Although I'm not sure how that works with AIControllers and the like, whether they override that back to the server.

winged badger
#

AIControllers are not replicated by default

#

and its usually simpler to leave them that way

sharp kestrel
#

Controllers are typically client side anyways, correct? And AI would be best handled directly from the server?

bitter oriole
#

AI controllers are server only

#

Player controllers are owning client + server

sharp kestrel
#

Oh yeah of course, I forgot the gamemode has some events that reference player controllers too.

brave solar
#

Ah yeah it does appear RPCs don't go through if it's possessed by an AI controller, otherwise they do

bitter oriole
#

Yup

#

Need to be possessed by the local player controller

kindred widget
#

I was meaning more that I'm unsure if you forcibly set the pawn's owner as a client controller, even if it's possessed by an AI controller, if the RPC still works. For instance, I'd assume that even the AI controller's possess sets the Owner variable to that controller, but does it still work if after that, you then set the Owner variable to a client controller? The could still use the AI controller and be controlled on server, but clients could use the pawn actor to RPC?

#

I never tested that in my RTS game. All of that was Player Controller routed.

bitter oriole
#

I really wouldn't rely on "AI possessed but player owned"

ancient scarab
#

Are there any good resources on setting up a dedicated server for multiplayer capabilities?

#

Without using Steam online subsystem API

bitter oriole
#

Steam is unrelated to dedicated servers

south ether
#

Anybody know offhand what happens if you end up with actors in multiple ReplicationGraph nodes? For example, say they get sent as part of grid spatialization, and you have an alwaysrelevant node for things like team reveals. Does the information get sent twice or does it simply end up added to the list twice?

plush wave
#

Anyone know if networked actor attachments are handled the same way as networked component attachments?

peak sentinel
#

If I remember correctly all of the attachments are handled same way by default

sacred isle
#

Anyone know why this isn't running after creating a session and opening the level? I assigned the correct GM and pawn for the level but it doesn't work

#

if you need more information please ask

vivid seal
#

what would be the best way to do a generic "ability" class that both npc and player abilities are based on? i originally just had one ability class, but realized that like half of the functionality was strictly for prediction, and almost everything replication-related was unnecessary for non-player abilities.

i was thinking maybe have the generic ability class be the npc version where everything is intended to run on the server and just replicate display info to clients, and then have a PlayerAbility class that inherits from it and adds all of the client prediction and such, but there are a lot of things I would need to replicate in the PlayerAbility class that wouldn't need to in the base ability class. is there a way to make a child class replicate properties that the parent class didn't?

sage creek
#

@kindred widget sorry to bother you in another channel but i thought this problem would fit here better:
what do i do here if i want an object reference on the client, like here?

#

(it won't just let me use the regular "target" value)

kindred widget
#

You're trying to make one character launch another? If I'm understanding correctly?

sage creek
#

well that's my goal but with this i'm making a test "self-launch" event

#

the target input pin is so i can get the player's damage amount

#

i'll make an "aggressor" pin later

kindred widget
#

It might be easier to do a mix of normal and regular damage calls on the server side. Personally I'd just make a new damage type for knockback, and handle it on AnyDamage event in the hit character. Then on hit, you could apply normal damage via ApplyDamage that would affect health. Then after that call apply knockback via ApplyPointDamage, and use the Point Damage's Damage amount as the knockback strength.

sage creek
#

damage isn't the actual ue4 damage, it's its own variable

#

i thought ue4's damage system was needlessly complicated for my liking

jaunty plank
#

hey guys when i load a level just on the listen server the screen goes black however if this happens on the client they go back to the main menu any ideas why

glad sedge
#

How are you loading the level?

jaunty plank
#

its ment to be so you can disconnect when ever you want then a slot is opend in the server for someone else

#

i used the remove player function to in the gammode

vivid seal
#

so to generalize my earlier question, is there a way to have a property that doesn't replicate in a parent class, but does replicate in a specific child class?

glad sedge
#

@jaunty plank not sure if this will help, but try specifying the directory - /Game/Maps/YourLevel - though, that single string should be okay presumably if your map is in the right directory.

jaunty plank
#

ok, that would be wierd if that works cause it works on the client just not the server

glad sedge
#

Does it update in your editor?

#

As in, the map updates in your editor?

jaunty plank
#

yea on the client windows do

#

the server just goes black

glad sedge
#

And your clients are getting booted back to the menu?

jaunty plank
#

yea

glad sedge
#

Anything in your console?

jaunty plank
#

some unrelated widgits things

#

unless its in the main menu and not getting the widgit

#

its not that there about the player UI

kindred widget
#

@jaunty plank Are you just trying to make the server move itself and all connected clients to a new level?

jaunty plank
#

no its a like a quick round based game when you get killed it should take you back to the main menu where you can then find new servers

kindred widget
#

Odd that it only happens to the listenserver.

jaunty plank
glad sedge
#

Depends.

#

I'm hosting a dedicated server for like 0.12c a day

#

It's weak-sauce, but it's good for testing

jaunty plank
#

i was looking into doing like amazon game lift but that looks like it can get expensive fast

rich ridge
jaunty plank
rich ridge
#

Both of them are good and they only lack game specific framework or serviec like GameLift of Playfab.

#

One more point about Gamelift, whatever price they have given on their page is only for 15 days not 30 days.

jaunty plank
#

yea, i just need some sort of way to host a dedicated server i can do most the code myself for it, i might just buy a shitty server of ebay and and port forward my internet that should work for testing lol

rich ridge
#

For testing you could run on DigitalOcean for free.

#

When you signup you get free credits

jaunty plank
#

ill have a look thanks for your help its really appreciated

rich ridge
#

And one server equivalent to AWS free offering costs 5$ on DigitalOcean

#

And free network outgoing is 5 TB per instance

jaunty plank
#

sounds good

rich ridge
#

For my game I have choosen DigitalOcean already

jaunty plank
#

yea i wanted to use p2p for mine because of its expandibility but using it has caused so many more issues i think its just easier to use dedicated servers

jaunty plank
rich ridge
#

Droplet

#

Droplet is similar to AWS EC2

jaunty plank
#

thanks

glad sedge
#

yeah sorry Boris, I use DO too

jaunty plank
#

yea i knew i had to go dedicated at some point guess now is a good time to start lol

glad sedge
#

I went straight off the bat

jaunty plank
#

i wanted to see if i could go p2p but just for the way my game works it makes alot of sense to go dedicated

bitter oriole
#

Anyone familiar with how you could check on a client whether a level streaming operation started by the server is occurring ?

jaunty plank
#

you could put a variable on the game state and when you start doing an operation set it to true and look for it on clients

bitter oriole
#

No, that can't work

jaunty plank
#

or do a foreach loop on the gamemode through all your player controllers and set it variable or call and event through that

bitter oriole
#

I'm asking how to check on the client whether the client is done loading, regardless of whether the server is done loading.

jaunty plank
#

that should tell you when its loaded on the clients i would persume

bitter oriole
#

Okay please don't answer if you don't know, I want to know whether

#

a level streaming operation started by the server is occurring

#

I don't want to know whether the server started or finished or whether the level is loaded

bitter oriole
#

Alright, iterating on GetWorld()->GetStreamingLevels() with IsStreamingStatePending() works

silent frost
#

Will a dedicated Server run the map blueprints?

#

And will it also run on the client?

#

I mean level blueprint

vivid prawn
#

is there any proper workflow of using DataTable? cause I think i'm kinda lost, and I have been making tons of function to find what sort of data it's holding and load it accordingly.

E.g. survival game that player select a character from a DataTable and each character has a very dynamic tools (each tool has it own DataTable) and since all the character share same class, i end up making functions that return type of tool and extract the data accordingly, but the problem is if there are like 100 tools i'll end up making 100 IF to check the type of tool and i don't think that is efficient.

#

How do you tackle this?

#

actually it's not networking issue, it's more of workflow

#

even i write OnRep notify, i have to end up checking one by one of the DataTables to see which one is match

unkempt tiger
#

I dont know much about data tables, but can you not iterate through an array that holds all your tools (Wrench, Screw Driver, etc)

#

and check for equality there?

#

Or better yet a tools->enum map so that you just return the value

vivid prawn
#

the reason i'm using DataTable is to have their properties, and maybe there are 5 different types of Wrench

#

and let's say if I want to make 5 more types I have to update the Enum, and that can easily get really big

#

DataTable is very powerful, but i don't get the workflow of loading dynamic stuff from it, without going crazy

chrome bay
#

The idea is each row in the data table stores the information for each item

#

If you have to have different data tables for each item then it doesn't make much sense to use them at all really.

#

Then it's just a case of putting the enum in the data table row, and getting the row and returning it.

frank birch
#

Validation function is only a CPP thing, right? Can I add a validation function on my blueprint based RPC? πŸ€”

chrome bay
#

CPP only yeah

vivid prawn
#

@chrome bay true, but what if they do have different usage? like each tool has it own attachment and some can be use to fix stuff, and some can be use to attack, and some are attachments and not completed parts. let's say if i generalize them i can make roughly 30 types, but still i have to loop them and check them against the DataTable right?

chrome bay
#

But you can sort of do the same thing manually (RE validation - just kick them)

#

The point is you don't have a data table for each type

#

Each type should be in one data table, and it's the row that determines what enum it is

#

That can only work obviously if "wrench" and "hammer" have the same base data struct

#

But if they can't, then a data table probably isn't a good use-case here

vivid prawn
#

stuff like TV, Radio, Gun, melee, etc they don't have similar functionality

#

so if not DataTable, what other option do i have?

chrome bay
#

store the data inside the object itself

#

A data table doesn't make a huge amount of sense if all the things that have data require a complete table of their own.

#

It's for storing many variations of the same data type

#

Don't forget you can also do struct inheritance

#

So you can have a base "ToolDataRow" type that contains the enum

vivid prawn
#

true, in case if i'm the game designer and balance the game, which not like everyone know how to go into blueprint and balance the game right?

chrome bay
#

And you just lookup that row type

#
{
    Enum TypeEnum;
}

struct FWrenchToolData : public FBaseToolData
{
    // other data only for wrenches    
}

struct FHammerToolData : public FBaseToolData
{
    // other data only for hammers
}```
#

psuedo-code but that would be the general idea

vivid prawn
#

wait, you can inheritance struct in blueprint?

chrome bay
#

not in blueprint

#

but with CPP-native structs you can

vivid prawn
#

i see... okay

chrome bay
#

But then if you just want to retrieve the enum, you can just FindRow<FBaseToolData> without having to care about the specific type.

#

But again it may well not make sense to keep some data in a datatable, you might want to retrieve something like that from the object directly.

#

E.g, I assume a "Hammer" and a "Wrench" are not the same Blueprint, so it might make more sense to have the enum there instead

vivid prawn
#

yeah, they are not same, that's just a quick example

#

hmm... let me try that then

chrome bay
#

generally anything using the table shouldn't be casting the table to different types, it should be agnostic

vivid prawn
#

i see... okay, yeah, i dunno what would happen if casting DataTable

#

lol

chrome bay
#

ah what I mean is more the if/else/if/else etc.

#

Anything that's using the data table shouldn't care what specific data table it is, just whether it has the right row data

meager spade
#

i use derived structs for weapon data, i have BaseWeaponStats that is the primary stats for all weapons, but specific weapons (ranged/melee) have RangedWeaponState/MeleeWeaponStats respectively. But majority of all access is to the BaseWeaponStats. I found this the best approach for me. But you can access just using the BaseWeaponStats and casting, as long as obvs the data table in question is of the type you want to cast to. For example ```const FKaosBaseWeaponStats* AKaosWeapon::GetWeaponStats() const
{
UKaosWeaponItemDefinition* const WeaponDef = GetWeaponData();

if (WeaponDef && WeaponDef->WeaponStatHandle.DataTable)
{
    return WeaponDef->WeaponStatHandle.DataTable->FindRow<FKaosBaseWeaponStats>(WeaponDef->WeaponStatHandle.RowName, "GetStats");
}

return nullptr;

}and i have this helper //Templated version to get weapon stats
template <class T>
const T* GetWeaponStats() const
{
static_assert(TPointerIsConvertibleFromTo<T, FKaosBaseWeaponStats>::Value, "T must derive from BaseType.");
return static_cast<const T*>(GetWeaponStats());
}```

sharp kestrel
#

Is it normal for the host to print a joined player's name to console?
My team is sure its not something we've added but I've never noticed it before.

distant monolith
#

Hey so whats the downside of using rootmotion for multiplayer?

little shuttle
#

@meager spade are you from germany?

#

just ask because i did know a gpu coder from munich named kaos

stoic acorn
#

If you were to have certain rules that a team has to adhere to would you put all those rules into TeamStates? How would you go about setting that up? Would you use the PlayerState as the parent class or something?

stoic acorn
#

It seems more sensible to put team rules in the Game Mode. Also who is in each team.

vapid folio
#

hey, does anyone know how to make ALSV4 work in multiplayre?

lilac raven
#

Hello, when using servertravel with seamless travel enabled in my gamemodes my game crashes. any idea why this could be? thx

eternal canyon
#

are u playing in standalone

lilac raven
#

yes

earnest solstice
#

how can i Replicated flashing spot light over osc and a server ?

meager spade
#

@lilac raven can you show the crash?

lilac raven
vapid folio
#

hey @meager spade
can i dm you?

meager spade
#

Not really, if you have a question ask here, unless it's regarding a server issue πŸ™‚

vapid folio
#

ah i see

#

im trying to make ALSv4 work with multiplayer, any leads?

#

aswell as some animal npc that roam around the map and react to playeres

#

i did find this

#

but

gloomy tiger
#

Hey guys - would like to ask your opinion towards Net Update Frequency. In a PlayerCharacter with CMC, what's the "ideal'? What are your comments on that?

vapid folio
#

not sure about it, as i dont use c++ or know it

lilac raven
#

@meager spade seems ive done something wrong in my bps? Getting objects with a null outer is no longer supported. If you want to get all packages you might consider using GetObjectsOfClass instead.

#

this is what i get

#

im using server travel even a different map and with the same gamemode but still crashing

meager spade
#

@vapid folio maybe try it? I am not familiar with ALSv4

#

can you show the actual error @lilac raven ?

lilac raven
#

@meager spade I narrowed it down to this, for some reason its trying to find ThirdPersonExampleMap? yet im asking for my custom test map

meager spade
#

so you have a Travel map set?

#

can you also show me your travel command ?

lilac raven
#

wait nvm

#

aha wrong code

meager spade
#

you would have called ServerTravel somewhere

lilac raven
#

yeah sorry i have

#

sorry for the mess lol

meager spade
#

do you have a Travel map set?

#

(normally to a blank empty map)

lilac raven
#

yeah its left empty as i read it create a transition map for you

#

if its left empty

meager spade
#

and you verified level to play is not ThirdPersonExampleMap

#

do you have any references to that in your project settings?

#

it would not just try to load a map for no reason

lilac raven
#

I dont believe so, we never used the map. its very strange to me

meager spade
#

ah

#

your loading testsandbox map right

lilac raven
#

yes

#

i can try a custom transition map?

meager spade
#

this is LogStreaming tho

#

not seamless

#

its like its trying to stream that map into that level

#

but its not cooked

lilac raven
#

I cooked everything in project for development purposes

#

how exactly does seamless travel work with multiplayer?

meager spade
#

this is not a seamless travel issue tho

#

this is your sandbox map is trying to stream in that map

lilac raven
#

ohhh

meager spade
#

or trying to load it for some reference

lilac raven
#

i have changed it to a different map now to see if it works

#

just crashed again. ill check the log, i should mention this is not a new project its my teams uni project we have been working on since september last year, everything works fine such as servertravel but im trying to implement seamless travel

#

same error... im going to put the third person example map back where it was

#

weird

#

@meager spade im stupid πŸ˜‚ i had third person example map set as the transition map

meager spade
#

i kinda figured tbh, that was why i was poking down that rabbit hole

lilac raven
#

thanks! imagine me programming a full on multiplayer system for our fps game and then doing that facepalm

summer tide
#

I’m trying create a multiplayer trivia game. Interacting with Objects in the level will show you the questions. What would be high level architect of this?

#

Let’s say I have an interactable actor. Where would I store the questions I assume in struct format and how would I store the answers

#

Also I need to keep scores for every players.

winged badger
#

you'd probably want the texts alone in a DT so you can localize it without resorting to suicide

#

i'd use a gameplay tags for questions and answers

#

and use those tags as rownames for text DT

#

like

#

Question.MyFirstQuestion.Question
Question.MyFirstQuestion.Answer1
....

#

then your data struct for a question would have

#
FGameplayTag QuestionTag;
FGameplayContainer AnswerPool;
FGameplayTag Answer;
#

those are all nicely replicated as integers and client has the text tables to translate tag to question/answer

#

networking is pretty trivial, probably direct RPC to a controller(s) to ask, RPC back to answer

#

note that this structure allows you to provide a pool of any number answers, then just show the correct one + 3 others at random for example

summer tide
#

Let’s say in multiplayer env a player walks to the actor that has the question 1 then to the next one that has q#2. How would that look like in bp?

#

Also I want to utilize the framework such as game mode, game state and player state

summer tide
meager spade
#

Tag is a GameplayTag

#

RowName should be a Tag

crystal crag
#

Anyone here use the UE4 EOS plugin yet? In the notes they said they tested it with ShooterGame, but I think they meant they just internally tested it. The current project doesn't seem to include any hints about setting it up with EOS

#

I've got the plugin built and it is enabled in my project. But I can't seem to transfer the code from the EOS samples in the SDK over to the UE4 project. It complains about unknown types.

glad sedge
#

I could never get the EOS stuff working

crystal crag
#

I got the samples project working with minimal issue, at least to where I could host a dedicated server session

#

Now I'm trying to get their plugin to work ><

open wadi
#

I have a working dedicated server.
My client can connect but gets booted out.
I have the server log but don't understand the error message.
Anyone have a few moments to point me in the right direction for the following:

LogScript: Warning: Accessed None trying to read property CallFunc_Create_ReturnValue
BP_Survival_C /Game/Maps/ServerMap.ServerMap:PersistentLevel.BP_Survival_C_2147482453
Function /Game/Blueprints/BP_Survival.BP_Survival_C:ExecuteUbergraph_BP_Survival:006B
[2021.02.02-02.37.07:506][665]LogScript: Warning: Script call stack:
Function /Game/Blueprints/BP_Survival.BP_Survival_C:ReceiveBeginPlay
Function /Game/Blueprints/BP_Survival.BP_Survival_C:ExecuteUbergraph_BP_Survival

worn lodge
#

Greetings Fellow Devs, I am in need of some help. I currently have a Dedicated Server which works on LAN connectivity. But when I attempt to log in from outside of LAN or in this case from the internet, using the Public IP I get from doing simple whatsmyip search, it doesn't connect. It won't work with Open "publicIP" or ClientTravel to IP... I already port fowarded my router but still nothing over the internet works, I also disabled my routers Firewall and my windows Firewall while testing and nothing. My question is, is there something else I might be missing? I do understand some ISP block certain ports, might that be the case? Honestly I'm not sure what else could be the issue.

#

I also tried Port triggers, Inbound Rules and DMZ but I understand that removing both Firewalls anyways would override all of these options.. The server log does indicate "NetDriver listening on port 7777"

distant monolith
spring swift
#

Hey, im attemtping to make a Player Class selector! and if you havent guessed im having trouble, my problem is i want all the players to spawn in when all players have selected there class and are ready, they can select there class but the ready system isnt happening, ive attempted this mephod so far, using a integer in my player controller and making it go to the amount of players are in the game but i think im having a replication problem, it just wont go past 1, even when they all say they are casting to server, soo any clues?? or any examples of other systems people have made???

kindred widget
#

@spring swift It is very likely that you're simply updating the server's version of each player controller when they're ready. So each one reports that they're ready, but it only goes up by one on each player's server version of the controller. Do you want people to be able to see who's ready in the UI?

#

I would use the client's controller to make a ServerRPC to get to the server version of that controller. Then use that to tell GameMode it's ready. GameMode can update that controller's PlayerState to reflect that it's ready. This ready variable can replicate to all for UI purposes. Then after setting that, GameMode can also run a check on all existing PlayerStates from GameState's Players array. It can collect those variables and check if any one of them is not ready. If all are ready, start game. If not, do nothing until the next player checks ready.

spring swift
#

Thanks for that, im gonna give it a go tomorrow πŸ™‚

trim kindle
#

Is there a way how to easily identify whether the code is running on the server or on the client when hitting the breakpoint in the C++?

thin stratus
#

There is, I saw it on Twitter ages ago. But I keep forgetting

trim kindle
#

Ah cool, do you remember if it was related to calling something from Immediate window or watching some var?

thin stratus
#

Iiiii thiiink it was some command line var that you add to the debugger

trim kindle
#

okaay, thanks. I will keep trying, glad I know it is possible

thin stratus
#

@trim kindle

#

Found it

#

So it was a variable watch

#

I remembered wrong

trim kindle
#

awesome, thanks. I have been messing with Immediate window and calling some functions which can give me the value.

#

Will try that

thin stratus
#

Also leave Michael a follow. He has good tips :P

trim kindle
#

Yep, I definitely should do so. His posts are gold since the beta.

north sierra
#

Hey guys
I have set up a couple of dedicated servers for a project.
Is there a way to check if a server is available/reachable/online?
When i cant reach the server i.e. during testing out how maintenance would be handled, the game just resets to the main menu.
I would like to get a ping back that server is not reachable and display it as a widget instead of reset the game due to a time out

rich ridge
#

@north sierra You need to implement some sort of ping for dedicated servers. If you know backend the exact tech you need is zoo-keeper and heartbeat.

#

If I m not wrong, GameState do have ping API, but it is for connected clients in a multiplayer match.

twin juniper
#

Ping may not be enough. You may needs to implement a sniffer for your application state as well. Because your physical network may be fine in the server, which means the ping replies, but if your app is in a stale state, then your ping is not good enough...

lost fulcrum
#

What is the best way to implement voice logging with stock OnlineSubsystemVoice ? Our goal is to have voice logging on dedicated server.

hollow oasis
#

How to restart map and travel all players to this map in multiplayer

#

restart or change map

open wadi
#

Dedicated Server log question:
this yellow warning:
LogOnlineSession: Warning: OSS: No game present to join for session (GameSession)

Dedicated server does start. I can connect to it, move around. Get that warning in log tho as well as a similar one when leaving? What am i missing?

marble gazelle
#

You are missing an OnlineSubSystem but first of all you can ignore that I think.

open wadi
#

Yeah i should have asked "Can I ignore this"?

#

Wasn't sure I needed it for a dedicated server.

little shuttle
#

cheating may only be a problem if your game gets popular not any prior

meager spade
#

why did i get pinged?

little shuttle
#

pinged?

#

because of our recent discussion

meager spade
#

when? i have a lot of discussions

little shuttle
#

days ago, when i asked about multiplayer solutions

meager spade
#

UE4 does not support P2P

#

regardless of if EOS does

little shuttle
#

Epic Online Services does

#

ok forget it

meager spade
#

it has Listen Server and Dedicated Server

little shuttle
#

i know

#

but its not about unreal its about a solution for unreal

#

with EOS i dont need any other service

meager spade
#

sure you can go ahead and make UE4 work with p2p if you want

little shuttle
#

i can use p2p first with EOS crossplatform

meager spade
#

but Listen Server (where one player is server and player), works ok

little shuttle
#

and if cheating gets a problem, i can think of something else

meager spade
#

you really want to use listen server not p2p though

little shuttle
#

i went now thru all services and they are insane expensive

#

or listen server yes, but i need matchmaking

#

for that i need a server or EOS

#

thats the solution

#

i dont need photon, gamesparks, dedicated UE server, no just EOS

#

ok just wanted to add that

#

to close the topic

rich ridge
#

@little shuttle are you creating a B2B solution?

terse prawn
#

if the player character runs a "Run On Owning Client" event will that only run on the client that possess the character?

chrome bay
#

in normal circumstances yeah

#

So long as you haven't fiddled with ownership or anything

terse prawn
#

oh yeah nope x

#

xD

#

Thank you @chrome bay I appreciate the help and swift response!

little shuttle
#

ping of the host hosting the game

#

i can encrypt the traffic and well if cheating gets a problem and i have enough revenue i can find a better solution

#

but i think the ping could be the weakness in this case

#

cloud multiplayer services do not make sense, they are insane expensive

rich ridge
#

Listen server has many problems apart from cheating

little shuttle
#

like?

meager spade
#

i would never make a competitive game Listen Server

#

Host Quits! πŸ˜„

rich ridge
#

If the listen server player disconnects match ends

little shuttle
#

yeah

#

sure

chrome bay
#

You can pretty much give up on any kind of anti-cheat if you want listen servers

little shuttle
#

yeah sure, but cloud services are no solution for me rather i will make another game

chrome bay
#

Client is one thing - but If a player has the server running on their machine, all bets are off

rich ridge
#

@little shuttle have you Heard of DigitalOcean or Linode

little shuttle
#

no

rich ridge
#

See their pricing

little shuttle
#

ok one moment

#

i think cheating is not a problem

rich ridge
#

They are as good as AWS or azure of Google, but they lack game specific framework

chrome bay
little shuttle
#

when nobody knows your game

#

later you have money and you can use a service

#

for sure it will

#

good argument is the host quits

chrome bay
#

The problem you have is that Unreal, being sort-of open source, means that as soon as you launch there are already cheats available for the game.

little shuttle
#

host quits, host has very bad ping

chrome bay
#

Cheats that work in other games often work in many other UE games, simply because we're all using the same architecture

rich ridge
#

@little shuttle if you are going for listen server, then there is some extra effort in designing game in that perspective

little shuttle
rich ridge
#

EOS is not specific to UE4 multiplayer

#

EOS is your game backend

little shuttle
#

EOS can do matchmaking

#

thats what i need it for

rich ridge
#

And matching is done by your game backend

little shuttle
#

and it has sessions ans rooms

chrome bay
#

Steam can do matchmaking if you really want it to

little shuttle
#

e.g. parties

meager spade
#

Don't make a competitive game and you will be fine πŸ™‚

little shuttle
#

you dont need steam with eos

chrome bay
#

Also yeah, just don't make a competitive indie game πŸ˜„

#

In 2021, if you're building a competitive game and NOT using dedicated servers, you're setting yourself up for failure. Nobody would play it.

little shuttle
#

what about games like among us? the have lots of players too, they use photon

#

jambax ok, i understood

chrome bay
#

If you really wanna do something multiplayer and not have any support costs, make it PVE and use listen servers

#

Still things you have to consider. Indie multiplayer is a sorry state of affairs.

little shuttle
#

so you mean like player hosting the game is already a fail

#

hmm ok

chrome bay
#

if it's PVP/competitive, then definitely

little shuttle
#

because of cheating, host quiting, slow ping?

meager spade
#

i mean if its just a friendly PvP, and you state its not competitive and stuff, sure. But not many players will play

chrome bay
#

Yeah

#

more casual games are probably fine

little shuttle
#

host quiting is really bad yes

chrome bay
#

But you can't really guarantee any kind of consistent experience to buyers if you only provide listen servers

rich ridge
meager spade
#

UE4 has no host migration by default, i have seen a few people implement it (or try) but i have never seen it

chrome bay
#

Do what we do, pay for a handful of "official" dedicated servers, then let players rent dedicated servers from third-parties.

meager spade
#

its not just host quits, the host's internet could go down

#

host could start downloading and lagging everyone

atomic acorn
#

I remember call of duty 2 allowed for people to host dedis

#

And you’d have communities that donated to keep them alive

little shuttle
atomic acorn
#

Not the worst solution

chrome bay
#

Yeah, essentially the same as what we do now

meager spade
#

you could do similar to Minecraft, just bundle a server people can use, as Jambax said

chrome bay
#

To clarify though we never distribute binaries, so nobody outside of our team or the rental companies ever gets the server code

meager spade
#

that is developer decision though, but you could

chrome bay
#

yeah totally

#

This is of course all pending you making the game and getting people to play it first πŸ˜„

#

That's half the challenge πŸ˜„

meager spade
#

then again as a solo dev, i would not want to do competitive game, start small, with a good game that can draw players, grow a team, then do it

chrome bay
#

yeah defo

#

looks nervously at projects folder

little shuttle
#

ok you are right

#

the concept is very small, but it does not work without multiplayer

rich ridge
little shuttle
#

so i will archive it

little shuttle
meager spade
#

Unless you have good funds, marketing, etc, it is really hard to get noticed in the pit of indie games. Especially the saturated Steam, with 1000's of games not even worth the internet space they are on.

rich ridge
#

Yes

open wadi
#

Dedicated Server, Persistent Survival Type game: GameModeBase sufficient or go with GameMode?

bronze arch
rich ridge
#

@little shuttle I m using Nakama and EOS for my game backend

#

And for dedicated servers I have locked DigitalOcean

little shuttle
rich ridge
#

Not at all

#

Nakama can be integrated with EOS

#

Nakama is containerised.. so scaling is not a headache for me

little shuttle
#

you use eos for matchmaking and nakame for gamehosting i guess

rich ridge
#

There are serious problems is EOS..
That's why I m using Nakama to trim out shit out of EOS

#

I m using Nakama for user and friends management

#

That's it

little shuttle
#

nakama is 600$ a month

#

not that cheap

rich ridge
#

It's free

little shuttle
#

i see 600 is if they host it, they provide the server on github

rich ridge
little shuttle
#

and you use it with ocean

rich ridge
#

Yes ocean

little shuttle
#

i saw, but i wasnt thinking that you can use the server for free

rich ridge
#

Ocean gives 100$ signup credit

#

So it's free for early launch atleast

#

Or even Google cloud gives 300$ credit

little shuttle
#

assume you will publish to mobile as well

rich ridge
#

So I mean the initial launch is not a problem..
The problem comes when you grow in players and don't make enough money

rich ridge
little shuttle
#

i would do, just to get sure you get your playerbase

#

but sure @meager spade is completely right here, hard to get visibility now

#

thanks all, this was really useful information provided

rich ridge
little shuttle
#

its so complicated to make games in terms of efforts

#

its worse that every bad game makes it into the stores

#

yeah marketing is a big topic

#

#keywordmarketing and so on

rich ridge
#

At the moment I m truly focusing on building game first and then I do marketting stuff

little shuttle
#

me too

#

you just reminded me, but its another topic for another channel, thanks again for the information

#

i think that should be a good solution need to lookup the docs and make some effort estimation

#

@rich ridge why did you use nakama and not just an ue dedicated server?

rich ridge
#

Nakama realtime can't satisfy my MOBA needs

#

EOS has many problems.

  1. I can't remove any login type from EOS web login.
  2. EOS friends service is exclusive for luxurious studio. And I m solo and beggar studio.
  3. EOS ecom interface can only be used if your game is going to be published in epic store. My game is not for Epic store and getting your game on epic store requires you to be luxurious studio or need a strong lobby at epic games.
#
  1. It is very difficult to get dedicated support for EOS for beggar studio like me.
#

The only support I can get is discord chat.

#
  1. Whatever things I have explored in EOS, the EAS services are very slow in my experience.
#

Rather than having 100 Mbps connection. The auth login takes 10-20 seconds

#

@little shuttle I hope my experience with EOS helps you too

#

I choose leaderboard and achievements of EOS to use because I don't have budget to host database of huge pile of leaderboards and achievements.

little shuttle
#

makes all sense

#

yeah sure that saves me tons of efforts

rich ridge
#

I m only not using epic account services

#

And for account services I m using Nakama and my Nakama database will only have data of player registration..
The leaderboard and other databases will be at EOS side

twin juniper
#

I have no clue where to start if I want multiplayer like in Minecraft Bedrock

#

Essentially, host creates a world that doubles as a server, anyone with the IP can join in

little shuttle
#

its basically the same, just read the whole chat

twin juniper
#

I'm probably not looking hard enough

#

Alright!

#

So I'm looking for a listen server, that's a start

little shuttle
#

or nakama (opensource server on github, digital ocean)

little shuttle
twin juniper
#

Thanks!

spark owl
#

Hi I'm developing a fast paced multiplayer game in UE4. I'm wondering if anyone knows anything about lag compensation and if it would specifically be able to work in the game i'm working on. Does anyone here have experience with lag compensation programming?

pallid mesa
#

If you do understand how networking works, lag compensation is somehow intuitive. The best way to do it is having a synchronised clock that you can rely on

#

therefore you only would need to account for the roundtrip time to issue your actions

spark owl
#

when you say round trip time you mean "player inputs key, then server does action based off input, then sends back to client" right?

pallid mesa
#

so besides lag compensation you want prediction?

spark owl
#

ok so basically right, I'm making a fast paced soccer game. The issue I'm having is that input feels no where near as close as it does on singleplayer

#

I want it to feel as smooth as singleplayer

pallid mesa
#

and no, round trip time is a parameter you can learn reading that piece of article I sent

spark owl
#

so like when a player releases the kick key, there is a delay for it to kick the ball

#

and if your ping is high, it takes even longer

pallid mesa
#

yes, and you understand why that happens, right?

spark owl
#

not exactly

pallid mesa
#

That happens because your code is server authorative, meaning that you are sending the input to the server and whenever the server ack's it, the action occours

#

if you think about how networking works... you'd need to send a signal to a server residing somewhere, your connection to that server might be good or bad

spark owl
#

yes im following

pallid mesa
#

and then the server reply to that signal to send it back to your client

#

which means that you have two latency points

#

upload data/download data

spark owl
#

yes

pallid mesa
#

the ping you see in your client is the roundtrip time between your owning client and the server

#

that is upload/download trip time

#

so... basically if your code remains fully server authorative

#

you cannot avoid this full roundtime trip delay, unless you do implement any sort of technique

#

to cheat a bit around it

spark owl
#

how does one achieve this magical power?

pallid mesa
#

let's try to be pedagogical for a moment, what tricks come to your mind?

spark owl
#

i would think that the client does the kick on his end, then sends it to server, then servers sends to other clients

#

im not sure exactly how that would look programmed but that seems like the general idea

pallid mesa
#

so there are lots of implications on doing the kick on the client!

spark owl
#

hackable i assume right?

pallid mesa
#

exactly, that's called a client authorative approach

#

you can mix a client authorative with a server authorative to have the best of both worlds

#

that's called prediction

spark owl
#

im learning so much in so little time it's amazing

pallid mesa
#

let's speak a little bit about overwatch, ever heard about it?

spark owl
#

yes

pallid mesa
#

Overwatch does some cool tricks network wise, I'll send in a moment a very good conference that I'll advise you to checkout because it might be benefitial for your implementation

#

so... imagine you are winston, you are jumping around with the "shift key"

spark owl
#

ok im winston jumping around with the shift key

pallid mesa
#

you will be allowed to jump the same frame you press the key, which is amazing, right?

spark owl
#

hell yeah it is

pallid mesa
#

now... you have some lag... that means that your jump take a bit to be streamed over the server

#

what happens if a curious mei freezes you while she sees you in the ground

#

however you just pressed the jumping key and you are in the air!!

#

something magical happens named... rollback

spark owl
#

oooo

pallid mesa
#

you were allowed to jump in your client... because your client didn't get a frozen state

#

however... to the server you are frozen

#

so.... your client does the correction, puts you back in the ground and sets your client state to frozen

#

which means that your client and server will be synced

#

so.... how does this work exactly?

#

you are allowed to jump in your client... the server will process the jump aswell if the server finds something going odd with your jump it will sync back to server position

#

or do whatever is needed

spark owl
#

yes i understnad

#

could this be done in blueprints?

pallid mesa
#

drawing incoming

spark owl
#

im so excited

thin stratus
#

could this be done in blueprints?
Maybe, not very efficient though. That's why the CMC does it in C++.

#

You might just want to read up on it a bit in general

#

Let me grab you a link with some 2D test to further understand the concepts

#

That explains Prediction and Reconciliation quite well for the start

pallid mesa
thin stratus
#

And if you go further on this article you get some interpolation examples too

pallid mesa
#

and just to add to what exi posted! https://www.youtube.com/watch?v=W3aieHjyNvw

GDC

In this 2017 GDC session, Blizzard's Timothy Ford explains how Overwatch uses the Entity Component System (ECS) architecture to create a rich variety of layered gameplay.

Register for GDC: https://ubm.io/2yWXW38

Join the GDC mailing list: http://www.gdconf.com/subscribe

Follow GDC on Twitter: https://twitter.com/Official_GDC

GDC talks cover...

β–Ά Play video
thin stratus
#

In the end you need: Prediction, Reconciliation and Interpolation

#

Or whatever other names they give this elsewhere

spark owl
#

this is seriously great info ty both for all of it

#

I understand the concepts but I have no idea how to implement it into my project seeing as it's blueprints only thus far and I know very little c++

pallid mesa
#

you can do this on BPs as well

#

it's just about understanding the concepts, there are multiple different techniques

spark owl
#

and it would still be efficient?

pallid mesa
#

you don't have to adhere per say to the literature

#

well the math for it isn't too expensive

#

so you can probably do it in BPs with no issues

spark owl
#

that is absolutely great news then

pallid mesa
#

but I recommend you to understand networking, context and whatnot

#

so you'll be able to open your mind to custom solutions for your context

spark owl
#

ok i will study these articles, and the gdc conference ty so much for all the info

thin stratus
#

but I have no idea how to implement it into my project seeing as it's blueprints only thus far and I know very little c++
Honestly, I have never implemented this myself either and I can't say if you can do it in BPs or not. I only extended it in C++ and know how it works there.
I would however never really suggest doing it in BPs. But that's personal preference. I like BPs, but some stuff just fits better into C++.

#

(And not just because it's prettier :P C++ has other ways of handling the structures and data you utilize)

pallid mesa
#

πŸ˜„

#

I default to C++ for these things as well, he'll get bulky nodes with some things done on Tick there

#

and that can get pretty unmanageable

#

but I've seen big boi BP's... some people manage

#

so up to them I guess XD

spark owl
#

so you would reccomend c++ then?

pallid mesa
#

yes

spark owl
#

is there a way I can keep most of my blueprint code but then only implement the client authoratative functions in c++?

pallid mesa
#

you can do whatever

spark owl
#

that seems like it would be messy tho

pallid mesa
#

but I would recommend you doing your "ability" framework directly in C++

spark owl
#

well fuck i just got done doing it all in blueprints

#

lol

thin stratus
#

Try it in BPs first

#

But complex Multiplayer games will sooner or later push you into C++

#

Specially since Epic just doesn't expose 75%+ of the engine

#

There is lots of variable and events you have no access to

spark owl
#

you mean with blueprints i wouldn't have access to them?

pallid mesa
#

if it's not exposed, no

#

also networking in C++ works a bit different

#

ie: onreps don't get called on the server

winged badger
#

and i think only 75% not being exposed to BP was very generous

pallid mesa
spark owl
#

what is the reason most of it is not exposed in blueprints?

#

effeciency problems?

pallid mesa
#

the reasoning is probably keeping the BP environment simpler

winged badger
#

when you actually go and catalog what BP can do networking wise

#

it can send RPCs, it can set variables replicated with basic conditions exposed, it has basic configuration for actor replication and its replication callbacks are hacks

pallid mesa
#

yep, you can't do much in BP's regarding networking 😬

winged badger
#

thats the entirety of blueprint network functionality

pallid mesa
#

also the only relevancy method exposed to BP's is the default net culling

#

although you have dormancy

signal lance
#

one of the biggest things that are missing in BPs are custom net serializers, can be so useful

spark owl
#

bruh a lot of this is going over my head now

winged badger
#

in other words - you might be able to make it work in BP

thin stratus
winged badger
#

but you have 0 tools to optimize your network

#

which effectively limits you to 4 player game

pallid mesa
spark owl
#

i smell a profitable plugin

pallid mesa
winged badger
#

not quite

pallid mesa
#

πŸ˜‚

winged badger
#

as you can't really do much with structs in BP

spark owl
#

oh ok yeah nvm idk what im talking about lol

winged badger
#

so the problem is waaaaaaaaaaay deeper then just the networking

signal lance
spark owl
#

I would like the game to be coded the best way possible but learning all the c++ knowledge required seems like a huge task right now. ecspecially when ive already gone into pre-alpha with the BP code i have

winged badger
#

optimizing a network in c++ doesn't require a technical mastery of c++

#

but it does require you to understand the engine netcode very well

spark owl
#

so would doing that be modifying the engine or would it be added onto the engine?

winged badger
#

we are running a vanilla engine, so far we managed a workaround for every landmine unreal presented without altering the source

pallid mesa
#
so would doing that be modifying the engine or would it be added onto the engine?

not exactly, you use the engine (sometimes the engine uses you).

#

so you create classes the same way you do in BP, inheriting from the playerstate, gamestate... etc

spark owl
#

ok i see. so basically if I went the c++ route, i would have to redo everything right?

winged badger
#

not quite

pallid mesa
#

no, you wouldn't

spark owl
#

all the mechanics and whatnot

winged badger
#

once you know what you're doing its not too hard to move the (net)code to c++

pallid mesa
#

your bp character can inherit your C++ character

winged badger
#

not accounting for the mess you do along the way if you lack the skills for it

pallid mesa
#

I mean... one learns messing around at the end of the day hah

spark owl
#

i'm just trying to understand exactly how it would be structured

winged badger
#

you can insert c++ base classes under blueprints

#

meaning if your BP Character inherits from Character, then you can create a MyCharacter deriving from Character, and reparent the BP to that class

pallid mesa
#

so... it would look like

ACharacter (C++) -> MyCharacter (C++) -> BPCharacter (BP)

winged badger
#

which then lets you add c++ logic to MyCharacter and therefore BP Character

pallid mesa
#

exactly because when you create a (BP or C++) character in engine, you are inheriting from ACharacter (C++)

spark owl
#

yes i see