Rewind of Players death in Unreal engine - unreal-engine4

Can anybody suggest me how to make the Gears of war style like death? i.e, when players dies they show the rewind of how the player dies.

Unreal has a very handy tool called Replay System that allows exactly this. You can check the official documentation here.
Though Multiplayer is not technically required, your game must support replication. This system supports Streamers who want to be able to use those replays to generate content, but you can stop the recording when the player dies, use the last 10 seconds (for example) and then discard it.
The commands you're looking for are UGameInstance::StartRecordingReplay, UGameInstance::StopRecordingReplay and UGameInstance::PlayReplay.
Basicly, you're doing some Client-Side demo recording.
Please let us know how it goes!

Related

How can I sync local movement to Photon Network in Unity?

im making a multiplayer FPS game, and I have pretty much all the networking done and working. The issue is, that photon is syncing to players local movement, but if u have a bad connection, you could not tell it is happening cause player send late updates to the server and you can see other players lagging but you can move free and smoothly.
Im aware a lot of games work this way but i also know there are games like medal of honor that your player get stock in the last place every one else saw you. I need to know how to implement this on my game, because gameplay depends on it.
What you describe is "local prediction" of actions / movement.
If I understand this right, you want clients to not act or move if there wasn't a confirmation? If so, you'd need an authoritative host or server. You'd always wait for a confirmation from the host to move the player in any way.
But .. this is not going to work well. Players will feel the lag very much and this is annoying.
You probably want to predict the movement, then correct the local situation if the server disagrees.
I would recommend using Fusion instead of PUN for shooters. It can be run with host and has a nice API to reconcile the actual state from prediction to what the host simulated.

Event Types In Unity Scripting

i just wanna start to codding more clean and dynamic codes and i start to learn "events" but im so confused about events because all videos show different things 0.0 did i understand wrong or there are three types of events ? i mean
c# event
unity events
game events
if i understand true this all different event systems right ? and i can use which i want, and i should spesific.
i hope i understand right can someone explain shortly ? if i understand right just can say yes :)
There are UnityEvents. Usually AddListener(YourFunction)
There are Unity Events (meta, haha!)
There is an official Unity Tutorial on C# Events. Usually with the += operator: .OnClicked += YourFunction;
There is an Event System for the "Unity UI 1.0.0" Package, but there is also still the old Event System for Ui/Canvas interaction (until Unity 2018?).
There is the Event System for UI inside of Unity, if you want to build an Editor Tool, to paint prefabs in the Scene for example.
The "old" Input System (Input.GetKeyDown("Space")) is also an Event System.
But there is also a still optional, new Input System Package that handles local Coop (multiple Controllers) a bit better. You can only use one at a time. (You have to switch form one to the other in Settings)
As you can see, there a a lot of Event Systems. You can write your own, if that is required for a Task. Event Systems are a general way to handle changes without polling and comparing values every frame, but listening to changes and occurances.

UMMORG/Mirror Networking - Moving A Connection From World To Lobby

I have been working for some time on a project using the UMMORG framework, which is built on Mirror networking. However, as of recent, I have been having an issue I just cannot solve.
In my project, when a player character is killed, I want the player to be moved from the game world back to the lobby. Or, in more technical terms, for the player's NetworkConnection to me moved from the Network State 'World' to the Network State 'Lobby.'
I have tried many times, but have been unable to find a way to do this. The consistent issue is with the player NetworkConnection not being found as a key in the Lobby dictionary. However, attempts to manually add the player NetworkConnection to the Lobby dictionary have failed. I'm assuming that Mirror requires a specific process to move a connection back to the lobby, but I just can't figure it out!
TLDR: How can I move a NetworkConnection in Network State 'World' to Network State 'Lobby?'
Thank you so much for your help! I will be checking this thread as often as I can, so if I haven't provided enough information, I would be happy to provide more. I have not changed any of the netcode in my UMMORG project, so if you have found a solution for this in your UMMORG or Mirror project, I would love to hear it! Thanks again!
Did you use MatchInterestManager?
I used MatchInterestManager and attach NetworkMatch to my player script.
Whenever I needed to change player state (for example from Lobby to Game or Game to Lobby), I simply change NetworkMatch.matchID from "lobby".toGuid to "gameName".toGuid.
Feel free to leave comments, and I'll do my best to answer.

How to synchronize a 1v1 realtime action online mini game?

