Multiplayer Game Development & Technical Discussion Thread>Discuss multiplayer game development topics such as:>Socket Programming>Server Hardware>Server architectures (P2P vs Client-Server vs instances)>Cheats and anticheats>Post your own multiplayer projects to get feedback>Know how to make games but don't know how to get started making multiplayer games?1. Pick a programming language and search for a tutorial on socket programming.2. Learn the core skill of sending data across the network using said language.3. Use this skill to turn a tiny (the smaller, the better) game into a multiplayer game.>Good resource for real time multiplayer games, especially shooters: https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking>Good resource for strategy games and basic multiplayer theoryhttps://www.gamasutra.com/view/feature/131503/1500_archers_on_a_288_network_.php
>>80760Sorry OP, the board is mostly full of casual players not developers. And somehow, /g/ is probably still worse.This thread is doomed. Prove me wrong.
>>80760Good luck getting this thread going OP, but with how slow this board is we might just have a chance.I'll post some classics:https://gafferongames.com/post/fix_your_timestep/https://gafferongames.com/post/deterministic_lockstep/
>>80813>post game development on /g/>"go back to /v/ here we post linux DEs and pictures of dudes wearing girl kneesocks">post game development on /v/>"go back to /g/ here we shitpost about vidya while avatarfagging with anime girl pictures"
Bump for attempting to make this site's users have bigger brains
>>80825Good website, I also recommend the article on packet structures to anyone getting started. As a noob I first fell for the trap of universal serialization schemes like XML or JSON to send classes but given the fact that this both relies on a library and has to eventually be turned into a byte array to be sent using sockets, I have yet to find a better way than to just interface a function returning a byte array and another one that takes a byte array as an input. For each class you want to send over the network, the Encode() function takes every field you want to sync and add their bytes to the returned byte array while the Decode() function does the opposite by taking the bytes and populating the class fields with received data.
>>80874I know it may be pointless to try, most people don't like development. I wish there was more places to talk about game development than r*ddit.
>>80760i got a dell optiplex 390 a while ago and i installed linux server os. vidya servers for my friends run like a fuckin dream
technical aspects are trivial compared to the real challenge of getting multiple people to play your game at the same time.
Maybe it's because this thread is now more about why dev topics don't stick? Maybe start with staying on topic? XD lots of engine have a good enough networking for basic multiplayer. UE4 made a lot of improvements because they needed them for fortnite. I don't really know why you should start from the bottom unless you want to learn how it works. Unity has a new system that works with their ECS. Still alpha I think.
>>80977this is a problem if you rely on a matchmaking scheme / a high player count to have a complete gameplay loop. Indie devs should focus on multiplayer games that work on dedicated servers. Minecraft is the ultimate example.>dedicated server>play whenever you want>friends join up>build houses together>they leave>stay up and start building a massive dong >go to bed>wake up>log on>edits get loaded from server>friends have completed the dongAnd how much money was Notch spending on any of those servers? NOTHING.
take the gmod tower pill>make it in gmod (less development time)>get popular>take donations>make the actual game with user backingsure, they pissed away a lot of the goodwill at the end, but i've seen far too many dead multiplayer indies. there has to be another way
>>80994>I don't really know why you should start from the bottom unless you want to learn how it worksbesides enginedevving, when you know how it works there is nothing that stops you from writing your own catered netcode even if the rest of your game uses an engine. I guess I just don't like key components of my game being black boxes. Unity has a history of suddenly killing features, networking being one of them, so by using your own netcode you'll never have to migrate if they decide to do it again. also this might be the tism speaking but I actually think this shit is fun to work out.
>>80999minecraft is really a single player game with optional multiplayer so sure that's one way to climb the real challenge.....by almost completely ignoring it.
>>81218I dont think this methodology is faulty. If the game is inherently fun in single player, it should be just as good if not better in multiplayer. Barring some catastrophic changes of course. The problem is when the game sucks and you need friends to have fun, thats a hard crutch. Game communities arent eternal unless you're doom.Also don't say that MC ignores multiplayer because it obviously has netcode and MP was clearly a huge attraction for the game at every stage. Even the classic days, I was there.
I'm a brainlet op but this sounds interesting. Perhaps this will better help me understand how dedicated servers run, as I'm about to get a VPS and really only know how to set stuff up. I'll post with things I've learnt or need help understanding.
>>81234if minecraft never became so popular and as a result the multiplayer was never used it still would be a viable product for the few people interested in it because it's singleplayer first.now do this with a multiplayer only game.
>>80831Go to /vg/agdg/
>>80760Network programming is pain, but one of my favorite pains.
>>81272many Bullfrog games (everything from Populous to Dungeon Keeper with the exception of Flood and the Theme games) were developed multiplayer-first, then once they'd gotten the gameplay to a stage where it was fun, they'd write bots patterned after their multiplayer tactics and maybe some mission scripting and throw a bunch of levels together (procedurally in a lot of cases) and that'd be the single player campaign.
>>81272and it never becomes a monetary strain for the company owning the game to run servers with no active players to buy microtransactions because they don't run any servers.
Whats the best type of netcode for>Multiplayer fps>Team fps>Arena>Space station 13>Fighting games>Turn based gamesI know for fighting the consensus is rollback but I never bothered to see what people prefer for fps or arena type games
>>81891Thse days games are usually separated into two basic networking models, with fighting games being a special variant of one of them.both models are descended from the lockstep approach, which only works when you have zero lag (ie e everyone's playing on a cable LAN): all clients transmit their inputs to each other, then with all inputs gathered all clients compute one new frame of the same simulation they're all running, then you repeat all that. Since everyone runs the same sim with the same inputs, everyone gets the same results. Since you'll never have zero lag outside of cable LANs and especially not on the internet, two general approaches can be taken depending on how fast you need the game to respond to your inputs.The first approach, designed for twitch action games (but you can find some examples of strategy games that use it too), is the client-server model designed for Quakeworld, then refined by Tribes, with some extra refinements by Halo and more recently Overwatch. It's used by FPS, TPS, anything where you have direct control and need as little input lag as possible except for fighting games.In this approach a server runs the game and clients send it inputs. Only the server has an accurate view of the game, all clients only have approximations. Specifically clients see remote players "late" (because the information took some time to go to the server then to the client) and only themselves in the "present". The server can correct anything so if you walked into a space that's occupied on the server but not on your client you're gonna be "walked back". Usually it's really just movement that's rolled back in this way, but other things may be faked by your local view. Like, in overwatch hit impacts on enemies are faked by your client, and enemy deaths are sent without rollback, ie they occur "too late" in a way. So the client sends inuts to the server and the server sends information about stuff you can see to the client.
>>81970Since that can be a lot of information over limited bandwidth some sacrifices may have to be made, plus to prevent cheating the server will try to send only immediately relevant information. So most of the software design is about how to best compress this information and manage cases where it's not there yet.The second model, used for strategy games, turn-based games, clicky MMOs but also originally fighting games, is delayed lockstep. It's just like lockstep, ie same sim and same inputs shared with everyone, but since there's lag you just add input delay greater than the lag. Outside of fighting games it's super easy because if you don't have direct control you won't really feel the lag in unit responses, especially since the games usually trick you by having the units voice their obedience immediately ("yes milord" now, execute order 15 frames later).For a fighting game it'll feel super sluggish so the rollback approach was developed 14 years ago: use internal per-frame save states to "rewind" the game, apply the delayed input and fast forward back to the current frame. It works great because fighting games have relatively simple states and only two clients involved in a fight, but it doesn't really scale all that well with more complex game states and higher client counts.
What if /vm/ made a simple multiplayer? Going to /g/ means endless ego battles, maybe here we can actually make something and go through with it. It doesn't have to be a full-fledged game, but something that lets us learn about the basics of multiplayer games.
>>81982>>81970I figured delay based would be for turn based but the fps lockstep I didn't know that's pretty fucking cool ngl
>>81891For client-server FPS like CS, you rely on interpolation and prediction in order to trick clients into seeing a smooth experience. In reality ping is what actually limits the precision of your multiplayer gameplay. At the most basic level you have a UDP socket used to receive and send data as fast as possible. UDP is considered unsafe due to a lack of delivery guarantee but this does not matter because you assume that a correctly connected player will constantly be sending inputs and receiving game data such as the position of other players, what gun they have in hand, if they are friendly or not, etc. So missing one packet isn't really a problem, there are more of them coming. When someone lags with this type of scheme, if you directly use the last received position to place the object in your game world, lag will instantly cause a stuttering effect on this object. You can imagine this as a frame per second for that specific object only, but the "frames" are position and other state vars received over the network. Interpolation comes in to smooth out the transition between the two last received points. At the most extreme you can think of a 1hz tickrate server. You move during that time and what the server will generate is a smooth looking movement of your player model from one point to the other, that takes 1 second to complete. This is what people usually call "lerp" aka Linear Interpolation. Prediction takes this one step further and combines the received inputs with your ping in order to further smooth out your movements, but in theory only on your client side. If you were pressing left and were lagging, receiving the "ok you can move" response from the server will take a certain amount of time. If your client waits for confirmation before moving, this will feel laggy. So it just moves immediately and assumes it could do the movement.In theory both of these help give a better experience. In reality both are abused by cheaters.
>>81988what type of game do you have in mind?
>>81988Mega Man Battle Network combat clone.
>>81988something like nidhogg with online mp and simple guns
>>84615I need this immediately
>>85727check out duck game
Has anyone here ever written their own Authoritative netcode like >>82226 described? I'm working on my own but my prediction code is fucked so players are rubberbanding all over the place
>>86727I didn't implement the prediction because I didn't make a twitch shooter style game but the prediction code has have a smooth effect. From the second link in the OP : > After 150 milliseconds, the client will receive the server snapshot that contains the changes based on the user command he predicted earlier. Then the client compares the server position with his predicted position. If they are different, a prediction error has occurred. This indicates that the client didn't have the correct information about other entities and the environment when it processed the user command. Then the client has to correct its own position, since the server has final authority over client-side prediction. If cl_showerror 1 is turned on, clients can see when prediction errors happen. Prediction error correction can be quite noticeable and may cause the client's view to jump erratically. By gradually correcting this error over a short amount of time (cl_smoothtime), errors can be smoothly corrected. Prediction error smoothing can be turned off with cl_smooth 0.
tcp and ip more like toilet cunny paper and insane piss
>>87553udp more like u dumb pussy
>>80760I don't really understand why you would do this level of detail for network programing yourself when there is multiple ready made solutions provided in commonly used game engines.Before you tell me I'm wrong and whats provided isn't 100% ideal for an arbitrary standard of good netcode, I would like to point out that you mention a "tiny (the smaller, the better) game". Honestly this should not be what you stress over when making a game. Your game's visual presentation and a finely tuned flow are far more important.
>>80760Cool thread, OP.
>>87619The ready made solutions always inflate the amount of data you send over the network. This is called overhead. Packet structures in your custom solution can be stripped down to a bare minimum and avoid any universal serialization functions that the engine might use. This further reduces the time it takes to serialize data and the amount of overhead. As a noob developer I've used the ready made solutions once before. Never again. Lazy serialization got my bandwidth usage so high it literally DDOS'd my router trying to get the game playing on LAN. A noob who doesn't know about how netcode works at the bottom level doesn't understand why this happens and how to avoid it. You can turn many data types into smaller, more compressed types. You can bitshift to further compress information into native data types. You can write your own completely custom server commands and behaviors. You can do things like on-the-fly tickrate changing. You can entirely avoid or write your own anti cheat depending on the kind of game you're making. You can decide whether or not you want your netcode to be optimized for high thread count machines by giving each client an individual receive thread on the server or optimized for old hardware and use a minimal amount of threading.In less than 5 hours of programming you can get to a stage where you don't even need any of the so called ready made solutions. I have my own core networking code that I import into projects when I need it. I've used it for more than game and wrote a remote management app for android using the same C# netcode I wrote for Unity. This skill translates outside of game development and if you rely on your ready made solutions you're just asking for trouble. You're literally just leaning a one level higher API than you would if you just used socket programming.
In Unity, I want to get their sample FPS microgame running with pvp.I understand how to use Mirror, which is a free package that is similar to Unity's defunct networking support, to make clients send information to a server via a server command function and make it call a function as a response for all players. I was able to add player authoritative movement and projectile spawning via the provided scripts.Without getting too complicated I want to add server authority to movement but without needing the player to wait for a (laggy) response. I also intend to make projectiles spawn and have location data calculated independently on the players' sides, but collisions on the server.My ideas are as follows:-Attacks' connections will be done server side and broadcasted when they occur. Visual representations of projectiles are left to players after they receive an attack's initial starting data (at least for simple projectiles like a normal bullet that gets destroyed when it hits a wall).-Players will provide update data each tick, but a player's own side's info will not be replaced with each response unless the server has a disagreement with what is possible or if outside force hits them. Explosives on a player's self might be exceptional as I added blast jumping to another mod of the FPS MG.-Information will be sent with a timestamp with some correction regarding location changing over time, however each player only calculates their own character's movement; other player's locations are just going to be controlled by Mirror's existing location data broadcaster with authority given to the server.-Animations can be controlled client side by interpreting anything that is sent above. If another player jumps or gets hit, the client can figure that out given just location data changing and health status updates, then play the animation from that. We can do this only when another player is in view.It seems straightforward, but what do I not foresee here?
Anyone ever do Game Maker Studio multiplayer? I know it can be done because of Risk of Rain.
>>90475its probably similar to any other engine
While I understand the theory behind sockets, I don't understand how to actually make a server interact with more than one client... Is it as simple as iterating the "connection accepted" function over and over, and keeping track of the clients (and eventually removing them if no interaction happens after some time)?
>>92604>write a while(running) connection listener loop>start the loop on a new thread after setting the running var to TRUE>every time this loop gets past the Socket.Accept function this means a client just connected>before finishing an iteration of the loop you add the accepted client socket to a list / dictionary / arrayThen depending on what kind of hardware you're targeting : >High end hardware / high player count>Start a new threaded loop for each client>every iteration the loop checks for outgoing or incoming data>outgoing data added to a thread safe queue, dequeued by the threaded loop handling the receiver client>incoming data detected using Socket.Available function>any read data added to a thread safe queue, dequeued by whatever needs to access client received data >Low end / old hardware / low player count>Start a single threaded loop>first part of loop>Iterate over the list of connected clients>Check if Client.Socket.Available has more than 0 bytes ready to read>If so read and add them to a thread safe queue>Second part of loop>Check if the outgoing data queue has stuff to send>If so use the Client.Socket to send data to target client>UDP socket loop>Threaded loop for data in, threaded loop for data out>In loop checks single UDP socket for available data>Adds it to received data queue>Out loop checks outgoing UDP queue for stuff to send>Sends outgoing data to target client's UDP port>Outgoing UDP code can also be added to client threaded loop>No point in adding the Incoming code to same client loops since server only uses a single UDP port to receive>Client disconnection>Correct / expected disconnects handled using TCP commands>Unexpected disconnects can be handled :>Using a try/catch on the send or receive methods>Using a timed ping TCP command that the client must reply to in order to stay connected>When client found to be disconnected remove from the list>Dispose of their TCP socket, cleanup vars, etc.
Is anyone at the stage of scaling infrastructure?Help explain to a brainlet like me what is amazon aws, reverse proxy, kubernetes, and docker
>>94337bump for this I'm also a brainlet when it comes to AWS but might get into it soon
>>94337>amazon awsServers on demand. You pay them money based on how much cpu, memory, bandwidth etc the server uses and is supposed to be very budget friendly for smaller packages.>reverse proxySuppose you want to host more than one website on your local network, but on the same domain. For example, you have a website "anon.net" that contains info about you, but also want a chatroom at "anon.net/chat". These may be implemented as two different applications:"anon.net" - static web server hosted on port 10000"anon.net/chat" - dynamic nodejs (or whatever) app hosted on port 10001What a reverse proxy would be used here is to host a web server on port 80 (or whatever default http/https port) that will then route requests from other people to the websites on your local network. So if they are trying to reach "anon.net/chat", internally on your network it will route all traffic to your app on port 10001.Nginx, IIS and Apache can all be used as reverse proxies>dockerOne of many methods to bundle your application into a standalone "container" you can use to deploy it. The nice thing about docker is how it is sandboxed, so you can create and delete running instances easily without affecting the underlying file system. So if something goes wrong, it's really easy to get another version running.>kubernetesKubernetes is like Docker built for scalability. Lets you easily deploy applications to a cluster, which is useful in high traffic situations. EXTREMELY extensive, at my job we are learning and transitioning to kubernetes and it is simply a beast in terms of functionality.
>>94353You mean raw websockets? Sockets in js have been notoriously painful for a while now, is there a reason you don't want to use socket.io?
I'm interested in making an online multiplayer game, but I'm scared that any primitive method that I come up with will have exploits where the person connecting to your IP will be able to run viruses on your computer.And that is why I'll probably just make it a "local multiplayer" game and let people use steam play together and the like to do it.
>>94391The only time this is a real concern is if, in your game you include somewhere some functionality that allows you to run some arbitrary code defined at runtime, or unsanitized player inputs that make their way to a database somewhere. If you don't make these two mistakes, the only thing you have to worry about is players spoofing network data
Realistically what are the odds of a multiplayer indie game surviving if the dev is persistent? Fucking love games like SS13 and Gmod where the same server has been around for years with a community, and I kinda want to make a game that lives in the same fashion. Even thinking of taking a year off to get it off the ground and then just updating it while I wage slave.
>>94388Socket io is such an overbloated wrapper compared to raw websockets. Can it even take anything besides JSON? Would be way better off sending data in bytes. Plus, isn't it easier to make custom clients / exploits from socket io if the server is also running socket io?
>>94409It doesn't actually seem that bad to me for dealing with data in bytes over socket.io, but then again I don't use JS because I can't stand it. If pic related is anything to go by you should be able to send data that isn't json, or maybe this sends a json object with one element containing byte data.
>>94405A game is alive as long as the dev works on it, friend. The long lasting nature of those communities are because of those persistent devs. Are you talking about sustainability in terms of income? Part of that is then having to put yourself out there.
>>94471Ideally I'd be able to do it full time eventually. Maybe with patreon, paypal donations or some shit. Idk how to shill it other than spamming it on here, twitter, some forums, hopefully not reddit, maybe youtube, streamers, etc. Have to be careful with where I shill it, though, because after Notch it seems like all the highly politically motivated people are way more agitated and willing to shut things down.
anybody needs a beta tester? must have a mic
>>96363might need more than one beta testers soon, dont know if this thread will last long enough though. I'm 1ma and my game is more like a tech demo right now.
you guys have any experience implementing steamworks lobbies? kinda like ror2 has.
>>96963>>80977>>80977>>96963Not at all true, don't trust someone's opinion whose claim to success is a fucking rock paper scissors game. Of course the technical aspect is going to be trivial. If your game has any fast paced element, you are going to lose potential players if your net code is bad. It's part of maintaining the player base and shouldn't be discarded for later. A good example is Risk of Rain 1. Great game, awful net code, as I was never able to comfortably play with friends without complaint.
>>80760Not really multiplayer related, But I'm trying to make 2d character sliders for a SS-13 style game.I want to do something with mesh deformation, but I'm not really sure what direction to go in. I want:>Extremely easy to make new outfits with little artistic talent needed. Outfits are PNGs maped to the character on runtime.>Large degree of customization. A single model that can deform from opai loli to jacked tall dude.>Looks decent. Doesn't need to be perfect. Mostly for role-playing purposes.There's almost no resources for doing this with 2d sprites.
>>100513Pic related, btw.
>>100513Just look into an animation program called Spine and try to animate one character without the customization stuff, for starters. Once you you've learned to do that you'll know how to approach the customization.
>>100576I'm aware of spine and I'm not interested in stick figure animation. I'm looking for information on working with vectors in 2d.
how the fug can an indie multiplayer game have an anticheatwouldn't you just rely on VAC or buy an easy anticheat license or whatever?
>>100815If you're looking to do 2d vectors and saying spine ain't your thing then no, you did not look into it.
>>101184>wouldn't you just rely on VAC or buy an easy anticheat license or whatever?why?
>>102933how many indie games have an in house developed anticheatgenuine question, I cannot recall a single one
>>102977Even most AAA games don't have one.
>>102977Minecraft has some form of anti cheat and it's good enough even if not perfect. The definition of anti cheat doesn't imply a big branded "this is our oh so scary anti cheat stay away cheaters". Here are things that can be considered anti cheat features :>Netcode that avoids sending info the player should not have access to (harder to get right with high tickrate competitive fps')>Packet encryption (to prevent plaintext sniffing)>Server authority (no client can be trusted)>Building a database of existing cheats for your game and either reversing them to fix the underlying cause (at your expanse as a dev, or like bethesda try to bully cheaters into telling you how they did it) or do signature detection>Game file signature check (making sure players are all running the same unmodified software)but most importantly>The ability for an admin/player to spectate and ban/report.This last one is the reason why even if anti cheat isn't perfect in Minecraft it doesn't matter. Admins can ban cheaters. This being missing is a problem in Escape From Tarkov where wall hacking would be extremely easy to detect due to the maps being huge and the gameplay revolving around a few high stakes engagements with long periods of peaceful moving and looting. The first one is the reason why wall hacks and esp still exist in CSGO even though the game at some point goes "ok there's definitely a wall in between player A and B so they won't receive each other's positions anymore".Why would indies do this themselves? Because 4 out of 6 of these things are part of the regular process involved in making a game's netcode, and even if I didn't know what the other 2 involved they are heavily documented on the internet for anyone to learn in a few hours.
Keep posting these threads OPWe need a vm game
>>103058>We need a vm gameI've been working on a game for ages. Just too paranoid to post it on any imageboard platform because I feel like I'd be painting a target on my back for SJW fanatics thanks to Notch.
>>103058I'm working on multiplayer for a large scale isometric tile map strategy game as I post, but the functions are too basic to warrant shilling a link to it yet. What I got so far:>Massive scale isometric tile map RTS gameplay>Rendered using shader allowing the whole map to be drawn with no FPS impact>Zoom out and watch the map get taken over by AI players (pic related is a 2 hour long timelapse)>Basic city builder / management gameplay loop>Spend research points to progress through tech tree>Nuclear route for nuclear weapons of increasing sizes>Nuclear war gameplay, zoom out and watch large parts of map turn into wasteland, radiation & firestorms spreading with wind>Bioweapon route for plague inc style infection spread gameplay>Go from common illnesses to population decimating plagues>Infected pops cannot work, reducing resource production>Zoom out and watch as your own wuflu shuts down the enemy economySome other features I'm thinking about: >inter player politics, inner country politics (to drive conflict, make and break alliances, inspired by stellaris factions & galactic senate)>sandbox mode where you and friends can just paint tiles on the map together freely>city builder mode where war related buildings are removed, maybe even replaced with other buildingssuggestions are welcome>>103096I used to feel this way but honestly I think most of the sane people on this world became disillusioned with SJW naming and shaming mentality a long time ago. If I make it and end up pissing someone off on twitter, anyone who wants to figure out who I am to doxx me can feel free to do so, they will find extremely outdated information if anything. My zuckerbook page still has my old job and apartment listed. The only thing you need to do if SJWs attack is simple : do not apologize, do not bow down, just ignore them. As an indie it's pretty easy. With a publisher no so much.
>>103108>I used to feel this way but honestly I think most of the sane people on this world became disillusioned with SJW naming and shaming mentality a long time ago. If I make it and end up pissing someone off on twitter, anyone who wants to figure out who I am to doxx me can feel free to do so, they will find extremely outdated information if anything. My zuckerbook page still has my old job and apartment listed. The only thing you need to do if SJWs attack is simple : do not apologize, do not bow down, just ignore them. As an indie it's pretty easy. With a publisher no so much.This was generally the advice people always said during GG. I want to eventually pull the trigger and go in full time, and I feel like pissing off the gatekeepers would hurt my odds. I would never bend the knee because there is no appeasing them, but I don't want to end up on their radar for any reason. If you listen to devs talk about the industry they always comment on how tiny it is. This obscure ass vid I found a long time ago touches up on it a bit: https://www.youtube.com/watch?v=zYcK-egbsYk
>>103114These people do not gatekeep shit. Their very existence and anger at certain products drives other types of people, their polar opposites, to seek out this content and support it. The more someone attempts to cancel something, the more people who wouldn't care about that thing will support it. If SJWs have one power, it's the power over mainstream public relations. As soon as somewhere down the line of the corporate lies an executive who looks at manufactured drama and goes "by lord we must listen to these people", SJWs have power over your company. But really I think the US president has proven that negative press is all but meaningless at this point. People can't tell true from false and believe what they choose to believe. If Yanderedev can have a following of 600 retards and make money on patreon, so can you bud.
>>103120I'm not talking about the twitter lynch mob. That video wasn't about them. I'm talking about people inside the industry. The people who run promotional events, can get you in contact with publishers/console companies/etc, people who have exposure, etc. There's a reason why talent-less hacks get tons of resources meanwhile passionate devs are constantly stringing together what little they have to see if they can make something tangible out of it. Yeah, random indie games blow up, but it's pretty much just the lottery.>If Yanderedev can have a following of 600 retards and make money on patreon, so can you bud.Yandere-dev is not what I want to base my goals around.
>>103130If your hope is to get noticed by random "in industry" people then sure, you're playing the lottery. But you don't need them. And even if you get small lottery wins in the form of industry contacts to get your shit shown at E3, NMS shot themselves in the foot by agreeing to sony blowing their indie tier product into AAA hype levels. The game could have released at 20 bucks in early access and have avoided all the negative press about lies, then slowly increased in price as the updates came out. If you think Minecraft being successful without this "in industry" connection is the product of chance you're wrong. Minecraft is simply the ultimate indie game one can create. It didn't need E3 to take off. Relatively small youtubers will give you way more exposure than going on stage at E3 to drop spaghetti like Sean Murray.
>>103152Minecraft came out when lets players/steamers were starting to explode, the indie landscape wasn't even close to being as oversaturated and SJWs weren't blacklisting shit over petty stuff. Notch still went to tons of events and Minecraft was mentioned all over the gaming press. Not only are the circumstances completely different but he also benefited from shit that you'd sacrifice by pissing off people in the industry.I also suspect he had some Swedish neetbux unless Wurms Online and his earlier stuff funded Minecraft somehow.
>>103163>Not only are the circumstances completely different but he also benefited from shit that you'd sacrifice by pissing off people in the industry.You're literally using the word "people in the industry" to refer to SJWs in one statement then in the other it's about the big gaming industry so I don't get it anymore. What do you even mean by "pissing off people in the industry"? Who are these people and why do you think they have so much power over your game's success? You seem like you're afraid of some monster that doesn't even exist, you've set your bar for success so high you can't even see how it's possible to make it without being a good little industry cuck. Remember that game that set their sale price at a percentage that was a reference to tranny suicide rates? The SJW butthurt caused a reverse influx of randos from /pol/ buying the game and leaving positive reviews. If even moderately successful no matter who you are your game would be mentioned in the gaming press. Good or bad that press helps you sell your game. The market being saturated doesn't mean it's impossible for new games with unique mechanics to pop up. If your game is of a saturated genre then sure, you need industry connections to shill your game for you in order for people to play it over all the other games of the same genre. If your game is truly unique or innovative, this goes out the window. Notch would not have been as successful if he released an FPS game in 2010, when Activision was dominating that market. His game was fun and novel, and beyond a slight push to people with an audience that's all you really need to succeed. Due Process generated buckets of hype when the game looked like minecraft had a baby with R6 siege, because the breaching gameplay in procedural maps was novel and unseen at the time.Feel free to stay paranoid about the so called "in industry" people you speak about. I'd rather be focusing on making sure my game stands out from the pack.
>>103165>You're literally using the word "people in the industry" to refer to SJWs in one statement then in the other it's about the big gaming industry so I don't get it anymore. What do you even mean by "pissing off people in the industry"? Who are these people and why do you think they have so much power over your game's success? You seem like you're afraid of some monster that doesn't even exist, The industry is not big. If you ever listen to devs talk indie or AAA you get an idea of how small it is. One GDC talk was about how to promote your game at an event, and 90% of the talk was basically a huge waste because the last 10% the guy basically said "Yeah these events don't do shit, none of the people who go buy your games, but everytime I go I meet someone who knows someone else. For example I met the extra credits guy, who then got me in touch with a publisher who then published my game". It's about connections and sadly they're all SJWs through and through. I've just seen too much shit to believe it's any other way. This is the only thing that makes sense.>you've set your bar for success so high you can't even see how it's possible to make it without being a good little industry cuck. Yes. You do more with connections than without them. That's capitalism.>Remember that game that set their sale price at a percentage that was a reference to tranny suicide rates? The SJW butthurt caused a reverse influx of randos from /pol/ buying the game and leaving positive reviews.I don't want to make 1 half-assed meme game a few /pol/lacks play and then be done.
>>103165>>103179>If even moderately successful no matter who you are your game would be mentioned in the gaming press. Good or bad that press helps you sell your game. The market being saturated doesn't mean it's impossible for new games with unique mechanics to pop up. If your game is of a saturated genre then sure, you need industry connections to shill your game for you in order for people to play it over all the other games of the same genre. If your game is truly unique or innovative, this goes out the window.Don't believe this. Sadly that's capitalism.>Notch would not have been as successful if he released an FPS game in 2010, when Activision was dominating that market. His game was fun and novel, and beyond a slight push to people with an audience that's all you really need to succeed. Due Process generated buckets of hype when the game looked like minecraft had a baby with R6 siege, because the breaching gameplay in procedural maps was novel and unseen at the time.I don't think his game exploded from it's gameplay alone. Yes it was an enormous factor, but not the only factor.>Feel free to stay paranoid about the so called "in industry" people you speak about. I'd rather be focusing on making sure my game stands out from the pack.I will focus on both making my game stand out and also taking advantage of literally every single thing I can to make sure it can be the best game it can possibly be. If that means going under the SJWs radar, so be it. The industry is not as big as you think, and GG proved the SJWs have a death grip on the publishers, events, etc. Obscure meme games that only 4chan knows about are fun but not what I want. Maybe it's not so bad though, as the Risk of Rain devs seem to be getting along fine.
>>103179>Yes. You do more with connections than without them. That's capitalism.Lmao bro if you want to make millions of dollars start looking into other ways to make money. As a 1ma developer, every single revenue bracket shown on screen by this guy would be acceptable to me. I see your mind is made up so I guess have fun being paranoid in trying to maximize every penny you make on a single game by desperately chasing out the impossible to earn acceptance SJW ridden industry connections, I will remain comfy and work on making a game that stands on its own, make me a modest amount of money and remain a relatively decent source of income while I move on to other projects. I don't want or care about your impossible to achieve bar for success. I'm sorry but with that kind of mindset and the clear lack of connection you so desperately think you need, I doubt you're gonna make it. You've listened to too many GDC talks by industry cucks.>Don't believe this. Sadly that's capitalism.You don't know shit, because the fact of the matter is even obscure mods can trigger the mainstream media enough to get an article written about it. You are giving the industry way too much credit, it's well known by now that these bankrupt journos are desperate for anything that generates views.>If that means going under the SJWs radar, so be it. The industry is not as big as you think, and GG proved the SJWs have a death grip on the publishers, events, etcThat's delusional. SJWs have no grip on anything anymore. They overplayed their only hand and people are waking up. You keep making the point that you somehow need these SJW industry connections to make money in the gaming industry and every single example I give you, you just dismiss with "yeah but it was probably something ELSE that made it successful". I'm done trying to explain to you that this paranoia of yours is unwarranted, feel free to not expose yourself as a big meanie 4chan poster if you want to.
>>103179Your mindset reminds me of this article about a guy who wanted to make his dream game, got funding for it, but once this "industry connections" part was done with the technical side of things turned out to be so out of their league that no one in the team knew how or wanted to develop the actual game : https://medium.com/@indigogaming/how-i-almost-made-the-game-of-my-dreams-da8b327e50f3Sure connections help, but you're putting way too much importance on it. GG proved that no matter how much power these SJWs have over the gaming industry, opposition movements rise up and support the products they disavow. If the condition to have these SJW connections is to be a good little SJW cuck then I'm glad not to have any and I will do everything in my power to prove that they are not necessary. Instead of strengthening their grasp on the industry by bowing down to their methods, you have to show everyone that they are meaningless idiots.
>>103187>Lmao bro if you want to make millions ..... many GDC talks by industry cucks.It's not about money. It's about the fact literally everywhere you look online tells you to compromise your vision while the "industry cucks" are hogging all the resources. I don't want to compromise and be a indie coper making a glorified newgrounds game.>You don't know shit, because the fact of the ..... that generates views.Didn't say it was impossible. Just that it's a lottery and there are ways to improve your odds. There are more people at play than the retard journos. >That's delusional. SJWs have no grip on anything anymore. They overplayed their only hand and people are waking up. You keep .... done trying to explain to you that this paranoia of yours is unwarranted, feel free to not expose yourself as a big meanie 4chan poster if you want to.I didn't say need. It was about maximizing odds. Everyone hates the SJWs but I don't have much faith in the consumers. Otherside Entertainment proved even if you are an industry legend you can't raise enough capital to fund a massive immersive-sim tier game.>>103196I honestly wouldn't rely on SJWs for their skills, abilities or anything really other than taking a piece of the pie they're hogging from everyone else. I have the tech skills to make a game just none of the time.
>>103220>There are more people at play than the retard journos.who? you keep referring to some mythical "industry" force keeping you from your billions for dollars unless you bow to their SJW tendencies. Who are they?
>>103220>Just that it's a lottery and there are ways to improve your oddsposting your game on an imageboard doesn't decrease your odds lmao
Bump because smart stuff good
>>103108How much micro will there be? If I need to manage individual workers at a global scale the game would quickly become a headache. If it was something like Stronghold it would be more manageable, but microing all of those army units would also suck.>AI Player takeoverHave you thought of having AI delegation, like making it so the player can assign AIs settlements/cities/army groups and give them orders like "maximize food production" or "research weapons" or "supply army" or "besiege that city"?Also setting AI doctrines (defensive, offensive, skirmishing, avoid enemy but head towards goal, run away from enemy, focus fire on X type of unit, prioritize destroying buildings/workers, etc).
>>103691Yeah micromanagement on that scale would suck, early game wouldn't matter too much. I haven't given it much thought so far as I'm still working on the core technical features (just added teams and shared fog of war reveal for allies yesterday), but so far my two main ideas:>No army units to micro manage at all, just ditch this type of gameplay entirely and focus on tile map based gameplay and "remote" warfare with nukes and bioweaponsOR>Keep focus on tile map style gameplay but have army units add to a "Force" count and have Risk style roll of dice combat where tiles containing friendly forces will attack or defend nearby tiles.>Army units entirely automated, you build army related structures that produce / house army units (barracks, naval base, air base) and having those structures automatically enables army features within reach. So to attack the enemy ground tiles you just create an outpost and when enough forces have been relocated to outpost they will automatically start attacking enemy tiles within reach. If I go with the second idea, which I probably will since the first one is pure laziness, this will tie into one of the ways I want micromanagement to be reduced, which is to have players be able to define "sectors" of their territory and like you suggested have each sector have different focuses. Giving the AI control over expanding your cities will most likely be a mid game tech you can unlock. So a sector located near good resources could be set to focus on military defense and resource extraction, while a sector located near the enemy could be set to focus on offensive attack and military presence. Other sectors could be set to focus on economy or like you stated research / food production.Good ideas with AI stuff, I haven't been thinking about AI recently. This is pretty much needed otherwise they will all just build as fast as possible towards nuclear weapons and unload everything they got on everyone else, as they currently work.
>>94405If you're an extremely small indie team it's not about being persistent devs forever, it's about getting to a solid core game that the community can then turn into whatever they damn please. Even a solo game can "survive" past the amount of content you put in it as a developer if user content is created. For multiplayer you can host servers for as long as you feel like it or let the community host their own servers from day one, depending on the kind of game you're making.
>>97216falls guys has some of the most blatantly terrible netcode out there, pushing a competitive game with gamebreaking client authority.but they got people to play and continue playing so they're in the 1% of actually played multiplayer games
>>101184you design the game such that cheating isn't possible or at least extremely difficult.technical stuff like not giving clients authority over gamestate, not sending clients information they shouldn't be aware of.and also philosophical design stuff such as: if players have the information/ability to do something which could be enhanced clientside throught scripting, should you nerf it's importance or make it a native feature? ex: shooting game where one click is one shot and some players use an auto-fire script...you can't really prevent it but you have options such as making autofire a native feature so everyone has it or nerfing firerates etc
>>105014its a game for kids, I doubt they ever expected people to start cheating in it lmao
I've never read up on online multiplayer works, but I have an idea of a way to do it.Say it's a game with an online co-op mode. I think that effectively both players will be playing as if they're hosting and the "online partner" will just be an NPC updating its worldposition and animation state and it'll be vice-versa for you.In essence, you aren't sharing the exact same game instance as that player, there's just the illusion that you are and then when they destroy enemies there could be flags to destroy them on your screen.
>>105014>can't go 3 games without a hacker revealing himself in the last roundtell me more about your flavor of the month game that has lost 50% of its playerbase since peak less than a month ago. Tell me more about how it isn't at all related to the terrible netcode behind the world's most non-deterministic clientside-only ragdoll physics. Tell me about how that guy grabbing your tail from impossible distances isn't at the very least annoying.
>>106556What you're talking about is P2P. Fine for coop but what you're talking about is essentially client authority. Depending on how deterministic your game code is, this may or may not lead to desync which will be your biggest problem. This can happen if the enemy entity moved differently for you because your friend was lagging on your client than it did on your friend's computer. You need to get clients to "agree" on the correct state of the game world, either by keeping track of who lagged harder, who has the move valid looking stuff (if one player sees entities through walls its likely not the right one) or using an overarching management server that makes the important decisions without having to receive real time user position data at P2P tickrate speeds. This allows you as a dev to run a single server that handles many P2P sessions.If you want to learn more about this type of architecture check out the video imma link below at around 5:30 mark after the game trailer is shown. It's for a mmo type game, but the important and most stable shared P2P experience is the "wing" feature that allows you to coop with friends. It relies on the same P2P udp netcode that the pvp would run on, but makes sure you are on the same "instance" as your friend at all times which is basically just a fancy word for being part of the same shared P2P session.https://www.youtube.com/watch?v=EvJPyjmfdz0
>>106611>who has the move valid looking stuffmost*
>>106566>Tell me more about how it isn't at all related to the terrible netcode behind the world's most non-deterministic clientside-only ragdoll physicsnever played it but from what I can see from youtube videos it seems like once you tried each mini game a few times the whole thing just becomes pretty dull and repetitive. is there some kind of progression or is it really just a softcore battle royale without any of the excitement guns bring to a br game?
>>106556>I've never read up on online multiplayer works, but I have an idea of a way to do itThen step 1: read up on itEverything you say until then is just full-on dunning kruger.
>>106566>game that requires 50+ players to even start>lost 50% of its playerbase>somehow still not deadnetcode clearly not the most important factor
Can someone break me down what server costs look like? Maybe break them up into tiers. I am trying to make a large world to just dick around in but I have a feeling the performance cost can get huge. Like those 100 player gmod servers that have all sorts of insane addons and +50 prop collisions going on at any given moment.
>>108269Probably obvious, but this would be for renting not hosting. Also do server hosts have security flaws? Like if someone else on the same server gets compromised could it affect me?
How does Overwatch have client authority without cheating or netcode issues?
>>104575>This is pretty much needed otherwise they will all just build as fast as possible towards nuclear weapons and unload everything they got on everyone else, as they currently work.Civ ghandi, eh?>risk dice roll combat with tilesHow big are the tiles? This significantly changes how strategic army movement and ai management can be. If they are risk tier huge then its hard to justify doing anything that isn't choke point abuse, but if they are tiny then setting up army groups becomes more important than anything else.>... and having those structures automatically enables army features within reach ...So, you could place down structures to be forward supply bases, artillery support, sensor towers, etc?>Giving the AI control over expanding your cities will most likely be a mid game tech you can unlockI'd say that earlier is better, but you need to reach a more playable state to really judge that.
>>94337>awsA hosting provider that also does a lot of other things. It's overpriced, and there are hidden fees everywhere. Look around and save yourself hundreds of dollars by buying something that actually suites your needs.>reverse proxyA server that sits in front of other servers to handle load balancing and various other tasks. The most common one is Nginx.>dockerA container system. The idea is that instead of setting up software manually, you can get a reproducible environment you can deploy and manage with a single command (cattle instead of pets)>kubernetesA container orchestrator that manages the state and health of hundreds of containers across many servers. You probably don't need it.Feel free to ask anything else, I'm from /g/.
>>108326>I'm from /g/prove it. post your anime girl background linux desktop environment and programmer socks.>>108299It doesn't. It has a sort of prediction with host authority to sync back clients when prediction errors happen. Client plays the game a few ticks in advance of the server so that the visible delay between pressing the W key and the character moving forward is removed. This pretty much exactly like CS.
>>108299Overwatch has full server authority. If you go search on youtube there's three GDC conferences (one about networking and architecture, one about networking scripts and one about replays) that, together, go realy in-depth about how Overwatch's netplay is implemented
>>108321>Civ ghandi, eh?Yeah I guess this is the most basic type of AI. Takes over the entire map peacefully as long as there is space to expand then since there are no other actions possible they start attacking. It's placeholder as I just needed to work out the base growth AI to test for any optimization issues when the whole map has been edited. No way I was gonna spend hours doing that manually with the map sizes I'm dealing with.>How big are the tiles?>So, you could place down structures to be forward supply bases, artillery support, sensor towers, etc?Pic related is a closer view of the map. I guess each tile is a few square miles. In my mind the best idea is something like building a FOB within range of friendly airbase to start challenging the enemy "ownership" of those tiles. If the FOB has other military structures within range it will be supplied with that structure's specific military unit (infantry, ground vehicles, sea vehicles, air vehicles, artillery). So basically military installations restrict other players' ability to build anything except FOBs in the same area, and the goal is to manage to attack and destroy military structures in the area to fully take control over any remaining structures. So like in Stellaris when you claim star systems and win a war, you get a boost in resource production (unless you captured shitty planets with negative resource production numbers). Perhaps the FOB tile itself could have various upgrade levels that affect how well your troops fight. Nukes will also come into the picture to help decimate choke points if they happen. >I'd say that earlier is better, but you need to reach a more playable state to really judge that.I kinda want early game to feel like a city builder which then transitions into a large scale wargame once the necessary tech has been unlocked.
>>81970>>82226These are missing some of the novel approaches like Dark Souls and For Honour. Dark Souls is peer-to-peer, all inputs are performed immediately on each peer, there is no single authoritative state and instead each peer has authority over a different part of each player interaction.So when one player attacks, the attacking player gets to decide if the attack is on target, based on the (delayed) location data they have. The input to start the attack is sent over network and the attack then begins its animation from the beginning on the other player's screeen, which obviously means delayed timing. The player being attacked then gets to decide if the attack was blocked or dodged, which allows them to see the full animation and still time their dodge as if they were on LAN. This leads to hit confirmation being delayed and also the situation where player attacks which look like they're too far away will hit because the attacking player's location data doesn't line up with yours, but it achieves all the important needs for the gametype. Namely that both players can attack and reactively defend against all attacks instantly without needing to lead ahead or roll early to compensate for latency.For Honour uses a twist on that system where the attack is confirmed to be on target very early in its animation, before the swing completes. That confimation is sent over the network and then used to slide the attacker into range during their attack animation, making it look like any confirmed hit is actually in range.
>>108433>The player being attacked then gets to decide if the attack was blocked or dodgedSounds extremely easy to abuse
>>108269>>108282Don't worry about server costs nowadays they are dirt cheap. You can get away with plenty if you just have a cheap $10/month vps for custom solutions but in the case of gmod servers what make the price skyrocket is first the windows license and then lua scripts are often pretty unoptimized making the server grind to a halt if the owners are reckless with what they slap on it. A good enough dedicated server to handle heavy load from games like that and still have plenty to spare is about $50/month.About security it's unlikely you'll be affected since most competent providers make it their mission to prevent customers from accidentally fucking with each others BUT if someone figure out an exploit one day it's still a possibility. Just secure your things like you would usually do and hope for the best.
these posts are invaluableplease tell me what to read to master net dev so I can be a guy regular devs will want to pay so I can have a job in networking I wouldnt mind waging for
>>108999Cause that's bullshit, For Honor's deterministic rollback, basically like fighting games, there's a whole GDC presentation on it
>>109314don't just read, start making something and read along the way
>>109074Not that anon, but is it still a good idea to run servers off of an AWS EC2, or are there way better options these days
>>109368The GDC talk explains that they use rollback to override hit effects with active defense actions that happened in the past, using timestamped inputs. You can see this in game in the same way you see blockstun/hitstun override each other in fighting game rollback. What it doesn't explain is what anybody who plays the game can see - That they're fudging player positions by sliding models around mid animation, which requires the attacking player to have confirmed they were on target before their attack completes. The distance travelled mid animation in the webm is of course not the natural range of this animation.Under fighting game rollback you may see the other player teleport forward if they used a forwards moving attack or dash and the input took several frames to reach you. The input happened in the past and so you end up skipping several frames and seeing the other player appear mid movement/mid attack. But this isn't what's happening in FH. In the webm the input to begin the attack has clearly already reached this peer, but the attacker's position is then modified after the fact. The attacking player ALSO sees this slide on their own screen, because the attack being on target is confirmed before it reaches active frames and will slide after the other player if they attempt to move out of range.
>>109839Apparently azure is good but honestly can't say, i've never had to be the one who had to fuck around with these scalable vm.
>>108269>Can someone break me down what server costs look like?as someone who tried to understand what the cost would be to run on AWS.... it is intentionally made to be incomprehensible so they can surprise charge you.
>>109887The point is: it's still server authorative, it's not actually the peer being attacked that decides, it's the server's slave.
Is it significantly harder to due authoritative netcode for VR games? With things like fullbody tracking it seems like it’s especially easy for clientside exploits to happen
>>109887No. Pic related, from the GDC talk you didn't really watch or read. The fudging you're seeing is because instead of visually snapping to the revised state after a rollback, they lerp over a couple frames. Fighting games prefer the state to have as little lag as possible so they go for teleports but the entire array of usual visual tricks is available as long as you're OK with a bit of lag, as For Honor is. None of that has to do with the concept of authority.>>110076No, the whole idea behind that peer to peer model is no one needs to be authoritative (or, alternately, you can consider everyone authoritative, it's the same thing. That's what it means to be a peer). Instead, everyone's running the same deterministic sim with the same inputs so they get the same confirmed frames (by confirmed frame we mean an update frame that's beeing using confirmed inputs from everyone, as opposed ot predicted frames). If someone's trying to cheat by altering the sim their confirmed frames's checksums won't match the other peers and they'll get desynchronized and fall out of the game.The main weakness is that on the other hand you can cheat on the inputs, with macros or wallhacks or bots since you always have knowledge of the full confirmed game stateas each peer runs the complete sim, you can't filter a player to only have the stuff in their surroundings or FOV like you could with a client server model.
>>110646what a shitty system for a competitive game, just spoof the inputs and they're accepted? how does that make sense
>>110455>Is it significantly harder to due authoritative netcode for VR games?every game will have it's own unique challenges so no not significantly.>With things like fullbody tracking it seems like it’s especially easy for clientside exploits to happeni take it you mean something like the client spoofing their body positions so they can say, reach out and stab you from a mile across the map?....i think a reasonably clever solution to that would be to ramp down damage output from the stab-box the further away it is from the body-box going to zero damage output at a certain reasonable maximum human wingspan length. this way you're not only preventing hacks you're also balancing player's natural body variation advantages.
>>110646>The fudging you're seeing is because instead of visually snapping to the revised state after a rollback, they lerp over a couple frames.The slide isn't a rollback you disingenuous tit. It slides forwards to a position that is well ahead of the position the attacking player would have seen their target in at the moment of the input. There's no number of frames you can smooth over which will result in the attacking peer ending up in front of the position they began in on their own screen. With just the features in your bullet point list you can't produce magical rollerskating players who gain extra range on attacks **in their own gamestate** just because their target is moving away.
>>110658inputs will only produce agreed upon results. Like, you can't cheat on your speed or you'll desync unless all players have the same cheats active on the same characters, in which case no one's cheating, you're just all playing with the same mods (that, or the cheater managed to hack all other players' computers before running the game, in which case it's not the game that's compromised, it's the computers).That extends to input sanitization since that's part of the sim. If, say, you want toprevent an aimbot from changing orientation too fast, then you make a check on orientation velocity and any client not doing the check will desync.So the only ways to spoof inputs are the same you'd get in a client-server model, emit inputs that'll pass sanitization. Any check you'd do server-side, you do on the clients instead, and anyone not running them will desync. The only problem is telling who cheated if at least half the players were running the same cheats, but even that can be solved by adding a trusted spectator, ie if there's a desync all client send their input streams and desync checksums to a trusted referree machine that'll run a sim with the provided inputs, and any checksum that doesn't match indicates a compromised client.No, the real problem is that each client has the full info so wallhacks and suchlike are trivial. That's why that model's most useful with genres where there's no hidden information anyway, ie fighting games, arcade games and games without any form of fog of war
Anyone here has experience with UPnP? My approach so far is to have host require a good old port forward but I'm pretty sure I could be using UPnP instead but I can't seem to find good info on the implementation. I get that it's like requesting a port to open on the router without having to have router admin rights, none of the socket libs mention it anywhere.
>>111404You can spoof input to always block or dodge in perfect timingAlso>If, say, you want toprevent an aimbot from changing orientation too fastThen just make the aimbot .01 below the allowed max vel
>>112820As mentioned before, both objections stay the same for almost any authoritative model. The only one that'd escape that is stadia-style streaming
>>112916actually, even Stadia-style streaming only prevents stuff like wallhacks, spoofing inputs is still fine
Great thread, v interesting.
>>80760how does one optimize a destructible environment for multiplayer
>>113592>Great threadThat's the first sign you're not on /v/.>>113669Probably obvious but:>Only send updates for destructible terrain for people who can actually see it>Utilize hot/cold data as much as possible to avoid useless calculations>Figure out what your destruction algorithm is, voxels is the #1 goto but there are other>Data-Oriented Design
>>113669>>114025To add to that, when you need an extremely large amount of edits to be made after a single event like an explosion: >Send the origin point and stats of explosion (radius, strength, etc)>Perform explosion locally on every client>Server takes area containing the edited data and creates a low strength 32 bit hash value>Send edit hash to client>Client generates edit hash with edits performed locally>Compare both hashes to validate editsNo perfect, but as long as hash collisions are not likely to happen for closely similar edits this allows you to send basically any size explosion event in less than 10 bytes for a reasonably sized map:>2 byte long USHORT for explosion radius>2x3 byte long USHORT for explosion origin x,y,z>4 bytes long INTEGER for the validation hashIf your game has minecraft tier infinite terrain generation then you also pass the chunk x and y position, and then your origin X and Y can be toned down to fit inside a data structure that contains them. I think Minecraft chunk have inner coordinate structures that fit inside of a single byte ( 0 - 255 ).
Y'all might like this video on rollback netcode.https://www.youtube.com/watch?v=0NLe4IpdS1w
A bit more related to general game dev than multiplayer but since chat is pretty much mp only imma post this here : is there any way for international games to avoid chat spamming using fucked up character sets like the below vid? This can be not only annoying but game breaking if your teammates are using text chat to communicate, since public chat messages still clear team chat and sometimes griefers / cheaters will spam that shit in chat the entire game. In my mind this could be fixed by having the UI code compute the size of incoming chat message and when they are too long they get reduced to a single line with a foldout button you can click if you dare to look at the detected wall of text.https://www.youtube.com/watch?v=kxVju18JgCU
>>117120Just limit the area where the text is rendered for each line of text and cut off the rest. A better solution is of course to not use unicode at all for your character sets, absolute cancer standard
>>117120Correctly support UTF-8/16, escape said string, limit the characters to Latin only, use ASCII instead, etc.
>>112027UPnP and NAT-PMP are great, but don't rely on your player's router having them.And for the love of god, clean up your ports when you're done with them or keep a low expiration. Anything from webcams to other servers will be exposed, and it will be your fault.
>>118940>but don't rely on your player's router having them.In Arma 3 you can turn it on or off depending on whether or not you have it, but most code I found for that stuff seems to be able to list available upnp devices if they exist so my idea is to detect it upon a player trying to host and if its unavailable on their router then a popup message shows up saying they need to port forward to host on WAN. With connectionless UDP sockets I force the client into opening a routed WAN port by having them send a datagram to a known port forwarded WAN server endpoint. Without even touching UPNP request code, the router will open a (random?) unused port like 23142 and the server can respond to the public IP at that port to talk to a client behind NAT. I'm a brainlet when it comes to this shit, one of my old college cs buddies wouldn't even believe this works. But I've tested it and it works, so he must be an even bigger brainlet.>And for the love of god, clean up your ports when you're done with them or keep a low expiration. Anything from webcams to other servers will be exposed, and it will be your fault.Usually when ports are not properly cleaned up you get clear issues in testing. Like sockets not being created anymore because the port is still in use after restarting the game. With game crashes, nothing much you can do other than have a low expiration. With UPNP though, that shit is router side, so I have no idea how to clean that shit up. I can't believe this is too complex for me to figure out eventually, but I'm starting to think I might as well just have server hosts forward a port on their router, and undo the rule when they are done hosting. maybe that's more unsafe than upnp lmao.
>>119384just tell them to use hamachi or whatever
>>80760Does anyone know if there is a game that uses actual p2p networking (not relay), i suspect GTA V is doing it but i'm not sure
>>119424almost all fighting games, almost all RTS, For Honor. Also pretty much any emulated game that wasn't already client-server before emulation.
>>84615with yotsuba as the main character
>>80813>Reply count 152Laugh at this loser
>>121912reply count is inflated by faggots like you
>>1219723 post per user average based on IP count is bretty gud for a thread I didn't expect to take off at all.
>>122348People are interested in talking about this stuff. All the places to talk about it are infested with no-devs who worship e-celebs who make shitty games, so anything new that pops up before the cancer arrives is bound to take off.
>>122352>before the canceri been posting in this thread since day 1 so your theory is wrong. cancer wins again.
>>122766still less cancerous than the gamedev r*ddit
>>123499it's fine to not bump it, if there's anything new to discuss we can make another one
>>122766Show me a less cancerous place to talk about gamedev at this exact moment.
how do we make the source engine more multihreaded
>>124087Haven't looked at the source engine's code myself but I feel like valve would have done as much multi-threading that is feasible (although thats most likely all in source 2) A lot of the time the single threaded flow is just too heavily ingrained in the engine to rip out without basically rewriting the whole thing.
Roommate set up a server for fun a few months back, and recently closed it because it ended up causing what I can best describe as a lot of throttling. The idea was kind of neat though, and I'd almost want to set one up for a game that isn't dead. How much would it cost to buy a PC that could run, say, a tf2 server decently, and is there a way to prevent it fucking up our internet again?
>>124514Ah yes. The /agdg/ thread that is constantly spammed with "How do I make minecraft in godot", people arguing over languages, attention whores, discord cancer and other meme shit. With maybe 1% of whats actually there being of value, much like everywhere else. I haven't popped into /gdg/ though.
>>80813>This thread is doomed. Prove me wrong.
>>124569You’re right, sorry
>be writing netcode assuming TCP sends packets individually>find out the hard way it sometimes concats sent bytes from different Socket.send calls>read up on Nagle>turn off Nagle hoping it fixes the problem (never do this)>it doesn't>forget about Nagle>decide to just write a function to parse out individual packets from combined byte arrays>works great while testing on a stable LAN connection>try it out on WAN using phone data connection>old shit phone getting very choppy signal >can go from 1 to 5 bars in a second>received data splitting algorithm starts throwing length error>like it's reading a length value for a packet that's not there>not sure wtf is going on but clearly data is getting corrupted/lost>start looking shit up>find a single stackoverflow thread that sounds similar>answer to problem mentions Nagle>epiphany.png>comment out the Nagle disable line>think "that's probably not the issue">everything starts working as expected>mfw
>>124539you either misconfigured the server or some ching chongs started rattling the locks, trying to get in and plant their spamming viruses. this is also why you don't have a vps with a public IP and qwerty as the ssh password.
any cheaters in here? does anyone know of any decent packet sniffers/decrypters/editers? >>105026> not sending clients information they shouldn't be aware of.interesting. so, on a game like, say maplestory, is it possible that there is some information that pertains to your character in particular, that's being stored on the client instead of the server? (namely sp, hp, mp)
>>125913>packet sniffers/decrypters/editers?To sniff packets, Wireshark. The only cheats I know that do this are made by gaining unauthorized access to the netcode (either through reversing or leak) to look at the packet structure, find out if any encryption is used, and then you can set up a man in the middle type packet editing hack. Most of the time no encryption is used at all. Some hacks (especially wall hacks, esp) work regardless of encryption or no encryption. Go look on cheater forums after a new csgo ban wave occurs due to signatures databases being updated. Takes a few hours at most for some nerd to have reversed the netcode and posted the new offset for each piece of information contained in packets.https://www.youtube.com/watch?v=UmYXklmjw4M
>>125105>or some ching chongs started rattling the lockshow often does this happen?
>>94409socket io shouldn't be tied to JSON, as long as your data is serializable, its can be emitted.
taking computer network this year and found this thread.
>>127897don't, not a fun course, unless they do erlang
>>127900already app-layer/ UDP TCP layer deep. so far just theory no actual work.
>>127907>so far just theory no actual workwhy tho? my first network programming classes were all hands on. theory for an hour then apply the theory. within the first week we'd already got a basic console socket chat running.
>>127897If you wanna make netcode for games you're gonna learn more in three days coding a UDP connection in your spare time than in a whole networking course.
>>128212>>127934skool is shit. Don't have much free time to do extra curricular stuff.
>>127907>>128212this is why I said don't do it, unless they do erlang (or another idicator of practical work). I had one first year, it was all theory, absolute trash course.Then had another network course on final year, it was CSP theory with erlang on practical side. one of the best courses I did in Uni
>>128706First time hearing erlang. Whats the book name for the csp theory with erlang?
>>129115CSP is seperate. You can apply it easily in erlang. We didn't follow a book that combined them, but maybe there is one if you wanna look for it
>>127934>week to make a test chat programnice class faggot
>>129209>have netprog class twice a week>first one of semester was introduction>second one is socket chat>2 hours (one class) total spent on topic so farUr dumb af. But the class is still trash, not because we didn't learn anything in a reasonable time, but because you can find this information for free on the internet and learn it yourself. So essentially paying for a teacher that will regurgitate documentation is a waste of money. I still don't understand why /g/ is obsessed with books
>>130318>I still don't understand why /g/ is obsessed with booksanyone who recommends books for programming is either ironic-troll or unironic-boomer.
>>131656A lot of languages have downloadable offline documentation that will be more accurate, easier to use and faster to navigate than a book. Buying books is for people who like to appear smart by filling up bookshelves. Women unironically buy books they will never read just to decorate a room.
>>132693Yeah, no. Documentation is good when you already know how to program. Documentation won't teach you good practices nor programming patterns.>Women unironically (...)Who cares about what women do. The retard that think books are stupid, go figure.
>>132693well, it makes me eager to see what kind of multiplayer game you'll cook up, anon
>>131656He is 100% right. There was only one time a programming book helped me and it was an OpenGL book that had a solution for a problem I couldn't figure out. If you're using a book in 2020 you're unironically retarded. No one is impressed by your collection of crap you binge read only to forget 75% of.
Please friends. I know(ish) how to code. I understand data structures and algorithms, and I can at least implement something if I know the general process. But can someone tell me, or point me to a source on how to STRUCTURE my code? I have scripts doing a lot of things they shouldn't necessarily be doing because it's easier. But my code gets jumbled fast and I spend too much time refactoring, else I just end up working with the weird boundaries I put on myself with whatever code I already have in place. I just want to know good practices for structuring code, staying organized, not making functions/classes do to much, when it's ok to just do what works and when it's better to do what's best. I hope I'm making sense, because this has been a real barrier for me. I feel like something just isn't "clicking" for me even though I have all the pieces
>>134663This isn't something you can really learn by reading articles or watching tutorials. Much like Bob Ross sees what he's about to paint in his mind on the canvas before he does it, writing complex programs takes abstraction to a whole new level meaning you have to imagine your program. You have to think ahead of time about what you will need out of your code, and the structures emerge naturally. Setting boundaries on yourself only means you didn't think far enough ahead. Write self contained classes that can be changed without breaking everything else. Anything unrelated to overall program management should not have an omnipresence in your program, this is what leads to spaghetti. These are things you learn as you make more and more programs. You start to recognize situations where certain patterns or structures are better than others. Just keep chipping away at incrementally complex programming projects / problems and eventually it will click, but even as an experienced programmer it's easy to lose track of what parts of your program are supposed to do. Don't worry too much about optimization until your program works as expected. Constantly expand your skill set by refining existing knowledge, leaning new languages and exploring entirely new areas of skills. You're on the climb side of the Dunning-Kruger. Your confidence in your own skill will slowly increase as you keep it up.
>>134663>But can someone tell me, or point me to a source on how to STRUCTURE my code?It just comes with experience. After you've refactored things 100x burned down enough attempts and started over eventually you just know what works and what doesn't. For me personally it was when I started doing Data Oriented Design that was my breakthrough. Basically C-style programming that makes sure the data is super optimal.
>>125104The good old "pound it until it works" method. This is why employers don't hire nongraduates.
>>134949Is the graduate method to do the exact same thing, pretend it didn't happen and act like an elitist faggot about it?
>>134949>The good old "pound it until it works" method. This is why employers don't hire nongraduates.But that's literally how they teach you to code in school.
>>135399Really is there a better way to debug a complex program? I mean unless the error is a typo or syntax mistake, which you can find by looking at single lines of code, logical failings require you to either simulate the entire program flow in your mind (near impossible for complex projects) and see what doesn't go down the way you want it to OR do step by step debugging with breakpoints, which personally is the next step in my debugging process after quickly changing lines I feel may be responsible for the problem I'm having. If I had to list the "levels" of my debugging process:>1: Look for dumb single line mistakes, uninitialized arrays, typos, etc>2: Basic logical analysis, look at multiple lines for harder to spot mistakes>3: Tweak lines of code I assume to be responsible despite having found no logic flaws>4: Breakpoints, Console Debugging, Dumping var states to see wtf is going on>5: External debugging tools, Memory analysis, Packet sniffingSo far I've gone to 5 twice in the past 2 years. Once to debug a shader problem that against all odds I managed to prove was the result of a faulty NVIDIA driver, using a tool that disassembles and debugs live shader code, the other time was to figure out why chat message packets were cutting off any other data sent after the message (fuck null terminators). Is that supposed to be the graduate method? In my experience, even when you end up changing something unrelated to the bug it's much faster to "pound it until it works" when you're pretty sure about what the bug is.
>>135851care to explain how this post is a reddit moment?
>>135732They don't even teach you how to do half the shit you listed in school. They didn't teach me unit tests, valgrind or fucking anything. I had to teach myself. I work with a guy who has a PhD. Dude is a terrible programmer.
>>135864It's the graduate shill asshurt he put himself into 2x as much debt just to end up in the same position, same skills and same pay as someone with a bachelors.
>>135880>Siding with a redditorBig, fat, smelly reddit moment right their, pally.
>>135888>Got useless Master's Degree>Paid 2x as much as a Bachelor student>Paid 4-5x as much as someone who circumvented the whole thing and went for a trade school/certsNo amount of shitposting will hide the asshurt you're trying to hide.
>>135899>Bruh bruh anime moment bruh. Bro... bruh, Reddit. Anime bruh, le funny anime lady, bruh.
>>135920>>135913>>135904>>135899>>135888>thread going fine>someone says the r word>shitposting ensues like pottery
>>136048>Bruh cope, bruh. Seethe cope, bruh, seethe. Cope cringe cope bruh, seethe bruh.
Anyone here dreams in code?
>>136072What happened to this faggot?
>>136091the fact that you're even wondering that aloud should answer your question
>>136110He died of AIDs?
My main issue with development is that i simply dont see a feasible way it will end well or in a timely fashion without going into starvation
>>136200Do it on the side until you realize there isn't enough hours/energy in the day, then save up a shitload of money and take a year off to see how far you can take it. That's what I'm doing at least.
>>136413>Do it on the side until you realize there isn't enough hours/energy in the dayi hate this
How/where do I learn to design a game? Have an idea of what I want to make, but can't make it come into something cohesive
>>138025Unity / C#
>>134663>But can someone tell me, or point me to a source on how to STRUCTURE my code?The aim is basically to make it easy to change stuff, so you've gotta minimize dependencies. Like, there's no reason the code that makes an actor move around should know about how the actor is drawn, stuff like that. So you're gonna naturally divide your code into categories for gameplay, graphics, sound, input. asset loading and so on.But also, you're gonna organize that shit in layers. Like, the code that deals with access to the machine, like file IO, memory management, input device enumeration and so on is isolated from the higher level concepts built on top of them. A good way to understand that layering is to wonder, what if you were to make a game in a different genre, how much of it can you reuse? That goes into a lower layer. What if you were to make a different game in the same genre? Upper layer.Like, for example I'm coding a fighting game. My input code is basically on four layers:-OS layer, using directInput and/or xInput or the steam controller API or whatever, it keeps track of what controllers are connected and when they connect/disconnect as events for the next layer, and can poll the state of all controllers (including keyboard and mouse).-virtual controller layer: this takes the data from the previous layer and present it as a generic fighting game controller (are up down left right LP MP HP LK MK HK pressed or not?) based on user-definable bindings. It also handles said binding process with events you can manage from a GUI. The underlying physical controller may be a keybaord or gamepad, whatever, to the layer above this one will make it look like it's all just the same kind of fighting game controllers. If you wanna make a RPG with the same engine you can just swap out that translation layer with another one.(continued)
-player input layer: this is the one actually dealing with genre-specific fighting game logic, and accessible from the gameplay module. From its point of view controllers can be assigned to P1 or P2 and it manages an input history so it can answer higher level queries, simple ones like "was HP pressed this frame" but also more complex ones like wa ther a shoryuken input within the last 30 frames and suchlike, through a command scripting language basically like Mugen's (so a fireball is "~d, df, f+mp")So each layer builds upon the previous one. Networking's the same, there's a connection layer that's dealing with UDP packets and handshakes and matching the game versions and sending reliable or unreliable messages, then on top of that there's a session layer that you just tell to connect and then it'll tell you when you receiver messages like character selected, palette selected, remote in-game input, remote player quit, and sending similar messages to said remote player. And then on top of that there's a layer that just checks if new remote inputs have been sent, works out up to which frame we've got confirmed inputs, and rolls back accordingly.A good way to get a feel for that kind of stuff is to read up on MUDs, divided into driver (the OS stuff), mudlib (the virtual machine that's accessed by gameplay stuff) and the scripts themselves. So to make a new mud you get a driver and mudlib and then script your stuff on top, just like how for graphicla games these days you'd get Unity or Unreal and script on top.
ive got dreams for an extremely fast paced multiplayer fps, but i don't know jack about code and id probably be doing it on my own. how hard would it be to do? and assuming i dont get overwhelmed and quit, what language/engine should i pick up to start? ik youre supposed to start extremely small and i plan on that, but this being the primary goal how should i go about it?
>>139029Unreal Engine's the obvious choice, it's basically wired to do that in the first place and you can get tutorial files that have it all wired for you so you can concentrate on iterating on that.
>>139031unreal engine is so fucking soulless
>>139031i was thinking unreal, but ive heard its pretty hard to usewould you say it is compared to the other stuff like unity?
>>139063Try one and decide for yourself, both have multiplayer FPS samples>>139052It's only up to you to make it soulful like, say, Arcsys did. At th end of the day if you wanna make a game you're gonna have to start looking for solutions instead of excuses not to do it.
Is it feasible to create a system that attempts to synchronize client and server ticks as well as possible? Like, if you send updates 30 times a second, you'd sample player input some milliseconds (depending on ping) ahead and have it reach a server right as it's about to be processed and sent back to the client.The results over LAN are promising, but the internet is a whole different beast.
>>140266basically the last 25 years of multiplayer development have been about dealing with the fact it plain isn't possible outside of a LAN.
>>140266Waiting until the remote endpoint (server or peer) has received the input to process it locally is input delay netcode and it only feels tolerable for indirect control games like RTS, using a few tricks like sound cues to pretend the unit's responding ahead of its real response. For action games that model was found to make everything feel too sluggish.
>>140386I was thinking of an adaptable system that dynamically determines the size of a FIFO packet buffer to keep things consistent.The biggest factor here really is jitter. If you know that the ping doesn't deviate much, you can easily maintain the sync.This of course heavily depends on the game architecture. I am speaking from Quake modding experience, which I can manage to get somewhat stable over an internet connection without interpolation.
>>140266it will always result in an advantage for high ping players. see: diabotical
>>140266>>140386>>140430>>140436What system does Overwatch use? It's always felt very different to me than other fps games, and not in a good way.
>>140436I am not referring to lag compensation, quite the contrary, I want something that works well without lag compensation when pings are low.
>>140432>>140467Adding a FIFO input queue is adding lag, by definition. That's why lag compensation is necessarily part of the discussion. Them's the basics>>140457Overwatch uses a variation of the Tribes model. Sim runs at a fixed update rate of 60Hz.Let RTT be the round time trip, the time it takes for a packet to go from a client to the server and back. The server's authoritative and each client is running RTT/2 milliseconds behind. That should introduce input lag equal to RTT milliseconds plus a safety margin (send the input, server sim, send the sim result back, plus the safety margin to account for jitter, that's the fifo thingie, everyone thought of it 20 years ago, it introduces extra lag as mentioned above). To compensate for that, on a client the local character is "predicted", ie it responds instantly and uses rollbacks to correct mispredictions. So the local character is always RTT milliseconds ahead of its true position and actions or, flipping the table, the simulation is always RTT milliseconds behind the player. So that you do not miss your shots, the server keeps X milliseconds of collision history for all moving objects, to that a hitscan shot can be checked for collision "in the past" (although the effect will be applied in the present). Impact visual effects are directly guessed by the client for immediate feedback though, so they can be wrong. Abilities or weapons with a windup are applied in the server's present but will have the windup shortened by RTT/2 to compensate (a method invented by one of the Halo games).This gives an advantage to high ping players, so there's a max rewind of 220ms. If your'e above that, the client starts extrapolating everything for lag compensation and impact VFX are server-side too.In case of extreme jitter or packet loss or wall clock drift, the client is slowed down to grow the input buffer and have more leeway. Once things calm down, the client is sped up to shrink it.(continued)
>>140800Although the server and client run at 60Hz state updates are only sent through the network at 20Hz for bandwidth reasons. Within that, some actors can be updated at a slower rate if they're deemed less important to the player.
>>140800>That's why lag compensation is necessarily part of the discussion. Them's the basicsThe idea is to achieve a network response time so low that it's no longer the main bottleneck.Pings well below 30ms can be had whilst playing across Europe. This is lower than a single frame of a "typical" console game.The problem is that no matter how low the ping is, the delta between server updates adds latency on top of it all. This can be brute forced with an insanely high packet rate, and so many Counter-Strike GO servers tout 128Hz tick rates.Lag compensation isn't a silver bullet, and it works terribly with non-hitscan weapons, such as the rocket launcher in TF2.
>>141194No, you don't get it. I'm not talking about internet lag, I'm talking about buffer lag.Tha'ts the whole thing with input buffers. You want four ticks worth of input buffer, you get four ticks of lag. That's how buffers *work*.The point of an input buffer is not to reduce lag, that's not what they do. Instead they mitigate lag spikes and packet loss because you can accomodate variations in the rate at which inputs are received.----But yeah, to top it off your thing about 30ms pings is just a pipe dream. Yeah, they happen, but they're the best case and super vulnerable to the vagaries of your ISP, whatever router you're going through on the way and how much porn your neighbor's dowloading. Worse, as your tickrate ramps up your packets are more likely to be dropped because said routers will see you're hogging the line. The first thing you have to learn in network programming is you'd be a fool to program only for the best case, because that's the case that's always gonna slip from your hands. Don't be like the Stadia dumbasses.The only way around it is to build or rent your own optmized internet routes throughout the world, as Riot is doing, but let's be frank here, you don't have Riot's money and even they aren't planning on garanteeing sub-40ms ping anyway.
>>141261>Instead they mitigate lag spikes and packet loss because you can accomodate variations in the rate at which inputs are received.Well, that's the whole crux of it.If all relevant equipment is worthy of being designated first-world tier, jitter and spikes ought to be minimal and rare, and buffering can be minimized accordingly.It's not about just optimizing for the best-case scenario, but rather to not prioritize worst-case scenarios, which ought to be avoided by players anyway.
>>141392>jitter and spikes ought to be minimal and rare"Ought to", haha. Well, whoopdy doo, they aren't! Well, it's not a surprise to anyone who ever tried to implement multiplayer over the internet. Instead, jitter and spikes are super common. This is because even first world tier internet isn't designed for low latency but for high throughput. Avoiding spikes isn't a concern, in fact it's normal router behavior to induce them. No one outside of games minds because the web is built on TCP, which prioritizes reliable delivery but doesn't try to achieve low latency at all."I'll pretend the basic problem every netcode programmer has to face doesn't exist" isn't a bold new approach, it's just denial that'll get you nowhere. This isn't prioritizing the worst case, it's understanding the worst case exists at all.
>>141709I must have some godly routers in my vicinity, then, for I have had some pretty darn stable connections across the North Sea.>No one outside of games minds because the web is built on TCPYeah, no.There's this little thing that has grown immensely in popularity among workers and students thanks to a certain virus. Musicians also make use of it, and they demand responsiveness just as much as gamers. https://www.youtube.com/watch?v=Sj6Ij1Oxe1s&ab_channel=JazzNightinAmericaYou know what people also ought to do more? Make use of some basic fucking QoS.
>>141869>I must have some godly routers in my vicinity, then, for I have had some pretty darn stable connections across the North Sea.Again, if you design your netcode based on your local connection you're just being in denial. "my connection is stable so that means the whole internet must be! I'm a genius who solved lag!!1!"Jacktrip only support what I was saying. They built a custom UDP protocol using a variable size buffer, same process as Overwatch and other games. The buffer, and latency with it, grows if the connection's unstable, and they have a packet loss concealment system that extrapolates sound for dropped packets (again, same as games have done for the last 20 years).They have those things because they designed for less-than-ideal connections rather than just going "duh my connection's good so the whole internet must be". It's all in the docs you didn't read.
Are there any good resources for UDP netcode in C# for trying to create what's basically a port of GGPO to C#? I've been poring over the GGPO source code, but the WinSock API it uses is some arcane wizardry to me. I've noticed there's another attempt at porting GGPO to C# called Backroll, but it's alpha-level stuff with little documentation, so I only have a vague grip of why it is written the way it is.More specifically, I've run into the following problems:>Is there some router/NAT shit you need to take into account if you want to connect to a foreign UDP socket? I fear it's going to give me shit once I try to connect to foreign endpoints outside my network.>How do you synchronize both players to start a game at the same time? Even locally, one player is always 1+ frames ahead of the other.
>>141893System.Net.Sockets.socket is the Winsock equivalent in c#. You can begin there: https://docs.microsoft.com/en-us/dotnet/framework/network-programming/socket-code-examplesYou're gonna make your life immensely simpler if you follow the asynchronous examples (so that the network thread is managed automatically) but since the messages are gonna be received on another thread you also need to read up on locks and possibly non-blocking queues.For synchronization, basically if you have an idea of the RTT between the two endpoints (ie just ping a couple times for measurement) you can tell the remote to start X-RTT/2 milliseconds after receiving the packet and start yourself in X milliseconds:https://gamedev.stackexchange.com/questions/32118/how-to-synchronize-clocks-in-multiplayer-gameThe sync isn't gonna be perfect but even if it were it wouldn't stay perfect anyway (due to wall clock jitter), so you add the notion of rift (it's named a number of things depending on the article). Whenever you send a packet you include a timestamp (or command frame number if you use fixed update) so by the same principle for the receiver it must mean the sender's local time is timestamp + RTT/2, then you speed up or slow down slightly so you'll come closer to that time (if you're a client and assuming the server's always right. If you're a peer then you only slow down, to sync with the peer that's the most behind).That way all endpoints are always kept somewhat in sync.
>>141893As for the router/NAT stuff, no point worrying about it until you've got your protocol sorted out. Until then, if the endpoint that doesn't initiate the connection (server or remote peer) is behind a router it needs to have the proper port forwarded.First test and debug with the two endpoints on the same machine. Then on two machines on the same network. Only then over a router (which you can actually do with a single machine as long as the IP you try to contact is the exterior-facing IP, using the forwarded port). At all levels you can use Clumsy to simulate terrible network conditions: https://jagt.github.io/clumsy/Longer term, if you're client server then all you need is for your server ports to be properly forwarded. If you're peer to peer but don't want your players to bother with opening ports then you need a rendezvous server for NAT hole punching but that's a whole other can of worms. You can find third party libraries or even services for that.
>>141923>>141929thanks anon, that'll give me something to work off
>>141934Oh, also, since the MS examples are TCP, here's something that at least ought to give you an idea of how an UDP socket with async calls is set up: https://www.daveoncsharp.com/2009/08/csharp-chat-application-over-asynchronous-udp-sockets-part-1/
>>141890>The buffer, and latency with it, grows if the connection's unstableAnd that growth would invalidate whatever low-latency experience is demanded.I of course cannot generalize from personal experience, but it can serve as an attestation to what one can possibly expect.I just conducted a test that pings a Google server 5000 times 20 times a second with an average ping around that same number. The amount of packages that didn't return within 50ms (the inverse of 20Hz) was below a half percent.Is the rather occasional spike worth completely addressing at the cost of an otherwise extremely responsive and consistent connection? I don't think so. At that point, stutters from disk reads and whatnot are the bigger sources of perceived lag spikes, quite much so on my end.Obviously, far from every connection is as close to being ideal than this, but the takeaway is that for those who can achieve it, low-latency sessions should definitely not be gimped unnecessarily by anti-jitter measures.
>>141956>I of course cannot generalize from personal experience>(But I'm gonna do it anyway)You've got a bright future ahead of you!Here's a stat tracker from a company that does that crap for a living: https://portal.networknext.com/sessionsDirect RTT's the stat you're looking for ("Next RTT" is the one they can sell you-as-a-dev, for going through their Riot-style dedicated service). Do a grep or whatever, you'll see that your awesome connection to google (who I guess you didn't consider would be paying for optimized routes like mentioned earlier) is not representative.>And that growth would invalidate whatever low-latency experience is demandedWell duh, that's why Jacktrip mentions their program's only actually low latency in specific areas. But, again, had to read the docs instead of just watching the video.>low-latency sessions should definitely not be gimped unnecessarily by anti-jitter measuresDo you not get that due to being adaptive, anti-jitter measures won't do jack shit to a stable low-latency session? If there's no jitter an adaptive buffer will shrink to the minimal size, becoming effectively transparent. Same for lag compensation, too.Of course the general experience will still be only as good as the highest lag player when they're shooting at you, but then there's no soultion except "higher latency players should be barred from playing" (those lost customers will gladly go to a competitor who doesn't mind) or "someone should pay to make the whole internet be as fast as my connection to google" (good luck convincing ISPs to do that)
>>141978>>(But I'm gonna do it anyway)I love it when people claim to know what others say better than they do themselvesI can get similar results from some literal-who servers with very little traffic. Google cannot just magically create a highway through the entire internet (well, at least not with net neutrality), I just picked Google because it's the go-to ping test destination. You sure do extrapolate a lot on this network communication of ours :^)>Do you not get that due to being adaptive, anti-jitter measures won't do jack shit to a stable low-latency session? If there's no jitter an adaptive buffer will shrink to the minimal size, becoming effectively transparent.This is what I have been arguing for from the beginning, exactly because many games do NOT do this well. Either there is no such measure, or the overhead is way too conservative.Again, with the modifications to Quake I made, it practically feels like playing single-player over an internet connection, all without any prediction or interpolation.
>>142001>Google cannot just magically create a highway through the entire internet (well, at least not with net neutrality)Sure they can, it's called Dedicated Interconnect. See, under net neutrality you can't pay ISPs to give you a better service but you can build a parallel backbone with endpoints close to ISP endpoints, so you're in control of most of the routers, and then pay ISPs to redirect traffic to your endpoints. That's what Google's been doing, what Riot's been doing, etc. Also, net neutrality in the US was effectively killed in 2018 which is why companies like networknext exist>Again, with the modifications to Quake I made, it practically feels like playing single-player over an internet connection, all without any prediction or interpolationWell then, if you've truly made a galaxy brain version of Quake that eschews interpolation and prediction and escapes the problems that have plagued the industry for the past 20 years, you should release executables for widespread tests, or open source it, or give a GDC presentation, or sell it as middleware, even, cause this is wasted on /vm/, you have a spot in history books and you're gonna make tons of money off that. But your claims have been, in turn, "the results over LAN are quite promising" (well DUH) and "my connection's good", which are the telltale signs of not having tested in real conditions that you'll find all netcode dev literature warns you against.
>>142020>Also, net neutrality in the US was effectively killed in 2018 which is why companies like networknext existDo Americans really?But to be fair, there's an edge case to be made for throttling someone's cat picture session.Either way, Google is still far removed from whatever jungle of autonomous zones lie between users and themselves. Most deviation from my experience stems from the first few hops towards a destination.>But your claims have been, in turn, "the results over LAN are quite promising" (well DUH) and "my connection's good", which are the telltale signs of not having tested in real conditions that you'll find all netcode dev literature warns you against.I never claimed that it works well under every realistic condition, which is what I am querying for, only that it does its job under the conditions I have laid out as a typical first-worlder (I have peers with way better connections). This is more akin to a proof of concept that addresses the expectations I have.Obviously, the literature wouldn't make a general suggestion with a highly bespoke approach. Lag compensation exists because it's pragmatic and tried, not because it's ideal.
>>142050>as a typical first-worlderYou keep saying that but a number of first world countries, US included, have third world connections by your standards.>(I have peers with way better connections)I dunno how many times it can be reiterated, but "[I have/I know someone who has] an ideal connection" doesn't even vaguely approximate the reality of things. You you can get a working sample of a couple thousand people then it'll start resembling reality.>This is more akin to a proof of concept that addresses the expectations I haveThinking everyone needs a high quality connection isn't some new idea, it's literally every beginner's idea. Then the next step is learning it isn't the case and you have to change your proof of concept to deal with the basics of modern netcode.
>>142059>You keep saying that but a number of first world countries, US included, have third world connections by your standards.Because I've been on 4chan for far too long.>I dunno how many times it can be reiteratedIt's no big sample, but I am confident in my estimations. Reasonably responsive connections are just a given no matter where I am in the country.I mean, I would love some empirical verification, don't get me wrong.>Then the next step is learning it isn't the case and you have to change your proof of concept to deal with the basics of modern netcode.I resent the idea of blindly getting into line, so to speak.To draw an analogy, how long did the convention of Hable tonemapping apply? At some point, almost every game wanted to replicate Uncharted 2 after some folks at Gamedev swore by it, but then ACES became the rage.Developers should make choices based on their specific needs at the end of the day.
>>142059>Thinking everyone needs a high quality connection isn't some new idea, it's literally every beginner's idea.Not really a beginner idea. I know why most mp games don't work that way, yet still think that's how it should be. Lag compensation techniques work only when people don't abuse them. And the fact of the matter is that they do abuse them, constantly. Therefore competitive shooter video games should :>not have any lag compensation or prediction systems that work above 70 ms ping>kick literally any player that has a shitty connection >tell third world (south american) gamers to go fuck themselves and get their own local servers>be utterly unfun and impossible to play when on a shitty internet connectionI don't care if the entire playerbase being made out of russians and south americans on shitty connections playing with 200 ms ping somehow landing headshots on everyone is the sustainable way to run a competitive FPS video game. It's pathetic and unfair that in 2020 I still have to endure the fact that if I have a good connection the server might just give me a disadvantage because the lag compensation system can be abused to desync your character and basically speedhack + anti aim. The prediction system is abused by faking your lag, making the game think your character went past a wall while it didn't, show you the enemy location on your screen and allow you to kill them before quickly teleporting you back to the real position. Don't believe me? Go on youtube and look for videos showing off what aimware can do. Fuck, at least good old aimbotting is easy to spot. Nowadays you have to deal with players moving at a speed higher than yours, sliding sideways faster than the feet animation as the lag compensation system tries to keep up with manually lagged packets containing player position info that's just barely within range for the set ping and bullets shooting through character models without registering despite the enemy having the lag.
>>139052>>139075>It's only up to you to make it soulful like, say, Arcsys did. At th end of the day if you wanna make a game you're gonna have to start looking for solutions instead of excuses not to do it.Nah I agree with him. Something about unreal engines shaders or lighting algorithm. Its sterile plastic. Nowhere near as bad as Unity though.
This whole thread stinks of Reddit.
>>144262You can change the shaders, duh
>>144284and how exactly do you know what reddit smells like?
>>144524Because the smell always ends up seaping onto 4chan.
I'm a huge brainlet and I'm making the inventory database for my items.How the fuck would I compress my inventory arrays when networking? I'm using string keyvalues for inventory indexing, but there has to be a better way to network the item data between the server and the client right?Right now I'm networking a string item ID and an integer for quantity, but I want to try to compress those string ID's into a hex system (am I using that right? Bitshifted maybe?) so that the packets are smaller but I'm an idiot and not really sure what programming concepts to research.Right now, it's not an issue, but I don't want to hit an overhead issue down the line where I'm synchronizing huge inventories with tons of unique strings for several clients. I'm serializing my arrays into strings and then compressing it to raw data with LZMA2 before networking to clients to try and keep packets small, which is working fine for now, but probably not very scalable or future proof as a better solution.
>>84615That would be sick
>>145845The way it's done in everything from games to databases is strings are never used as IDs. Instead, each item ID is a (unique) number and that's what you send through the network
>>145896The reason I don't use integers in the primary database is if items get replaced, updated, edited, or added, the number has to be adjusted incrementally, and commands relating to giving or exchanging items will need to be referenced in a dictionary instead of just using memorable name keys.It seems like a lot of upkeep. I considered having it generate a secondary database by counting them linearly and giving them integer ID's upon load and preaching it on the server and client, but database entries would get scuffed if an item is changed or edited because it's generating the database on load instead of having it be static.I guess I could try having it precache on each load and have it translate upon receiving the packet so it only uses integers during the networking process and it goes back to using the string keyvalues once the data is received. Isn't there a smaller way than sending integer keyvalues and values though? Like instead of  = 3,  = 2,  = 9, isn't there a way I can send a packet with raw bit data? Can't you bitshift to merge some data or am I retarded? Or is it doing that automatically once it's networked? Should I even care if it's being compressed with an algorithm anyways?
>>145898You're just trying to make your life super hard for whatever reason. Suck it up and statically assign each item a number. That upkeep you're worried about, of keeping a dictonary, is trivial compared to even the shenanigans your CPU has to go through to handle strings.You'll find no string compression that offers better results than doing that, for that matter. Better theoricians than you have died on that hill for the last 50 years. Their wisdom is yours: assign numerical IDs (and you can then compress the numbers, if needed for that matter).
>>145845maybe you can hash your string item ids? I don't have experience in gamedev but I did some GTAV modding and a lot of strings were going through https://en.wikipedia.org/wiki/Jenkins_hash_function before being used in script/native callsjenkins did have collisions though, so you're probably better off using something else
>>146167That's just using a number as a key though. Note the post that introduced the concept never said how to choose the number. Could be sequential, could be a hash, could be random. You do need to be sure you have no collisions though, otherwise it's worthless as a key.