*Puts code into chatGPT version 8 in 20 years* Prompt: "just add multiplayer" ChatGPT: "umm... no i still cant do that"
@Gwizz10275 ай бұрын
Roblox
@adriandeveraaa5 ай бұрын
Even then adding multiplayer is just one part of the battle. Ensuring your game isnt exploitable is another.
@GameJam2305 ай бұрын
Gamemaker is probably the closest thing to getting to that point, but unfortunately new updates to it have been delayed until after the release of GMRT (the new Runtime), and it will only be directly supported for Opera GX web games at first, other platforms coming later. But the way they implement it takes a LOT of the responsibility out of developers by just treating the extra player instances as any other object, so as long as you can code local multiplayer with controllers, accounting for player instances being dynamically created or destroyed, you can use their rollback multiplayer system. The only issue to account for currently is that players can't have any data that affects functionality set BEFORE the multiplayer game starts (so for example, a game where you can create a character and then join any world with them, keeping your inventory and upgrades, like in Terraria), as it doesn't allow for that pre-synchronization of data yet, as it assume that ALL players have the same game state upon start so that it only needs to send controller inputs to other clients, and all copies of the game will simulate the same code, rolling back the game if a desync occurs. Despite its flaws though, it will be easy for everyone to implement.
@FriedMonkey3625 ай бұрын
You kind of can, in steam if you have a couch multiplayer game wich supports multiple players all you have to do is check a box to enable it, Cuphead has it, its called remote play i think
@owencmyk5 ай бұрын
This is incredibly impressive. I think the closest thing to a "just add multiplayer" button you could get would probably be rollback netcode, as it only technically requires the ability to save and load the state of the game, as well as the ability simulate 1 frame. Ironically however, implementing rollback netcode in practice is FAMOUSLY one of the most difficult things in game development due to the serialization and optimization required and it's only really been done well a handful of times
@DaFluffyPotato5 ай бұрын
Rollback can't be generalized. It by definition requires an algorithm to reevaluate a separate set of events. The shared objects method I used gets pretty close, but realistically you still want to use abstractions to reduce bandwidth usage and improve the feel. An engine/game-specific shared objects system is about as close as you can get (Roblox would fall into that category I think).
@shenanicode5 ай бұрын
@@DaFluffyPotatoit can, using ECS. Saving, rollbacking, and serializing entities and data in sparse set ECS is so simple and fast that you can forget another approaches altogether. While building one in a robust and manageable way is a challenge, now I can prototype games without using rollbacks, and then just substitute my storage to one with rollbacks
@DaFluffyPotato5 ай бұрын
I haven't looked into rollback much, but I thought the reason people said it was complicated was because it's not simply changing the state of a single object. I think you would have to reevaluate the side effects of a rollback within the rules of a game, which requires thought in how undoing certain events should behave with your specific game (similar to how my AttackSchedule object cannot be automatically networked due to how it's implemented with the game design). The best rollback technique probably varies by game design.
@DaFluffyPotato5 ай бұрын
Apparently GGPO exists as probably the most credible attempt at making a framework for rollback, but it hasn't really been adopted (it sounds like it's because it didn't generalize well enough). www.reddit.com/r/Fighters/comments/lzvkhm/question_why_do_devs_feel_the_need_to_build_in/ GGPO seems to force you to write your code in a very specific way, so it's the opposite of plug-and-play.
@shenanicode5 ай бұрын
@@DaFluffyPotato yeah, a history based on a commands with undo/redu is very hard to maintain. But you can just save the whole game state every N-th game tick, and rollback to this state whenever you want. If implemented efficiently, saving works really fast. In sparse set ECS there is a simple Array.Copy call for each set of components. Both for saving and rollbacking. Overall, prediction-rollback do not require writing any netcode in the game simulation itself. It just works by design. The concept is simple, but it is hard to implement it in a simple way. Especially if you want to achieve input-only bandwidth for your networking - a superpower of prediction-rollback netcode
@cupofdirtfordinner5 ай бұрын
i really appreciate how in depth you talk about code, absolutely nobody else does this the way you do. I'd argue this is better than a sebastian lague approach because you still talk at some length about a game with the primary intention of being fun, rather thana vehicle for (albeit cool) experiments. probably the best devlog ive seen since Rujiik the Commatose last uploaded
@DaFluffyPotato5 ай бұрын
I try to make my devlogs more informational than entertainment relative to the average out there. Although it's a tricky balance to get right. Also, most things I work on wouldn't even make an interesting devlog from that perspective, so it's quite tricky.
@ZaeNonQ5 ай бұрын
"just add multiplayer nothing could go wrong!" - junior developer
@bigwhoopgames5 ай бұрын
Great video and glad I could help! I really liked your explanation of attack scheduling, good to keep in my back pocket for a later optimization. Keep up the good work!
@beeleaveme5 ай бұрын
I'm here racking my brain to understand blueprint in the UE, meanwhile the guy creating framework, making holes in the moon through codes. Life is hard
@boxhead-zk7sn5 ай бұрын
i am boxhead 0:57, great video and it was a nice playtest but i got last place 🤣🤣
@stickstick89035 ай бұрын
the next best thing would be to implement local co-op, then enabling remote play on steam by checking the box
@GameJam2305 ай бұрын
Really, the only way to make a "Just Add Multiplayer" button would be to develop the game with distinct client and server instances, even in singleplayer, like Minecraft does. Even in a singleplayer world, the game has two separate processes to handle what the player sees, versus what the game THINKS you should see, and that makes it pretty easy to expand into a multiplayer format. Tbh, it's probably a good way to look at game development, and game engines could probably even look at that approach being the default in the future.
@DemidCode5 ай бұрын
good video, you made multiplayer a lot easier!
@AetherXIV5 ай бұрын
oh you are super smart. I'll move along and say good luck.
@ThinkWithGames5 ай бұрын
This looks really impressive! It's always cool seeing other developers who use python and similar whitespace languages (like gdscript) as their preferred language!
@gamerzero60855 ай бұрын
yeah i agree it's cool to see whitespace languages being used. especially if it's elixir, ocaml or haskell.
@ConfidentlyRong-jo5yt5 ай бұрын
Amazing job! Love the tree animation :)
@capsey_5 ай бұрын
I love art style of your games
@cmbaz11405 ай бұрын
So many games in the works ...its nice to see
@SeanStClair-cr9jl5 ай бұрын
This is fuckin awesome!!! Also wow I love your camera control!
@StormwreckerOfficial5 ай бұрын
Great content! You cover so much unique material! I was wondering if you could do a plain generic multiplayer tutorial? One that would be adaptable for any genre of game? I notice that you don't use socket, but I'd still like it to cover a TCP multiplayer framework. I can't be the only one out there with the same question, and it would be extremely useful if you were able to do a video on how to do one. Thanks again for all your great content, and keep up the good work!
@codecaine5 ай бұрын
Excellent content!
@6IGNITION94 ай бұрын
Super cool! Multiplayer doesn't take as much work as people think! (Especially since the same people routinely spend 3-5 years working on a single-player steam game nobody plays...) For example, I made a PVP game for a game jam in 48 hours earlier this year. (Probably 15-20 hours of actual work?) The logic was entirely client side, the server just forwarded messages: I think this architecture is called "brokered p2p". Anyway, since all the logic was on the clients, someone figured out how to hack it within literally 15 minutes of launch. He spawned infinite bullets in a sine wave. Good times XD The benefits of client-side logic are (1) simple (2) responsive. The downsides are security and inconsistency (different people see different things based on lag). You can make it purely server-side, which keeps it simple, and solves security and consistency. But then the input latency gets very unpleasant the farther you are from the server. That can be ameliorated somewhat, but at that point you get into input prediction, rollback, and all manner of complications. (And your "reward" for all this work is that the game looks a lot more glitchy when input mispredictions occur...) The simplest solution I've come up with is to keep the pure server side logic (i.e. thin clients, just send inputs and render world state) is to just have a separate server in major population centers, to keep ping
@RugbugRedfern5 ай бұрын
3:55 The biggest issue I've had with scheduling things like this is players' system times not matching exactly - for example sometimes players would manually change their system time which would result in issues where scheduled events would never occur. Steam provides an API for getting a server-side unix time independent from system time, but it is only accurate down to the second. How did you manage to solve this (or did you not encounter it)? 🤔🤔
@DaFluffyPotato5 ай бұрын
The networking framework I wrote has built in time synchronization (accessible through a framework property). It starts at 0 when the server starts up instead of being unix time, but getting the correlation would be easy as well. It uses proper approximation techniques to estimate it within a couple milliseconds on a stable connection as well.
@RugbugRedfern5 ай бұрын
@@DaFluffyPotato That's really cool! Do you have any resources on the approximation techniques? I'd love to do something like that for my own multiplayer games
@DaFluffyPotato5 ай бұрын
NTP uses a variation of Marzullo's algorithm. I took some of those ideas. I think my technique used multiple samples and estimated based on the ping of the samples with the fastest responses, which works under the assumption that the fastest responses are least likely to have asymmetrical trip times.
@RugbugRedfern5 ай бұрын
@@DaFluffyPotato Awesome, I'll try implementing that when I rebuild my networking solution :)
@SeriousGamer-pi7kw5 ай бұрын
I recommend using a different music or making it quieter, but it makes it a bit confusing for me when I try to focus on what you are saying. Otherwise, very interesting Video, thx for making it!
@robotinfluence5 ай бұрын
Great work, I imagine you dream code at this point.
@samSosiska5 ай бұрын
9 years of gamedev, potato
@Hetkinsonn5 ай бұрын
Just make the game better, game would be better
@thatoddshade5 ай бұрын
yeah, just put that goodness slider all the way to the maximum.
@ZevALT5 ай бұрын
DaCutiePotato: I added Silly Mode to my game :3
@That_0ne_Dev5 ай бұрын
"Just add multiplayer" Brah I had to restructure half my codebase to make multiplayer work
@gruntkwintin5 ай бұрын
we need developing monsters like you on roblox
@ashersilver73884 ай бұрын
have you published your pygame library?
@PixelMystifier2 ай бұрын
Next breaking limits goal: make GTA in python
@HassanMohamed-dc3tt5 ай бұрын
What type of structure do you use like ecs or oop or sth in between like how do you strucutre your code
@obelexobendre5 ай бұрын
This is not on the topic of the video but I noticed at 2:51 that you used dt*0.5 in the condition for randomly jumping, but I think this is not the right way to achieve framerate independance for this task. For instance imagine dt is 1, the slime will have a 50% chance of jumping, but if dt is 2, the slime will have a 100% chance of jumping with this code, which is not the same as a 50% chance per frame over 2 frames, which would be a 75% chance of jumping at least one time during those 2 frames (the probability of not jumping for two consecutive frames is 0.5*0.5 = 0.25, so the chance of jumping at least once is 1-0.25 = 0.75). I believe the formula could then be fixed as random() < 1-pow(1-p, dt) with p the probability that the slime does jump across the time of one second (if dt is in seconds). Also, this is my first comment on your channel. I want to say that I really like what you do, you’re an inspiration. Keep up the great work!
@DaFluffyPotato5 ай бұрын
It's close enough that it's not really an issue. The server runs at a fixed framerate anyways.
@ikcinbeatz43655 ай бұрын
Just add local coop.
@vVearon5 ай бұрын
just make a movement system, some guns, a battle pass, good graphics, and multiplayer. making a successful game is easy.
@happygofishing5 ай бұрын
Before I learnt sockets, I wrote pong multiplayer using GET requests. 💀
@someman75 ай бұрын
Why is it jittery? Rasterization? Rounding down?
@dbweb.creative5 ай бұрын
soooo is the client sending character position? you should be sending movement and other feature commands, and then send out resulting positioning after interpolation.
@DaFluffyPotato5 ай бұрын
interpolation is done on receiving clients. The purpose of interpolation is to visualize smoothly with limited data points, so you wouldn't send after interpolating.
@TheDarkchum14 ай бұрын
In 2024 would you still recommend learning Python for game dev for someone just trying to get into programming?
@a_pi_guy5 ай бұрын
nice video when are the frameworks going to be public i have been waiting since the original video (and if its alreeady public where i cant find it on github)
@DaFluffyPotato5 ай бұрын
I talk about that at the end of this video. It would be after Shobnet is tested through the project in this video.
@a_pi_guy5 ай бұрын
@@DaFluffyPotato sorry i missed that thx
@rhnirsilva6525 ай бұрын
be gamedev, do python w4r crimes!
@omar-diab-dev5 ай бұрын
I don't see any "multiplayer networking" tutorials talking about this enough, but is there actually any free way of hosting the game online? It really is just feels a bit dismaying to be getting into developing a multiplayer game only to realize it will only work on your local machine.
@DaFluffyPotato5 ай бұрын
I rent servers already for my websites. I can just put game servers on them. The "free" way that works at scale is peer to peer through Steam's system.
@finnf90515 ай бұрын
Lets wait for 2 more years and Unreal Engine 5 will have the utton 😂
@RossiGiova5 ай бұрын
where can i find you 3d framework and the multiplayer framework?
@DaFluffyPotato5 ай бұрын
Neither are released yet
@ShreshthoSaha5 ай бұрын
What's the future of pygame developers?
@DaFluffyPotato5 ай бұрын
games
@ShreshthoSaha5 ай бұрын
@@DaFluffyPotato cool🙂❤️👍
@forfreeStory5 ай бұрын
please make multiplayer freamwork open source and help the community
@DaFluffyPotato5 ай бұрын
I plan to at some point (see the end of the video).
@perezident145 ай бұрын
You never gave a reason why you didn’t just run a fiber optic cable through the center of the earth… Do you not care about your player base??? Unbelievable. 🙄
@DaFluffyPotato5 ай бұрын
Yeah, my bad. I think I have to make a public apology for not putting the players first.
@ev3rybodygets1774 ай бұрын
bro out here still programming AOS and not SOA
@voldiriddle42035 ай бұрын
Wait. which enginee does he use? Not Godot right?
@DaFluffyPotato5 ай бұрын
none
@voldiriddle42035 ай бұрын
@@DaFluffyPotato sorry, you are the pygame pro. I confused you with some other guy ... sorry
@ronitsingh99555 ай бұрын
Since when did python become 3D ??
@DaFluffyPotato5 ай бұрын
since ModernGL
@hillybankok5 ай бұрын
@@DaFluffyPotato and pyopengl
@mikaa25575 ай бұрын
Yo are you a gamedev. I need to collab with you too. I am trying to get into gamedev too.😢
@NineSidedYT5 ай бұрын
#DaFluffyPotato You could add spritestacked players to give it a more 3-dimentional look. I'm not sure how difficult that would be but it would sure look great! :)
@DaFluffyPotato5 ай бұрын
It would be easier to do a 3D model, but I want to use billboards for the visual style. Spritestacking also only spins on one axis.