What I'm trying to make
Hi, game development newbie here. The game I am trying to make is fairly simple. It's almost exactly like the old FC game "Ballon Fight" except that I'm trying to make it online where players can go through a match making to find opponents.
BalloonFight:
What I Read
I have read some articles, and found most of them lead to two approaches:
Put all game logic on the client, and the client sends player inputs to server on every frame update. The server acts like a dispatcher which only makes sure player A's input is received by both client A and B. My understanding is that if we see the client in this case as a pure function, and if the two players' inputs are received by each other, the game should produce same results on both clients. Thus synchronization is achieved.
Put all game logic on the server, and let the server do the calculations and send back results to both clients. In this case, clients only worry about displaying.
My Fears
Solution 1 sounded like a simpler one to me, but immediately I realized when network problem is put into account, it becomes incredibly complicated. Losing player A's connection for a few seconds means all the input is lost in that period. What I can guess is, to counter that, the server has to detect whether player A is lagged out and accumulate input from player B until player A is back then feed all the accumulated input to player A's client. Player A's client then need to do a fast forward to catch up. This sounds like there's huge amount of infra work on both client side and server side.
Solution 2 on the other hand looks very daunting to me, since for now I have only written some games on the client side.
My questions
in order to make a simple online game like this, what is the most beginner friendly way to synchronize game state?
if I were to use solution 1 stated above, is there any framework that provides such infra so that I don't have to handle network issues all by myself?
In advance, thank you game dev gurus.

SiteCatalyst streaming video tracking and additional clarifications

we're attempting to track a streaming video with SiteCatalyst.The issue comes in as this video has obsviously no end and the s.media Module can't know how to set the seconds or milestones segment views.This is resulting in no tracking calls except for the starting one.Could a possible solution be the usage of s.media.monitor custom functions?Here's explained how to use them together with the basic Media module settings.Maybe a timing deployment of "sendRequest()" method could help...?I use this occasion to ask a brief how-to example of media.monitor methods, because I've been just using the basic settings till now, as below:
s.loadModule("Media");
s.Media.autoTrack = false;
s.Media.trackMilestones = "25,50";
s.Media.segmentByMilestones = true;... ...Thanks a lot
Yeah.. i really, really dislike the Media module. Video tracking is getting more and more popular with the clients, so it has become the biggest thorn in my side, because the nature of videos over the internet is a big mess with all kinds of moving parts internally, that make it extremely difficult to get truly accurate tracking beyond basic "start" and "stop". (actually I take that back.. I think mobile/sdk tracking is quickly becoming the thing i shake my angry fist at the most, but that's a different post!)
I think Adobe has made some heroic efforts to automate video tracking and it more or less works okay if you just have a regular (not flash) object or html5 tag embedded on the page but in practice, MOST of the time, sites implement their videos through 3rd party scripts (e.g. jwplayer, vimeo, youtube api) and the Media module automation basically goes down the drain on that count.
I understand that it needs to know how long a video is to know when to autopop the events, but I swear, 99% of the time in practice, the way Media module expects things to pop in certain orders etc.. it just doesn't align with how videos work in the real world. Even if you attempt to do it the "manual" way, more often than not it's still buggy,e.g. autoplay and buffering ALWAYS seem to screw up the open+play sequence that MUST happen in that order.
Basically, the Media module desperately needs to be rewritten to better handle streaming videos, and also just "manually" using it in general. Anyways..
Two things I have done in your situation. Overall, neither one of these options are a perfect 1:1 to normal videos with a duration, but then, streaming videos aren't really the same, so it doesn't really make sense to treat them the same.
Option #1: Use an estimated duration for your streaming video. So you said it yourself: your streaming videos have no end. Well as I mentioned, you can't calculate percent viewed unless you have a duration, pretty basic math. So, estimate a duration.
I have clients that have streaming webinars or whatever and it's true that there's technically no duration according to the player, but in reality they don't really conduct that webinar 24/7 forever. In reality it's for a set amount of time like 30 minutes or an hour or something. So, just specify the duration as that.
Yes, this will require extra custom work on your end to store/associate an estimated duration. And yes, this does have the potential for being misleading (e.g. if a webinar ends early or runs late). This option is generally good for sites that have set windows for the stream to actually be active.
Option #2: Ditch the notion of % viewed, record it as n time consumed. So the overall point of the milestones is to know how much of a video was actually watched, yes? Well, who said it has to be measured by % viewed?
How about instead, you just record n seconds consumed every n seconds. You can do this with an incrementor eVar, and/or counter event. (Part of the normal video tracking actually does include a counter event "Video Time", or a.media.timePlayed).
So basically, you'd basically just pop the events/props/eVars yourself, and ignore milestone/segment reports.
Note: This option only really works if you are using the older style video tracking that has events/props/eVars assigned for it. If you are using the newer style video tracking that does not use events/props/eVars.. well, AA does not currently offer an official way to manually pop that stuff directly. It is surely possible to unofficially do so, but I have not yet reverse engineered the latest Media module to figure out how to do that. So, in this case your only option is #1.