Thank you for providing this fantastic tutorial free for all. I have been following this video step by step and learned more than I expected. Awesome work!
Two bugs were found with your FinalProject. 1st: When I set the minPlayersToStart to 2, the game will start correctly once the 2nd player joins. However, the 3rd player will be frozen with the game start UI "Waiting for -1 more to join...". And the TeamPlayerCounter component for all clients has 0 for both BlueTeamPlayer and the RedTeamPlayer. (But the 3rd player won't have this problem if he joins before GameStartTick) 2nd: If there are more than one player. The host's abilities UI for Q and W will not be on cooldown correctly. Also, the host's abilities cooldown UI will be on cooldown if the 2nd or 3rd player casts a spell. This only affects the UIs, the internal cooldown is correct for the host or clients.
So for anyone trying to do this in later versions (0.5,1.0 ...) the archetype needs another type PhysicsWorldIndex, yeah I know johnny commented the same thing, but just gonna comment this again since I just wasted 12 hours trying to understand why no triggerevents are not being processesd by the job
Excellent Vid! Easy to understand for the somewhat hard of hearing. Question: It sounds like ECS would be ideal for larger, open world, multiplayer games...would I be correct in assuming this?
Thank you so much! ECS certainly benefits the game types you discussed, but that is far from an exhaustive list. ECS can also work very well for smaller games with dynamic entity structures
Amazing work here! Thank you very much for this very complete course, I learned a lot :) By the way, I can confirm that it still works fine with Unity 6000.0.4f1 using Entities 1.2.3. Oh and also, I had to add a "state.RequireForUpdate<MobaPrefabs>()" in the "ClientRequestGameEntrySystem" to make it work properly on a client build, otherwise the subscene NetCode prefabs may not be loaded in time when the client receives the spawning data from the server, resulting in a NetCode error followed by a disconnect (apparently streaming the sub-scene can take longer than it takes for the systems to start running).
"add a "state.RequireForUpdate<MobaPrefabs>()" in the "ClientRequestGameEntrySystem" " saved me. This issue didn't bother me till I started testing the MaxPlayersPerTeam. It's like the player has been connected and counted as a +1 for the selected team, then disconnected for a reason (I dont know the reason exactly).
Any thoughts on how you would need to implement the thin clients to use the aoe ability when they hit that timer? I've been trying something in a project of mine that has a similar setup but it's not working. I'm setting an InputEvent in my IInputComponentData GhostField, but when I inspect the Input Buffer Data on the entity in the inspector it has a size of 0. I'm guessing that Thin clients can't use InputData components?
Make sure in the ThinClientEntrySystem you are adding an AbilityInput component and an InputBufferData<AbilityInput>> buffer to the thinClientDummy. That *should* be all that is required for thin client ability input. Hope this helps get it working!
@@TurboMakesGames I had those, turns out in my ThinClientInputSystem if I don't create a new AbilityInput component before the input timer expires, the next frame the inputevent was still "Set", oddly though this would mean that every frame "WasPressedThisFrame" was true, but yet when inspecting the InputBuffer in the inspector it was not and my system that queries the InputData was not seeing it. The aspect that returned ShouldAttack was always true as well which was confusing. Anyways, figured it out, thanks for the help.
The blob asset thing is great! First time hearing about it. It's like a little puzzle piece in the data oriented thing. The idea of having it serialized makes it even better. This simplifies a bit of the architecture conceptualization which is something I'm struggling with figuring out. This is nice because it basically says "figure out the things everything uses or many things use frequently". Love it. Great video. Also, thank you Turbo for pointing out the unity sale. There's a bunch of awesome things available. I mean, my bank account is cursing both of us out, but *I* appreciate it. 😂
MoveInput is an IComponentData - check out this video to see how I setup input in Unity ECS - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-bFHvgqLUDbE.html
I've been delving into SourceGenerators in Unity for a while now, and I'm glad to stumble upon this video. It's just a pity it didn't come out a couple of months earlier; it would have been a great starting point. Despite having scoured a lot of information on my own (by some miracle), there were plenty of intersting insights in this video that I hadn't come across. For anyone just diving into Source Generator, I recommend checking out my Unity solution as well. It might not be perfect, but I believe it could offer some valuable insights: github.com/VPDPersonal/UnityFastTools
Might have been discussed in the project already, but does this cover the idea of spinning up game instances to handle more than 10 players in a queue waiting to play. Say I have 1000 people wanting to play, but we need to spin up instances of the game server to handle multiple instances of the server running? If not, how would we go about tackling that using Unity Netcode and the Multiplayer services provided by Unity.
This video does not cover that. Something like that is more along the lines of integrating with other services such as Unity Lobby to manage all this. With these UGS services, once a match is found and players are connected, they all communicate the same way show in this tutorial. There are some other good tutorials regarding these services if you poke around a bit. Hope that helps get you going in the right direction!
@@TurboMakesGames I've gotta particularly insightful tutorial on relay and lobby from Hugos multiplayer Kitchen Chaos game .... however, Im having difficulties understanding how I can use a Lobby/Relay, spin up a server, and then still have the code in your full demo (snapshots, server reconciliation, rollback etc) work. Is this possible?
"Actually I guess technically, the worst case scenario would be that your entities do not fit in chunks at all ... uhm which means that you probably have some bigger problems on your hands ... hu hu hu" ..... Classic :D
Really love your ECS videos Johnny. Clear, concise, practical examples, and a little nerd humour .... love it man. Keep up the great work brother. We appreciate you man.
For anyone else going through this in 2024 or later, I STRONGLY recommend looking up the Input System Package when you get to the part dealing with controls. My left stick worked fine as shown in the video, but my right stick was all jacked up, and it took a lot of troubleshooting to find out that the built-in input manager has the axes numbered differently depending on if you're using an Xbox controller vs a Dualshock vs whatever else. The Input System Package takes care of all that for you, so you don't have to hunt down button/axis mappings for every controller you want to support, you just say "gameplay > movement > up is left joystick up" and the system knows how to read that input from a BUNCH of different gamepad types. I'm only about 2/3rds through the tutorial, but the only other issue I've noticed so far is that the Text UI Asset is considered legacy now, replaced with TextMesh Pro. It's very similar and actually includes the ability to outline the text without having to add an outline component, but when using it in your code you need to use TMP_Text instead of just Text as the type. Accessing the text is done identically in a TMP_Text object as in the Text shown in the video.
lol, I just found out that what I thought was built-in outlines on TMP Text was actually modifying the font, so changing it on one text object changes it for all of them. Okay, outline components are back on the menu.
They did. When they did official livestreams about DOTS and Dani was there, they gave the series a shout-out. At least once (I didn't watch the others for the same reason I don't really watch these anymore... )
This is exaktly what I need right now :D Had been trying to solve smth with generic typing but I still needed to create a file for every Type i want it to support... This is huge!. Thank you for showing it off and unscarryficating source generation for me!
Hello. Thank you very much for this lesson. I follow your lesson and have reached the point where damage from AOE is added to the buffer. And sometimes I add damage 2 times per use of the ability. I don’t know if you had this problem and whether it will be solved later in the lesson. If yes, then there are no questions, I will see it in the video. If not, please tell me what could be the matter. I double-checked it several times, there is no difference between what you did and what I did.
Yo Turbo, from you Wiesman and Monkey, Starfighter General helpin me with DOTS as well as Turtl on discord, MMO went live this week... I will patch regularly weekly, or bi monthly. Stuff NEVER been done in any video game is being done in Starfighter General on Steam.