#multiplayer
1 messages ยท Page 504 of 1
Unfortunately, that tells me when it's created in the server.
yeah :/
Can you not use on rep notify ? Also widgets only exist on the client side
Where would I put this rep notify?
C++ or BP
On what object?
I honestly don't know why there isn't one
but you also shouldn't be getting a nullptr to game state either
oh wait
@flint rose
are you doing this in the constructor?
Well, my game has a bunch of different classes, and they all have their own pawn classes. So basically, when i load into a map, i check each connecting player's GI for their class selection (and talents, items, etc) and then create their pawn from GameModeBase and then possess it.
I'm trying to do this all in the WaitingForMatchToStart state
@gritty lodge have you tried ForceNetUpdate
all you need to do is override that function and return the pawn class based on the player's class/role/items/etc
Thanks, I will look into both suggestions
Okay. I think I figured out my issue with some delegate magic
void ABaseGameState::PostInitializeComponents()
{
Super::PostInitializeComponents();
USwordfightingGameInstance* GameInstance = GetGameInstance<USwordfightingGameInstance>();
if (GameInstance) {
GameInstance->OnGameStateReady.Broadcast();
}
else {
UE_LOG(LogTemp, Warning, TEXT("There is no game instance..."));
}
}
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FGameInstanceGameStateReadyDelegate);
UPROPERTY(BlueprintAssignable)
FGameInstanceGameStateReadyDelegate OnGameStateReady;
@flint rose there is always a GameInstance ๐
That's why I used it.
and you cast should never fail
unless you didn't set it up in the project settings
so the if check is pointless ๐
It's just what BP defaults to.
Ah, I thought you meant in the BP.
I get nullptr on it sometimes.
not possible
Tis so.
GameInstance exists from game start to game end
But what's getting the reference to it might not have it.
thats the world, but that should be set way before postinitalize is called
so unless you are doing something funky, 
either way, if it does return nullptr there
then i would move it
Just calling get game instance from a game state that's pretty much empty except for that.
as it would kinda break the idea of it
It works for the purpose I need it to.
Some of this gets called from widgets, which has funky world context objects, which may be the reason.
But they don't get the UI anyway.
So if for some reason, I accidentally change something, and they accidentally get it, I don't want VS to crash.
Now that I got this hard part over, now to master the easy part... UI! As if. ๐ฆ
Sorry, but it not works @naive crater
Please. I might cry because I tried all that I know, all this when the proposed but I still have this problem with the server travel
Anyone know how to go about getting a reference to the 'local' player's character (from a simulated proxy character)?
@split drum Could you not use the player controller ?
and get controlled pawn or similar
i think those return null from a simulated proxy
I haven't worked with those so I'm not too sure sorry ๐ฆ
all good. I think i'm missing something obvious? I would expect there to be some static function somewhere like "GetMe()", Me being the local controller or the currently possessed character
Figured it out, for anyone curious: If there is ever only one local player (no split screening), it seems safe to use UGameplayStatics::GetPlayerController(GetWorld(), 0), or, if paranoid, all controllers can be looped through using:
uint32 Index = 0;
for (FConstPlayerControllerIterator Iterator = GetWorld()->GetPlayerControllerIterator(); Iterator; ++Iterator)
{
if (Iterator->IsValid())
{
UE_LOG(LogTemp, Error, TEXT("%hs | %s | %s : %s | I got a controller at index %d with character name %s"), __func__, *Util::AmIServerOrClient(GetWorld()), *Util::WhatRoleAmI(this), *GetNetOwner()->GetName(), Index, *Iterator->Get()->GetCharacter()->GetName());
}
Index++;
}
I'm not quite sure I understand how to use FUniqueNetIdRepl. How do I change the users unique id in GameMode::PreLogin?
Has anyone used the MP System pack on the marketplace for online multiplayer?
If so can I use the same player controller and character bp for multiple characters or do I need to duplicate them?
I'm new to ue4 so forgive if this is a noob question
Can anyone experienced with replication dm me? I need some help with a few big issues Im having. I cant control the server window when testing for one
Anyone able to help me, https://gyazo.com/8cdfcc32a6d3bd5c2c9ec901a9d168e3
https://gyazo.com/129957d02fbb360ca031a982bd365694
The server can teleport sucsefully
but client gets set back like the server is denieing the teleport
u can see on the client he gets teleported fort like half a second then sent back
any thought on how to fix this
@twin juniper I'm pretty sure that keypress events don't run on the server, so you need to create an event that is a server message where you call your teleport event. I think what you're seeing is the calling client doing a teleport and then correction moving it back.
๐ I believe this sir is correct
@twin juniper depending on how your detecting whether or not your in the zone or facing the door/whatever, on key press make a call on the server to literally just run whats above (do checks though on the server to make sure the client is infront of the door)
Need a server for a moble fps help or tutorial dm
I am testing using UE4 editor, simulated, listen server with 2 clients.
When the host client uses LAN in create session, no matter if I Find Session using LAN or not in second client, it will always find the LAN server. Is this normal
Are both clients on the same network ?
Guys, Give me brief introduction about Quixel...
if i launch project from editor as standalone, and run a packaged project from the same computer, would that acheive the effect of running it from 2 computers?
Hey, if i have a function on tick with a gate on my BasePlayerClass, do i even get the "normal" tick without this gate function in a child BP of this class?
@pastel thunder are you serius or no its a megascan lybret with 8k textures decals 3d models
I don't have little bit of knowledge about Quixel... Dude
... why don't you look it up then? Google, Youtube?
I am searching on YouTube but there showing only tutorials...
Then I must show some video then my doubts will clear..m
It's better to ask anyone
If you do dedicated server testing inside the editor, do multiple clients share one PlayerController? For example HUDs of differnt players get all loaded, and values in the player controller are getting overwritten by the last loaded client it seems...
they do not
hm, ok
unless you screwed up the logic
common mistake is using GetPlayerController/Character[0] from the RPC
or on dedicated server side
What's this RPC?
@winged badger okok, but i have the correct reference when setting this inside the CharacterBaseClass on begin play, right? Or do i have to set the reference from the Controller inside the PlayerCharacter?
RPC = RemoteProcedureCall, is i understand it so far, is calling a function inside a different machine, like the server would call function in clients^^
OK thanks
but i would recommend that a "Multiplayer-Pro" around here checks this statement ๐ Honestly i am still not fully grabbing it, even though i read Exis Network Compedium the third time i guess ๐
OK๐ ๐ข
i have no idea where that code runs from that screenshot @balmy kindle
as a rule tho: if you called GetPlayerController[0] on the dedicated server, you almost certainly screwed up
In the CharacterBaseClass
as there is exactly one use of that function that actually works on dedi
ok, how do i get a working PlayerController Reference then?
GetController
GetOwningPlayerController or soemthing like that from HUD
GetOwningPlayer from Widgets
(provided you connected the owner pin when creating them)\
GetOwner from PlayerState
(the GetOwner from PS gives an Actor reference, GetController from Pawn gives AController reference, so it has to be Cast into PC, rest need a Cast only if you need data/functionality from your custom PC class)
the static access is rarely useful
we don't have a single GetPlayerController[0] in the game
many people use GetPlayerController[0], works ok in single player, should not be trusted in multiplayer
the only good use for it from BP is
GetGameMode->GetNumPlayers->For (i = 0 to NumPlayers - 1)->GetPlayerController[i], server side
iterating over all player controllers
Nice, thank you. I'll copy all the stuff you writing in a Text Document. I'll need some time to look over all that info ๐ ๐
for (FConstPlayerControllerIterator Iterator = GetWorld()->GetPlayerControllerIterator(); Iterator; ++Iterator)
There is that too
not from BP tho
Although I think it might have been removed along with PawnIterator in 4.24..
Ahhh of course
has it gone?
PawnIterator has
Well, is deprecated
For some reason they want you to use actor iterator now instead...
they use the controller iterator in game framework quite a bit
Oooo that's nicer than TActorIterator... might use that
yeah
But yeah, I guess they aren't keeping a dedicated list of pawns now
yeah, I used controller iterator quite a lot though.. that must still be there. didn't get any warnings about that
4.24 CuttingEdge(TM)
yeah
@winged badger That's awesome! I used the Controller Reference thats set in the CharacterBaseClass in a lot functions with HUD and some other stuff. And simply changing to "GetController" made them work instantly correct! ๐ Thank you! ๐ ๐
Does anyone know why Im not able to control the server window when testing? Working on replicating DCS
https://youtu.be/Mvue2Qj19vA heres an example, all clients work but the server doesnt
The clients are working fine, but I am not able to control the server pawn in DCS. Plz help
pretty sure its something to do with the character
Does ACharacter::Restart() get called on all clients (remote and local) on possession, or just the local character that you have possessed?
I am fetching replicated skin and emote properties from the playerstate on restart and want to show the correct cosmetics for all remote clients, not just the owning client
Looks like it's only called on the local owning client, not all
BeginPlay?
Hello there, I got this warning "FNetGUIDCache::SupportsObject: %s NOT Supported." when I spawn the exact same collision in runtime on client and server BUT without replication. My actor is placed on the map but component is created at runtime.
Is there a way to avoid this warning, since I got some issue with CMC and especially ClientAdjustPosition which rollback my character location
makign it NetAddressable would do the trick
but for that it has to have exact same name on clients and server
you can't reuse names in repeated spawning
and if they mismatch at any point, client gets booted
note: NetAddressable != Replicated, just that a pointer to it can be resolved over network
@winged badger the name is the name passed on the constructor with NewObject ?
yes
ok thanks I will try ๐
if you're only spawning it once, it should be easy
So all of a sudden now when my character is 'casting a spell' while walking, the client thinks the pawn shouldn't be moving during that but the server thinks it should, so the client sees the pawn get 'rubberbanded' forwards every network tick
๐ weird. Should be simple enough for me to debug though because it only happens when 'casting a spell' so it has to be related to something that happens then
you could stop all movement on client and server before beginning the spell. Something like character->GetCharacterMovement()->StopMovementImmediately();
@ebon bramble basically your movement needs to be stopped in a network-friendly way
Simplest would be to prevent player input
Otherwise you have to dive into the character movement component and work with prediction
The travel server does not work in game testing in the editor, does it? Only in the already packaged version and in standalone game, is not it?
No need for packaging, but yes it needs to be standalone
So why with this code it does not work?
So why with this code it does not work?
Even that's checked
@silent birch Do you want seamless travel or regular travel ?
Server travel
thats not what he asked, google seamless travel for unreal engine and it will explain
have already tried and here I use what I have learned and here is the result is (the level does not even open)
๐คท
Make sure you test in standalone, and that you understand the difference between hard & seamless
So nothing happens
then your console command is done did messed erp. also ^
Yeah I tested well in standalone but nothing
your server travel command is messed up. idk what its suppose to be in blueprint but im willing to bet thats the case as why its flat out doing literally nothing. if you use seamless in the editor it should still display an error or something right Stranger?
When I open my level should I also put the following text :? listen
paste whats in your server travel string
post whats in it so we can see it
There is open MAIN_MENU? Listen
what is your entire string
ServerTravel *********************
Well no I want them to be able move while casting !! Lol
For this to work, do I do that: platform service = NULL?
That's my question
I do not understand your question @ocean geyser
im trying to help you figure out your servertravel issue but you are making it difficult here. your append string, what all does it say? part A says ServerTravel, what does part B say?
Part B says : open MAIN_MENU? Listen
try just this and see if it loads you to your level
ServerTravel MAIN_MENU
editor will be fine as long as its not seamless
For this to work, do I do that: platform service = NULL?
So I'm checking out seamless travel?
uncheck seamless travel, platform service shouldnt matter right now (someone correct me if im wrong for testing) so it can be null
Server travel MAIN MENU or server travel open MAIN_MENU?
ServerTravel MAP_NAME_HERE
Do you guys know if replicate movement is smart enough to not continuously replicate the position of something that is attached to a parent?
I know that replicate movement will replicate the attachment, but I'm not sure if it's going to be flooding the pipe full of transforms that are not necessary.
It replicates separately
as the AttachmentReplication struct
ReplicatedMovement doesn't replicate while attached to something.
What can I do to turn replication of an actor on and off for a specified client? I couldn't find anything in the AActor class
IsNetRelevantFor
The description sounds like it just checks if it's relevant, not that it makes it relevant
and if its overriden to return false in some situations
its no longer relevant in those
so you override, add your condition ontop, then call super if your condition doesn't return false
hey all, does anyone know how to cancel a join. Say I clicked to join someone, but want to cancel it.
using steam sessions
Nice thanks Zlo
So for an invisibility mechanic, if you wanted the character to be truly invisible to another client, you could use IsNetRelevantFor then?
looking at the docs it seems possible, but are there any other good approaches?
could anyone help me with this? urgent thank you
Is there a way so that I can override the default socket which is used for replication and other stuff
Or I can tell the engine instead of default engine socket use my own socket which I have as a plugin
Does anyone have a link to a good tutorial to start integrating Steam?
Read this, but it doesn't seem correct, telling me to look for files that don't exist.
https://docs.unrealengine.com/en-US/Programming/Online/Steam/index.html
An overview of Online Subsystem Steam, including how to set up your project for distribution on Valve's Steam platform.
I'm asking my own question.
@flint rose but your question answered my question
@flint rose you are a funny guy
Does anyone know how setting characters to PlayerStarts on Restart Player at Player Start works? I created a few PlayerStarts and added them to the map, gave them tags. But when I use FindPlayerStart and plug in the tags, it always spawns them at 0,0,0?
@gritty lodge I believe what u need to do is .
Spawn character by giving the location of player start
Do find actor by class and get the reference of one the player starts and get location. Feed that location while u r spawning the character
Thanks that worked by the text you gave me but I do not know yet if it will not affect the clients ๐ค๐ @ocean geyser
I'm having some issues with replication (I believe) and I'm not sure if this is possible
I have a MediaPlayer which uses a local StreamMediaSource: rtsp://127.0.0.1:8554
The output of that is applied as a Material to a MaterialBillboard which represents my FirstPersonCharacter
I'd need that Material to be replicated (I think) as each client is running their own local RTSP server
Right now what happens is every FirstPersonCharacter looks the same on one client (as it uses the output of the RTSP server that is running on that client) instead of replicating the Material from the respective clients
Is this possible to do?
what is a .uasset?
a material asset file
if its packaged, it can be referenced over network
and then the reference to it can be replicated
so I have to tell unreal to package the material as well?
If you're trying to replicate the "appearance" of a material, that won't work (i.e, what the material looks like).
Not really 100% sure what the question is though.
thats exactly what I'm trying to do I think
each client has a RTSP server running locally and the output of that should be the appearance of each player
first time around, it sends a full path to it
Yeah that won't work
then the path is assigned a 4 byte NetGUID
You'll need each player to be able to discern other players' appearance somehow from something simple, like a unique identifier of some kind.
and afterwards that NetGUID can be resolved into an asset reference
without the path (asset in your content folder, and something either referencing it or being manually added to the package)
replication won't work
is there any other way I could share it?
provided the RTSP servers have the exact same content
they do not
then no
Oh, yeah forget it
what if I made the RTSP servers available from outside?
Best you can probably do is one of those character-creation things, where you upload a bit of info to the server when someone joins and clients receive that. Still not exactly cheap though to send a texture across the network.
so each client accesses each players server?
that would murder your bandwidth
Well I guess you could, but it'd be like creating Netflix 10 times over if you had 10 players. That's a lot of data to be streaming... Also sounds like a security nightmare.
thats perfectly fine
I dont need it to be practical
I just need to write a thesis
:^)
Well, in that case you need to give players an ID that other clients can use to find the info they need
Like a web address or something I guess
Although the conclusion of the thesis will be "fuck this it's impossible lol"
Character creators FTW
you're not trying to recreate Hoop Gawd are you :D?
https://www.youtube.com/watch?v=JCmPGCwF9TU
Here's the Hoop Gawd at E3 2015. Read more: http://kotaku.com/ea-introduces-hoop-gawd-the-gawd-of-hoops-1711492568
Sorry for the cringe
Havent seen that before
Sorry to be the one to introduce it to you ๐
Nah
they don't normally communicate to each other directly
You could tell the Server, then replicate it to other clients - but generally speaking not a great idea.
as long as it works im happy
so even if you did, the player's routers wouldn't expect incoming traffic from other players and would just ignore it
^ that is also a good point
well Im kinda screwed
I have a case where when the listen server and client spawn, the client sees an incorrect state on the server pawn, until the server moves their hand and it is 'changed', so it gets replicated. But the code runs on tick and I don't see why the initial state isn't replicated at once.
I get that replication happens only when something changes, which is the case, but surely also it should provide incoming clients with the up-to-date replicated info, regardless of whether they're changing in the moment?
The OnRep function runs the moment I move the server pawn's arm, but not before, even though it runs the above code
The initial state should come down with the "opening" packet that creates the actor
Not 100% sure now but I'm sure that should fire an OnRep callbacks if the value differs from the constructor value.
You could change the RepNotify condition to "Always", so that the OnRep fires whenever the data is received, even if it hasn't changed
I can try to give it a different value in the constructor, to force an update
DOREPLIFETIME_CONDITION_NOTIFY(Actor, Property, COND_None, REPNOTIFY_Always);
Will force the OnRep to be called whenever the property is received
Aha, will try that for sure! Thanks
NP's
you can pass in the "previous" value as an optional param to compare for changes manually etc.
O yeah, I'm aware of that trick. But I suppose there is a threshold for change then otherwise?
Well in that instance it's up to you to decide whether the continue the function or not
Like it won't call OnRep unless a float has changed by more than 0.000x
It's just a mem compare IIRC
Ah, okay
Old != New etc.
Does anyone have some recommendations for realistic values that I could put into the packet simulation settings? Thank you!
[PacketSimulationSettings]
PktLag=100
PktLagVariance=0
PktLoss=0
PktOrder=0
PktDup=0
@silent birch did it work with all your clients? a server travel should bring the clients with it
Hello guys this should be the way to change the Multiplayer Port right?
But why is 7777 translated to 17777?
wrong video
this function is being called by anim notify. im having an issue where if multiple players are using the same character whenever the notify "reset" is called by one client it is called by all
does anyone know what im doing wrong
i cant figure out how to keep the functionality but also make sure the notify only fires for the character using it
No server travel is working so that an action to open a level is executed only at the server @ocean geyser
Okay so i did something ... I have a dedicated server and client setup. Before, when i spawned the unit for the client and possessed him on the server, the client would be able to 'move around' immediately like it would fully connect and rep the unit to the client within a second. I did -something?- and NOW, after possession the client is like locked into place and can spin but not walk. The client basically loses connection to the server for like 30 seconds (network freeze?) then the message 'WARNING createsavedmove hit limit of 96 saved moves' appears and the connection succeeds and then the client can move and everything fully starts repping
wtf is going on? is my server like trapped doing some crazy heavy loops ? why is the network connection freezing / not repping the unit stuff to the client for all that time? how can i profile it. I know how to profile the client but not a dedicated server (no console)
actually a server travel will take the clients with it to the new level, guess its different when executing through blueprint
But I want to do that when the server opens a level qure it does not affect the server, so how make ? @ocean geyser
what do you mean
Because when the server is open the level usually opens to all clients, so I want to prevent that when the server opens a level that this level does not open at the clients @ocean geyser
So how make?
may i ask what your goal is with that?
if thats the case then you dont want to use server travel, however im not sure how exactly to make a server load a separate level while the clients remain on the same level unless you want to load the level on the server and force clients to do a client travel to a different level
Open a level but it does not happen to clients
know a client is traveling to a different level
@ocean geyser
read what i said above unless i missunderstood
It is mandatory that when a server opens a level that it also produces at the clients?
afaik server travel will always take clients with it, if you want a client to load a separate level you must use client travel
So there is no solution @ocean geyser
theres always a solution, just wait for someone else to suggest something
OK
Is this normal for Seamless Travel?
When switching from one level to another, if there is only 1 player (listen server), AGameStateBase::AddPlayerState() will get called twice?
One gets called during SeamlessTravel FlushLevelStreaming and the last one gets called SeamlessTravel finished in 0.13 seconds.
Seems kind of tricky to understand and work with.
And also, the PlayerState from the old map will be passed in for the first AddPlayerState() call.
So how make?
that could be how its passing the previous player state to the new level?
Yeah, I assume it how the PlayerState does it's CopyProperties stuff, but still seems kind of wonky.
don't assume, breakpoint it and examine the callstack
you can attach VS to a DevEditor standalone
not perfect, but good enough
OK
there is also a TravelMap along the way
Alright, Zlo. Let me just see if I can find the call hierarchy first.
So a parameter in the player state that manages that?
nathan their talking about something else
Who? @ocean geyser
their discussing floss's question
Who was talking about something else?
both Floss and Zlo
OK
as for your question, unreal does not support server and clients being on different persistent levels
only way you can have them on different levels is to not have them connected
So there is no solution?
think its possible with spatialOS?
Or maybe you have the wrong problem
My problem is really that I envy that when the character dies a level opens or a widget that creates
What is SPATIALOS @ocean geyser?
he was trying to open a level called main menu earlier with his server travel, are you just trying to kick the client back to the main menu when they die?
its middleware for distributed dedicated servers
$$$$$$
its neither free or even remotely easy to use, so you can scratch that off your list
How would i set the player index for a dedicated server?
for local multiplayer im checking controller id and setting it based on that
but for online play im not sure how to check
how to check what?
player index for new players
create another array on the game state, the game state already has a player array which holds a bunch of player states, have you looked into that
using GetPlayerController[index] on dedicated server will almost certainly break things
No if a player dies even if it is the server @ocean geyser
or you can manually set it in PostLogin in the game mode or the handle new player whatever function
i did this for local multiplayer
@silent birch ok what exactly do you want to happen when a player dies, be specific
what is that array called though
that for PlayerStates, and its unordered
Open level @ocean geyser
@silent birch What you need to do is, learn how UE4 works, and then design your project based on that. There is always a solution, a trick, to get things to work like you want. The hard part is knowing how to trick the engine - this is why you should spend some time with simple projects first.
Multiplayer is to be avoided when beginning
Seriously
you'd need to do it from GameMode->GetNumPlayers->For(0 to NumPlayers - 1) if GetPlayerController[index] == ControllerForComparison -> SetPlayerIndex to Index
@digital barn Not talking to you
@bitter oriole ahh i got you
note: any use of using PlayerController indices on dedicated server is a terrible idea
@silent birch what level are you trying to open? previously you tried to make it load a level called MAIN_MENU, your not saying what exactly you want to happen, why do you want it to open a level, what is the level going to be for? we need information so we can suggest other options and how to go about doing them. but yes like Stranger said you may want to step back and learn more first
@winged badger so for online play i shouldnt be using anim notifys to call functions on the character?
you can, but that is tricky to sync properly
UAnimInstance is not supported for networking
I just want to open a level when the character dies @ocean geyser
best go with Montages for multiplayer
then simply do
open LevelNameOrPath
in your execute console command node
@winged badger i use montages that fire anim notifys
But when the server dies then the level will open at everyone's home, which is bad
@ocean geyser
as long as those montages are synced, it will work
@silent birch check if the player has authority(meaning it is the server), if that is false (meaning it is the client) then do Open LevelNameOrPath so only non server players will have a level opened
What sense does it make to stay on the server with other players after dying and being in another level ?
Think about that
Is it a disconnection ? Then just go back offline
Is it a new server ?
Is it a new area of the same server ?
All of these work in UE4
I did not understand the, what text put in the execution of the command @ocean geyser
Stop thinking about nodes and think about the design of your game
Not disconnecting from a session and opening a level
what level
Main menu
Yes
Levels are everything in UE4, changing level is not to be done lightly
......just disconnect the clients from a server when they die and use a dedicated server or check and see if the player is the server OR if the player is not the server then disconnect them when they die. if all the players are killed then make the server host open the main menu level since no clients remain.
literally can be done with a simple authority check
But when the server dies it is also necessary that the main menu opens.
then dedicated server, or force only the server to open your main menu widget
and disable ingame controls and such
So destroy session and execute command or open level?
No
Oh god... I figured out why my clients connection was lagging like hell for 30 seconds
There is absolutely no need for any disconnection or level change
Just open the menu
On the same level
I was repping a 100 element array with a giant struct inside
Giant struct meaning like structs inside of structs
don't do that
When I only created a widget at the death of the character, the level of the game is always displayed behind the widget
Lol.....
then show a black background or something. just think dude
I refactored it to just a string and a bool like it was supposed to be now it's amazing
Should've used the netprofiler, for next time.
The string is then looked up on the client to retrieve the struct in a table ... Derp
@ocean geyser OK
Making a multiplayer game for your first use of UE4 is an uphill battle you definitely won't survive
I go try @ocean geyser
So far so good lol
I've made multiplayer games w jme3 programming the net code in Java from scratch basically
Been programming for a decade pretty hardcore , built a crypto mining pool and miner from scratch that ppl use all the time rn
That's mainly a comment for @silent birch - try something simpler first. Learn to crawl before facing off with usain bolt
My first game was a labyrinth game but I did not finish it because my pc was wasting
With of the IA
So, like.....
Finish a game
A simple one
Multiplayer is a tall order to even experienced game developers
Yeah seems like the hardest part is really scaling up effectively to lots of ai NPCS and players at once. Staying extremely skinny and micromanaging network data like a fiend
Ppl are complaining that wow classic is too laggy lol
Just goes to show how hard it can be
The hard part is getting any MP game working honestly
especially if you get distracted with premature optimizations ๐
Oh I got mine working! I have a lot of webdev experience so that helped.
And I even added client side prediction which was a real mind blower
The potential for bugs is insane
And race conditions lurk in eery corner
client side prediction is gonna be a struggle for me
have little to no knowledge with that
mostly done local multiplayer
Yeah and then after it works barely you have the other 80 pct to go loll
tbh thats a feature you could spare the money and hire somebody for
Not really
Basically my client side prediction is only on my spells system , for the most part. Item system waits for the server and shows the little spinny overlay like Rust
Multiplayer creeps into the entire game, stuff like physics basically rule out MP, it's not something you just put back in
And it's really no more complicated than ... The casting client runs a special method right away that spawns his spell actor for himself and he DOESNT spawn it when the server broadcasts that all clients should. But there's a lot more to it
if u want easy prediction just use gameplay abilities system
Is that considered easy?
Yeah I bought an ability system from the store and heavily modded it . Like it's basically totally different lol but it was nice to have the beginning structure for sure
Its always easier to change something than to start from nothing
I believe Brian is talking about Epic's Gameplay Abilities System. In case you didn't know of it.
yeah it provides client side prediction. they used it in paragon and fortnight so it's pretty solid
link?
High-level view of the Gameplay Ability System
It's not particularly easy to adopt IMO, but it is useful if you're making a particular type of game.
theres also a channel in this server where peple talk about it
where do i get the plugin
just follow this tutorial and itl teach u
It's in the engine, just need to enable it
High-level view of the Gameplay Ability System
They have a whole content sample that uses it now (ActionRPG)
Not setup for Multiplayer though IIRC
Because of course it isn't
GAS is pretty great but I've observed it is somewhat c++ heavy. It is fairly well optimized in my testing and it has been available long enough for a good number of sample projects to become available
The devs are actually working on it a lot right now. It hasn't had very many changes for a while but they are working on improvements as well as incorporating it into their new NetworkPrediction plugin which will also eventually replace the prediction logic in CMC.
I'm working on a multiplayer game using GAS with a goal of supporting 200 players in one area. I've done some (limited) testing with AI controlled players and the biggest bottleneck so far has been on the client-side in the game thread. Specifically, the CMC and updating skeletal mesh components (animations mostly)
I took advantage of some of the optimizations in the mesh and was able to cut the FrameTime in half which is well within my target
What other performance issues have you all come across in multiplayer which I should look out for?
the official docs kinda suck
this exists tho: https://github.com/tranek/GASDocumentation
check the pins in #gameplay-ability-system
there are a lot of resources there
also, the new network prediction plugin only handles the case where we are modifying movement with GAS
currently, CharacterMovementComponent fights with basically everything to do movement abilities, which is kinda gross and not idea
so they are fixing that
prediction and networking for literally everything else works fine out of the box
oh ok, there is a line in the link that says Long term we hope this replaces UCharacterMovementComponent and its networking system (ServerMove, ClientAck*, ClientAdjust*, etc) so I figured it would go beyond GAS
it does
network prediction replaces the networking code in CMC
added bonus it lets you predict a lot more movement stuff
personally, i really hope it just works with root motion
same, been broken for a while now
because root motion is so useful and the fact that CMC and root motion do not get along is annoying and not helpful
yea, i'm implementing a 'sprint' ability now using GAS with predicted stamina drain, using the GASDocumentation project you linked above as a key reference. It would be nice if I didn't have to fight CMC to make it work so I'm looking forward to this new plugin
has anyone else solved the issue of rotation lag/movement lag? the jitter..
I don't understand @tribal plover
The rotation lag is awful.. Have tried all the different method implementations and cannot give rid of it
Shouldn't be any rotation lag with character movement, provided your using the built-in rotation options
I mean, it'll lag for third-party viewers, but it smooths out where possible.
Clearly you say that for example when a character looks to the north the other players see him go looking south? @tribal plover
its more of a jitter
are you just replicating movement/rotation?
yes
what exactly are you trying to do with it? naturally that will appear laggy(the jitters you see) for clients. for example if you have a door open/close just by replicating its rotation, it will stutter as it opens/closes, but if you make a function that multicasts or is fired via OnRep that opens/closes the door so the function is running on the clients then it will be smooth as butter
we were doing it all through physics now went to the character blueprint because it had some automagical stuff but are seeing the same jittering
this is a hover tank game @ocean geyser
so the tanks movement is what is jittery?
yep
If you are manually setting the rotation and not using control rotation or rotation follows velocity etc, then yeah it will jitter.
The built in prediction/replay doesn't really account for that
I have this problem but only when the character is in the draw position
I've also noticed jitter if you set your tick rate too low
Sounds like there are a lot of potential causes though
is it a bad idea to use rep notify object arrays?
I have an array that receives objects built from a class, but it takes time for the objects in the array to be valid
would it be possible to make a copy of the array, add to it, do your valid checking, if its valid then change the original array?
When I'm making things I find that I'm always needing a replicated random integer. Where should I put the logic so that I can easily retrieve a replicated integer from any blueprint? Gamemode?
@cedar finch gamestate would probably be best
@ocean geyser Ok cool. ๐ If this works it will save me so much time. I'm making puzzles and I always need random integers. Thanks
Noob question: Join session is firing successfully, no errors in output log, etc, but on my client, nothing happens, and no Login event fires on the server...
nevermind, issue was that i was not reloading the map after creating the session
That's a great idea, actually. I'll give it a shot in the morning @ocean geyser
You meant setting the rep notify variable after it has been validated locally right?
before altering the rep notify array, make a copy of it, do all your checking/altering on that copy to make sure its valid, if its valid then set your rep notify variable to equal the copy so when the clients receive it it is complete and valid
I need help plz
I want to connect 2 android devices in the same WiFi router network
One device is host second is client
But can't join the host device
Any useful idea or tutorials
Thx
First off you should describe more detailed what you are doing and at which point it fails.
Second you should try to get access to the Log files of both Server and Client and check if they tell you anything.
Is there any way to determine when any variable has been replicated from server on an actor? C++
I know I can use ReplicatedUsing, but hoping for a more global approach to the actor.
Well you can reuse ReplicatedUsing functions in C++
You don't have to make a new one for each
But despite that, there might be some Post Replication functions, but wouldn't know out of my head
I can maybe do it in Blueprint, we use the node is replicated @flint rose
Not really
On another note: Anyone had incosistent results with Session Filters?
Filtering for GameModeName works, for MapName doesn't.
Both are setup the same way and I printed both Settings and Filters on Host and Client.
SessionSettings.Set(SETTING_MAPNAME, HostOptions.MapCycle[0].ToString(), EOnlineDataAdvertisementType::ViaOnlineService);
SearchObject->QuerySettings.Set(SETTING_MAPNAME, SessionFilters.Map, EOnlineComparisonOp::Equals);
This still returns a session even if SessionFilters.Map has a different Map in it than HostOptions.MapCycle[0]...
Will filter in the UI for now, but still kinda shit if you want 50 Level_XY results and you get 50 of all levels
aren't those just strings stored in exact same way?
@winged badger Sorry?
session data, isn't the way it stores the GameMode exactly the same as it stores any other session data
a string "GameMode" or "Map" paired with another string that identifies it
When I was on two PCs, and one was creating the session, the other joined it. To create a session it works well but when a player looks for a session he can not find, but trying on the same pc it works very well
@winged badger Well yeah, it also works for the gamemode, just not for the map. It's both the same custom setting,just different keys and values
Filtered it locally now with the same stuff i send to steam, so something on steams end does shit
My game does not use steam
No steam = local-only sessions
If you want an online session system, the only one that's available is Steam
Yes I used the plug-in online subsystem steam, how to use steam?
So does your game use Steam or not ?
Yes I used the plug-in online subsystem steam, how to use steam?
Is this the case on all game creation engines?
Yes I used the plug-in online subsystem steam, how to use steam?
When I test my game with a pc I do not use steam
And it works
You need two Steam accounts on two PCs, both starting the game
That's obligate on unreal engine 4 ?
Look, I have no idea what you want to do
If you want to use Steam for sessions, on any game technology, you need to do this
Both accounts need to be paying accounts too, IIRC
Or at least to invite friends
OK
Again, multiplayer is hard
OK I know
Someone told me that for an online game, we can do without steam but he does not know the other method @bitter oriole
Of course you can do without Steam
You just need your own matchmaking service instead
It's not easier
So I have to create it alone?
No, you should use Steam
Creating your own matchmaking service is as much work as creating your game
OK
So I'm going to use steam @bitter oriole
thanks
I never used steam, how do we use it?
Even in real life I have never used steam
๐คท
I can't explain years of work to you
And you don't need to tag me in every single question
Ask simple, clear questions and everyone can answer
For the record, again, you should focus on a simple single player game
How do you play a game on steam, not your game
You click "launch" ?
How about you take these questions to google
At this point we are talking about fundamentals
If you need more specific work, please consider hiring someone via #looking-for-talent
OK
I have this multiplayer project that uses Find Session to find other people's listen servers. When I run it in PIE with 2 players and no dedicated server, I am able to find sessions. However, when I package it and play it from 2 different folders on the same PC, it will not find servers. How can I fix this?
What online subsystem are you using?
@jolly siren hold on
I have Online Subsystem Steam in DefaultEngine.ini
Also OnlineSubsystemSteam is enable as plugin
@jolly siren
You need to use 2 different machines if you are using steam
As well as forward the appropriate ports
But I am just following the blueprint multiplayer tutorial of unreal?
Does this affect finding seasons even if stream has nothing to do with the find session blueprint function?
If you use Steam as OSS, you need two machines for sessions.
Also if this is a Shipping packaged build, you also need to launch from Steam
So if I have the steam sub system plugin in enabled,I will always need 2 machines?
alright got it
do i have to delete the several lines of code in Default engine ini
Ideally this would be source-control handled, like a branch or a stash or something like that.
So that you can easily switch
yeah but my project is pure blueprint so do i have to delete the few line of Online Subsystem Steam
Source control has not much to do with source code
Version control, if you like that term more
Same thing
alright good thx
btw how do you turn on notifs on discord
i sometimes go to look at other stuff and miss peoples replies to questions
Multi-User editing is lit ๐
https://gyazo.com/f783dd43ccf050222af528d66325fc3c
charge attack for anyone who needs it
but
i want to replace this get player character node. i dont like to use those online make problems for dedicated server. anyone know what i could change this out with so the cast wont fail? its in an anim notify
I'm trying to create a mock game mode that creates mock information for players. But it doesn't seem like a USTRUCT is replicating properly.
BasePlayerState.h
UPROPERTY(replicated, Editanywhere, BlueprintReadWrite, ReplicatedUsing = OnRep)
FCharacterModel CharacterData;
BaseMockedGameMode.cpp
void ABaseMockedGameMode::PostLogin(APlayerController* NewPlayer)
{
Super::PostLogin(NewPlayer);
CreateMockDataForPlayer_Implementation(NewPlayer);
}
void ABaseMockedGameMode::CreateMockDataForPlayer_Implementation(APlayerController* NewPlayer)
{
ABasePlayerState* PlayerState = NewPlayer->GetPlayerState<ABasePlayerState>();
if (PlayerState) {
FCharacterModel CharacterModel;
CharacterModel.id = "Mock_Character_" + FMath::RandRange(1, 9999999);
CharacterModel.agility = 1;
CharacterModel.level = FMath::RandRange(1, 5);
CharacterModel.experience = FMath::RandRange(0, CharacterModel.level * 500);
CharacterModel.maxExperience = FMath::RandRange(CharacterModel.level * 501, CharacterModel.level * 1000);
CharacterModel.magic = 1;
CharacterModel.name = "Character" + FMath::RandRange(1, 99999);
CharacterModel.strength = 1;
PlayerState->CharacterData = CharacterModel;
}
}
BaseMockedGameMode.h
UFUNCTION(reliable, Server)
virtual void CreateMockDataForPlayer(APlayerController* NewPlayer);
why cant i see the projectiles that are spawned from clients pawn?
if servers pawn spawns them, i can see them on clients but not the other way around
make another function
make it cast from server
make reliable
run the multicast from the server function
Only server needs to call it if actor is replicated
Then why not make it replicated? @.@
cuz theres so many of them and they are choppy
only way server will see them is if you replicate
@flint rose
https://gyazo.com/f783dd43ccf050222af528d66325fc3c
i want to replace this get player character node. i dont like to use those online make problems for dedicated server. anyone know what i could change this out with so the cast wont fail? its in an anim notify
cant i just spawn them on all machines?
You could, yes.
how do i achieve that?
It may be your collision override.
Since you're spawning it at actors location, it may not be spawning because it's blocked.
that is not the case
And you're sure this is being called?
I believe if a NetMulticast is called from client, it will only be called locally as well
Let me double check that.
So I don't really want too make a specific game... I just want too mess around with databases and networking. Fundamentals like using the engine is something I already have. How do you securely connect to an external Database without using bp?
There are several ways to do that, you can use an HTTP server, I believe Online Subsystems have something like this as well for storing data.
What is most comonly used in the industry?
Yes, Ue
Couldn't tell you what the industry uses since i'm not a part of it
Yes. You can store player data, inventory, etc.
There's also Epic Online Services
But it's still in the works.
I guess you need a unique steam app id to gain access that features.
Oh okay, I didn't know that. I really need to look some stuff up about that then. You got a good link for me for Steam.
It's a little difficult to find. I had to watch like 4 videos to get it successfully in my game lol
But then I decided to try and mock everything, and now I'm stuck lol
@flint rose how would i spawn projectile actor for all players from client?
do i spawn it from gamemode?
Spawn it only on the server, make it replicated
but its choppy if its replicated
id like to spawn it on all machines (as a decoration)
What's the difference between doing a multicast and replicating it? Either way a packet has to be sent from space to the other client.
RPC has overhead, and better to be avoided. Also RPC can be blocking (reliable) which may cause some net issues if a packet is stall or lost i think. Better to replicate values instead and use onrep events..
what values for instance? bullet position in space?
It has a Projectile Movement Component which also gets replicated.
And now you have the added effect of the server owning it, which is better for security
When it's replicated to clients, it will all of them this information
will give*
i just want to spawn projectile from client, on all connected computers, as my projectile actor will not be replicated
do i have to multicast spawning from gamemode for it to work?
faxcorp you always spawn on server first, and allow the actor to replicate itself (auto spawn on clients). The projectile may not be a good idea to be replicate movement tho that can make it look choppy i guess. Better to allow run freely on all clients, but only consider Hit Events on server for health stuff. Clients can show particle effects / sound etc tho using hit events.
thats what im trying to do
It's like a hybird method that allows certain autonomy for clients to do some visuals of that projectile, but server is the ultimate decision maker regarding player stats
how do i spawn it from client on all machines?
multicast from client does not work
Create an onserver event in player controller, that the client will call. The method will spawn the projectile somewhere down the line (depends on your game design which class will actually spawn but you can add it to PC for testing just fine)
Incase someone apart from me is interested https://partner.steamgames.com/doc/features/inventory
Have you tried spawning it on server and replicating it?
What do you mean by that?
velocity of projectiles is too high to replicate efficiently
Dont replicate movement. You maybe have to disable the replication for the trajectory component too.
I feel like it being "choppy" can be fixed easier then it not spawning at all.
It's called trajectory comp or something similar.
i want to spawn projectile from client and then a projectile-effect on all machines connected
Okay, well, I've given you my solution. Good luck.
thank you
Anyone have any idea why my USTRUCT isn't replicating? Code above
Hmm, actually the server doesn't have the values I'm setting either. That's very odd.
https://gyazo.com/f783dd43ccf050222af528d66325fc3c
charge attack for anyone who needs it
but
i want to replace this get player character node. i dont like to use those online make problems for dedicated server. anyone know what i could change this out with so the cast wont fail? its in an anim notify
ustructs must define uproperty() for props that will be replicated, otherwise they wont
USTRUCT(BlueprintType)
struct FCharacterModel {
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite) FString id;
UPROPERTY(EditAnywhere, BlueprintReadWrite) FString name;
UPROPERTY(EditAnywhere, BlueprintReadWrite) FString characterType;
UPROPERTY(EditAnywhere, BlueprintReadWrite) FString userId;
UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 level;
UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 strength;
UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 agility;
UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 magic;
UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 dexterity;
UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 experience;
UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 maxExperience;
};
You did put it in RepLifetimeProperties (or whatever it's called), yeah?
Hehe
i didn't read all of that convo because goddamn but @shrewd tinsel the local shooting client can spawn a decorative bullet locally, send a reliable RPC to the server to spawn an unreplicated but authoritative bullet (i.e. it actually can cause damage), and then the server runs an unreliably client RPC telling everyone to spawn local decorative bullets (the shooting client should ignore the RPC). this is what i'm doing. it works fantastic for low-RPM guns. for high-RPM guns (miniguns, MG42, etc) sending so many RPC's may be a bad idea, and you instead want to replicate/RPC whether or not the client "is shooting" and let that replicate across the network for everyone to spawn FX locally
It would have been nice if UBT warned you.
I get so much in my output since I changed to engine source.
Every other console output is something about GIT
nobody got any ideas?
grab owner. mesh owner is pawn you get the player that way too
the player index can be different for remote clients wont be 0
yeah thats the problem im getting
i tried to get owner but it doesnt count as a mesh comp
use owner then, it will be the correct player who plays the anim
it doesnt count as a mesh comp what do you mean?
it says
Skeletal mesh component object reference not compatible with actor
object reference
pull a wire from the mesh pin type in owner and that's it
you probably put there a get owner of actor which expect an actor input not component
yes the node says "target actor" but you need another version that target components instead
do as i say
Gud
Remember this and update rest of game code to rely on component->owner relationships for resolving character etc. This is better than asking for player by index. Same goes for PC.
yeah ive been switching all the player character nodes out to get ready for online play
had no problems with local but first time making an online game
so just trouble shooting everything
next up is learning to replicate components outside the character BP
have some montages that fire off from component also my weapons equipping and all of that
its a process
so i have been trying to make my own multiplayer game (MOBA) , i have set everything up and it work fines on multiple sessions connected together, i want to make a dedicated server with a small lobby and matchmaking and how i could make the whole thing run on a cloud service, does anyone here have any recommendation on where i could grab the necessary tutorials or guides on what routes to take, or someone who i could speak to regarding this
amazon game lift
without using any 3rd party solutions like amazon gamelift or SpatialOS?
i am planning more of a running the dedicated servers on an EC2 with multiple sessions?
Then you'd need to do yourself your own management service to start ot stop dedicated servers and transfer sessions to them
that sounds like a lot of work
It is
Dedicated servers are a nightmare for indies
Best to nope the fuck out of them until you're a millionaire
Then you can hire the entwork team you need for that
Amazon gamelift good enough for me haha
Still a nightmare but well, if you can afford it
Just hope your game doesn't need one of the $0.5/hour servers
amazon (and probably most cloud services) has scripting option that can be used to fire/stop ec2 it should be rather basic with a nodejs instance managing. but there is more to it, amazon has all those fancy services for auto managing networks of nodes i think. hard to remember all those things, but everything costs more and more.
amazon probably not the best for startup games easy to run out of funds
Using one of the decent servers on Amazon you'll shell out $0.1 per hour of play, so if every player has 16 hours on average and you have 8 players on each server, that's only about 0.2 dollar
None of the Cloud Hosting Services are cheap
None of the on-demand services are either
Of course if your average player has 160 hours, that's $2 lifetime
In reality it's more expensive because it doesn't scale that well but basically calculate it
The problem is that a lot of people don't realize that:
- They might never have players for their game, yet they plan on having enough to finance servers and their rent.
- They probably don't have the money to finance the servers and game over multiple months before the game gets the amount of players, so back to 1.
every player has 16 hours on average i've seen people playing 24h on twitch but average should be less than that. Like a half or quarter of it i think.
Average of a MP-only MOBA might be at around 20
- They probably don't need dedicated servers anyway.
That's the thing though, they cycle themselves into needing them
@thin stratus there is also a rather high chance that the players will play the game for a month or two (10ks) then they will be gone, so scaling down will be the solution. but the chance is really there to have players.
if you build your game correctly by the time your game drops you should have a small playerbase day 1
Might not have enough players -> lets make game free for bigger playerbase -> we need to earn money, maybe customizations? -> then we need to stop players from cheating -> dedicated servers
"should"
and also if you are dropping advertisements before you release
If everything would work that way, we would all be having a lot of money :D
Generally though, I think it's a terrible idea to do a MP-only indie
You start not with a game that requires cloud servers
kickstarter is a good one for advertisement, tho not the only and not the best probably
Plan for 500 sales and you have a 50% chance of not being disappointed
Make a game that runs offline or on listen servers. Sell it for a flat price. Forget about all the competitive stuff, the dedi servers, the microtransaction.
been done
Will save you a lot of pain
lel why does everyone on the multiplayer tab of this server just tell everyone not to do multiplayer
Because we've done the multiplayer, we know the numbers, we know the shit show and that it's not worth it if you are small/indie studio.
I literally just had a client that went through this. I know the costs. It's bullshit. They never want to go that route again.
You can do Multiplayer, just not DedicatedServer -> OnDemand Cloud Host stuff.
playerbase is already there
Anyway, if you're smart, avoid dedicated servers
I mean you can even do that, we just warn.
Mostly we just yell at people who know better than our dumb asses. What does Cedric know about multiplayer anyway.
Exactly. Luckily you never hear of all those smart people again.
Yet, look who's still here :D the dumb-asses
lol not what im saying
Don't worry. It's been the 100time we talked about this. Just being tired of it.
It's not like we want to talk down other peoples ideas. Just help, but well.
Honestly I do have little experience with MP, since I only shipped two multiplayer projects
Plenty of people here know much better
Just, like, my $0.02
I think it really comes down to skillset. It doesn't seem right to generalize saying no indie studio should do cloud / dedicated. If your team has cloud experience it is doable. It does seem like teams should be cautious if they have no experience in the space
Let's just say if you haven't shipped it before, you probably should be poking the ground in front of you before running on it
lol im not setting any of this up for a long time. i just want it to be working for when the time comes
and also to practice for the future
@split drum To be fair, would a team with cloud/dedi server experience come here and cuase this discussion? most likely not.
the main focus is having code that works both on local multiplayer as well as dedicated server
I guess time will tell haha. I am solo working on a multiplayer game right now, but I have also architected and shipped large cloud projects. Maybe it is a bad idea, maybe not
I come and ask because i need the ue4 aspect
but for sure, it takes a long time to get that experience and be effective
If your game supports both without taking anything away from the player, then sure, go for it.
If you can make a local, listen, lan, online, dedicated server game, sure.
I'm working on a multiplayer game right now, cooperative only and playable solo - think that's great value for players with much less risk and cost.
Most games that need DedicatedServers + Cloudhosting can't affort anything else, cause they do this to prevent cheating
thats the goal of this project
might never release it online
but i still want to be able to do it
so practicing it doesnt hurt
and marketing it doesnt hurt either
Only thing I'm saying is: Don't plan on a game that solely uses Dedi/CloudHosting cause it costs money and might never work out.
And it's a shit show if you haven't done it before.
Game is mainly story/local multiplayer. just interested in being able to network
Just general advice for peeps that get this random idea. Also don't do MMORPGs, thanks
all fair points
i can see it not working out most of the time without some kind of past experience. There is just too much to learn
@split drum But yes, I know we shouldn't technically talk down people, but they mostly also don't really see our point when we explain it.
@split drum the same couldve been said about learning Ue4 in the first place though
if you want to learn it
failure is the building blocks
More importantly and I think that's the most crippling mistake you can make : do not make a game that sucks when literally no one else is playing it. The rest is all fine.
Saying this because well, 50% of Steam games are just that.
@digital barn agreed, but i think that assumes an unlimited timeline. Have to cut scope if you have milestone targets
"Yeah I can do it. I know. I can pay that. Or I make my own. Easy peasy. Yeah I don't listen to your experience, I know it better."
That's the general answer you get if you tell a person that their idea might be too much.
:D don't take it personally then
still looking into possibilitys
I also only really fell into this discussion today cause I'm not sure what I should play this evening.
i think it is fine to be ambitious, and with unlimited time I believe most things are possible, but if experienced people raise valid concerns about the feasibility of my project i'm definitely going to listen to what they have to say and adjust my expectations
i mean we never really expected to drop a huge online game anyway. but if the game gets enough sales as is then why not
It's important to be ambitious, but it's equally important to consider that any shred of over-ambition kills and maims game projects.
anyway ill be back on later guys
my project is going to be pretty bloody then haha, but i've always been hard-headed
There are some non/marketplace stuff for mmorpg making, with tutorials to teach people about essential use etc, some goes much further. But it's teamwork and difficult stuff indeed, exi is right.
Our current internal project is pure singleplayer. Mainly cause I don't want the extra iteration time of multiplayer in it.
makes sense, iteration time is one of my biggest focuses
on all my past projects iteration time has been key to success
Exi play your internal project and mark bugs. Time well spent. :)
New office will have a gaming room just for that
you have an office? sounds like luxury
:P Well, companies tend to have that. Also this is turning offtopic now.
Go and call your rpcs reliable on tick or whatever nice things we all do
I would never do t... shut up !
for local multiplayer is client side prediction even needed
ive heard its useful but my last project was fine so i thought so
figured id ask anyway
for lan game you can mark your cmc to be client authorative and it wont predict
prediction is for online game rather, and you want them to be server authorative anyways
@digital barn hows the pricing liek on Amazon gamelift
Google it ๐
Wildly dependent on your game
Anywhere from $0.02 to $1.5 per hour
i see alright
Simple question I'm probably just thinking of the wrong way; If you're using events like beginplay in the playercontroller, I noticed they fire on the server too. Does the copy of the PC on the server catch all events like that? And is there a better way of making sure its only running on the client than simply doing Role < ROLE_Authority?
PC only exists on server and autonomous player, you can check for role == role_autonomousproxy if that's what you mean. But either way beginplay of PC expected to run server too.
Mispelled :)
how would i go about replicating my BPCs? or is it about replicating whats inside of them
You can enable replication for components, and you can either spawn them only on server (then wait on client until they replicate) or add them in editor and they will communicate just fine
Okay Robert, didnt know if there was a better way of doing it. Will the server catch other events too or do those only trigger on the owning PC?
Just wondering if I should be doing role checks all the time
Server version of PC running pretty much the same things, it is up to you to make distinctions between logic where expected to run.
Is that makes sense?
Yeah, I think so, thanks ๐
Im having a weird issue with my equipment BPC and montage BPC that runs my AI'
s montages
i ticked " replicate component" but still the same thing
I also do many role checks its kinda expected to happen. But you can always make client only methods for wrapping up long function code etc. If that looks better for ya.
are BPIs also replicated?
You can replicate them as properties, and perhaps add them to rpc too. Guess it makes little sense doing so, they are abstract stuff anyways. You can replicate the actor/component/uobject using it instead, that more useful i believe.
hm well what do you think the first thing i should look at is if the component isnt replicating correctly
im out of ideas haha
looking for docs on it
Check the owning actor is also set to replicate
Maybe it is not
Replication direction is also a rather complex topic. You can most likely call multicast events in either case, but server rpcs require specific chain of setup, like pawn owned by pc and stuff like that which only happens for local player.
yeah its set to replicate
You can try in actor pull a wire from component pin and enable with "set is replicated" node.
At beginplay or constructor whatever works
Is there a safe way to detect what number player a "Starting New Player" is to the server? Iterating an integer seems has edge cases where it doesn't work.
on GameMode there is a getter called Get Num Players
that might do the trick, as it should increment every time a new player connects
if the edge cases also persist, you could probably throw every PlayerId from PlayerState into a set, which guarantees uniqueness, so its length should == number of connected players
awesome, that seems to work much better, thanks!
hi, how can i get other player stats in my ui?
how can i access other connected players class?
how do i get playerui class variable from player bp?
The stats are given in a component?
yes
i mean i hvae declared few stats like hp and mana
i kept it as replicated
but how can show that on ui of client player?
You are trying to "inspect" other players stats?
Like, player A looking at player B's stats
If your gamemode is storing references to all your characters or controllers, you could probably just have the ui ask the gamemode for the "get component" on player B's pawn
I guess it depends on how your game needs the stats
If your game doesnt change the stats during play, you could just save them somewhere and access them whenever your UI needs them
fcukk..
fixed it
i was doing like u said
turns out
i am setting visible state for the popup
i was just setting number T_T
at least its working ๐
How to do that when the server opens a level that this does not happen also at the client
?
You can't
It's impossible ?
In UE4, when you are connected to a server, you are on the server's level.
That's it
By using the destroy session node when a player dies, he will no longer be in the session. Because I'm scared if it's still and the server opens up a level
You should open a new level on client when the session is destroyed (since you'll disconnect from the server)
I am looking to play with someone online on steam, how to do?
Not on my game, but with a game that was not created by me but by someone
I have an Animation Blueprint with a variable play rate. I created an input action that lets players pause/resume the animation by setting the play rate. How would I get this to synchronize between players? I have set the variable to be replicated but that does not appear to do the trick
Hey guys, what max lag or lag variance do you use to test your game in edge case network scenarios? Is it reasonable to test with 500ms ping and expect that at higher ping visual glitches like things popping/going thru walls can happen (without breaking the game)?
Hi anyone here have experience with multi session Dedicated server solutions? Currently ue4 dedicated servers only run single session (1 map/game at a time). Are there plugins or other solutions available to allow 1 dedicated server to host for multiple sessions of players?
@tribal shard instead of changing anim play rate change custom time dialation for the player using the animation
0 the animation will completely stop i used the same method for charging attacks
@digital barn this?
@tribal shard yes
Ill try it, thanks
got a quick question also if anyone is around. regarding to BPCs
@keen thorn you don't need a plugin , there's a guide
anyone have tips for Replicating blueprint interface functions?
Hey Luck,
Im pretty new to UE but I didn't have many issues getting my interact system working multiplayer which uses an interface system. Which error are you having?
My ai has montages that play from an interface event but i cant seem to get them to replicate on the client
Interaction Event -> Server -> Multicast Play Montage not working?
What is calling handle hit server