[QUOTE=Icedshot;49466623]To risk adding my 26k lines of C++/opencl to this discussion:[/QUOTE]
So is your server acting purely as a relay, then? Doesn't know much, if anything, about the game code itself, and just forwards messages from a client to every other client?
Or is it maintaining its own game world (and communicates that world state to its clients)?
[QUOTE=darkrei9n;49464100]Anyone ever got into a case where their includes have somehow become this horrible mess and they aren't entirely sure how its currently messed up? Everything has header guards and yet either one of two files somehow get included again and it depends on the line they're on. If one file is below the other it becomes the issue and vice versa.[/QUOTE]
Sounds like a circular dependency.
a.h
#include "b.h"
b.h
#include "a.h"
Usually solved by forward declaring what you need.
[QUOTE=Em See;49466926]So is your server acting purely as a relay, then? Doesn't know much, if anything, about the game code itself, and just forwards messages from a client to every other client?
Or is it maintaining its own game world (and communicates that world state to its clients)?[/QUOTE]
Yeah, currently the servers are dumb - all hit detection is clientside. I'm planning to add some basic stopping of players cheating into walls serverside (and eg having the servers store maps/playercount etc), but given that its a melee combat game I'm not planning to use the traditional server look back in time hit detection model because its a bit shitey for this
I'm planning to handle cheating by having clients vote on whether or not the reported action is plausible within the latency bounds (plus enough margin for error/variation), that way, player's can't teleport around the map, and reported hits in melee can be checked to a reasonable degree. Cheaters could push the bounds a little, but the voting information would be exposed to clients if they tried to kick someone, and pushing the bounds would put you at a higher contention rate of clients disagreeing about how plausible it was that that happened legitimately. Its possible to do this on the server, but I don't want to faff with having to implement that as it'd be a whole bunch of dedicated code to have it keep a copy of the game world and simulate stuff
Even then, clientside + vac worked well enough for chivalry, and most of the exploits in that game are console commands. Well, other than the time you could pull out your internet cable, run around the map hitting everyone while they were frozen, and then when you plugged it back in they'd all die
[QUOTE=Octopod;49464370][IMG]http://i.imgur.com/moBWrJa.png[/IMG]
not sure about disabling the thumbnail in the corner[/QUOTE]
Thanks, that is it. Damn, it really makes no sense to figure things out at 2 AM, "task settings" was in front of my nose all the time and I didn't even see it.
[QUOTE=Darwin226;49464764]I have two arrays (or whatever collection, but let's say arrays because that's the only choice I can have in C) of items that represent something. I want to map a function over them. I want to concat them together. I want to filter out some elements. I want to do pretty much anything that I can do with actual first class values like numbers. But I can't. I have to allocate new arrays paying attention not the get the sizes wrong, then I have to iterate over my arrays with a for loop, paying attention not to reuse the same iterator or increment the wrong variable or anything like that and I have to manually do what I wanted to do.
This isn't a problem if you have to do it once, but I have to do that EVERY time because there's no way to abstract over the idea.
I want to do `filter g (map f (list1 ++ list2))`. And I want the result to be a new array. Or whatever, it can mutate whatever it wants. There's no way you can express this without having to bother with details that you simply do not care about.
Want to write a generic data structure? Well, you better hope that by generic you mean "only ints". Otherwise you're in for a fun ride.
Want to talk over the network? Open a window? Do a computation in parallel? You just have to talk to these state machines making sure you're as explicit as possible at every step of the way and obviously making sure you don't get your arguments wrong. The compiler won't help you since you're sending void pointers anyways.
The language is completely uncompositional. Sure macros don't look great, but powerful enough to get the best out of the language, sorta with lips too.The only two things that compose are if statements with function calls as conditions since everything returns error codes instead of actually useful values (because, of course, no exceptions).
Writing C is like filling out forms.[/QUOTE]
It's not like you can't define new functions and macros to deal with tedious pieces of code. All I get from this is you just import every single library and only code in main.
Don't get me wrong, but really, saying bullshit things about a language that's armed with a preprocessor is like saying lisp macros are completely useless.
Doing tedious things with this language is part of the fun (I like fiddling with this shit) which you don't like, so we all should back down and agree that nowadays it's all just personal preference.
[QUOTE=Fourier;49461960]Installing Windows.
Downloading (official image) from internet was faster than installing on USB key, please kill me now[/QUOTE]
That happened to me too, but the connection here is .5MBit/s. I ended up burning a DVD instead.
[editline]6th January 2016[/editline]
To be fair, the USB key in question is an [I]incredibly[/I] cheap one.
[QUOTE=Tamschi;49467440]That happened to me too, but the connection here is .5MBit/s. I ended up burning a DVD instead.
[editline]6th January 2016[/editline]
To be fair, the USB key in question is an [I]incredibly[/I] cheap one.[/QUOTE]
I bought a very cheap USB drive from ebay. 128GB which I thought would be pretty amazing for archiving. Turns out the drive's true capacity was only something like 4GB. Everything you store above that was just simply gone. Luckily I only copied my old stuff instead of moving it because you really can't tell something's wrong until you try to open one of the files.
[QUOTE=Darwin226;49467545]I bought a very cheap USB drive from ebay. 128GB which I thought would be pretty amazing for archiving. Turns out the drive's true capacity was only something like 4GB. Everything you store above that was just simply gone. Luckily I only copied my old stuff instead of moving it because you really can't tell something's wrong until you try to open one of the files.[/QUOTE]
Someone's getting negative feedback.
Well, I pulled my first programming-all-nighter. I couldn't sleep at all last night, so I started fixing up my [url=https://github.com/glua/lau]lua mod[/url], called lau.
I fixed a few bugs in the code, then someone *coughsyl0rcough* mentioned that what my ternary operator does isn't properly done.
What happened was when you called ternary
[code]
check true then "true!" else print"false!"
[/code]
It would print false! every time.
This was because when I was interpreting it in my parser it would call everything no matter what, even if it would never be used.
My solution was simple, make each of the possible results into functions, use the ternary operator I added, then call it after the ternary op is done. Use the return value from the function for what needs it..
This seemed really easy to fix, but then I remembered that none of the internal lua c functions were documented at all. I finished a prototype of what I wanted fairly fast, then stared blankly at the computer screen for four fucking hours. [url=https://github.com/glua/lau/blob/16bedda921a7ebbce86cecb7bc8626c236facb27/src/lparser.c#L523]I didn't realize it was doing what I needed the whole time[/url].
ANYWAYS, that finally is fixed. Lua finally has a real ternary operator in my mod!
Thanks syl0r for making me stay awake all night.
[QUOTE=Darwin226;49467545]I bought a very cheap USB drive from ebay. 128GB which I thought would be pretty amazing for archiving. Turns out the drive's true capacity was only something like 4GB. Everything you store above that was just simply gone. Luckily I only copied my old stuff instead of moving it because you really can't tell something's wrong until you try to open one of the files.[/QUOTE]
That's just like marriage
[QUOTE=Darwin226;49467545]I bought a very cheap USB drive from ebay. 128GB which I thought would be pretty amazing for archiving. Turns out the drive's true capacity was only something like 4GB. Everything you store above that was just simply gone. Luckily I only copied my old stuff instead of moving it because you really can't tell something's wrong until you try to open one of the files.[/QUOTE]
That's why I'm too poor to buy cheap things.
[QUOTE=DrDevil;49467989]That's why I'm too poor to buy cheap things.[/QUOTE]
[url=https://www.goodreads.com/quotes/72745-the-reason-that-the-rich-were-so-rich-vimes-reasoned]Relevant wisdom[/url]
[QUOTE=DrDevil;49467989]That's why I'm too poor to buy cheap things.[/QUOTE]
On the other hand, I bought another 16GB USB3.0 (the 128GB one was 2.0) drive for the same price from ebay and it works great.
[QUOTE=Icedshot;49467143]Yeah, currently the servers are dumb - all hit detection is clientside. I'm planning to add some basic stopping of players cheating into walls serverside (and eg having the servers store maps/playercount etc), but given that its a melee combat game I'm not planning to use the traditional server look back in time hit detection model because its a bit shitey for this
I'm planning to handle cheating by having clients vote on whether or not the reported action is plausible within the latency bounds (plus enough margin for error/variation), that way, player's can't teleport around the map, and reported hits in melee can be checked to a reasonable degree. Cheaters could push the bounds a little, but the voting information would be exposed to clients if they tried to kick someone, and pushing the bounds would put you at a higher contention rate of clients disagreeing about how plausible it was that that happened legitimately. Its possible to do this on the server, but I don't want to faff with having to implement that as it'd be a whole bunch of dedicated code to have it keep a copy of the game world and simulate stuff
Even then, clientside + vac worked well enough for chivalry, and most of the exploits in that game are console commands. Well, other than the time you could pull out your internet cable, run around the map hitting everyone while they were frozen, and then when you plugged it back in they'd all die[/QUOTE]
Yeah doing a "proper" authoritative server is tricky, especially for something as tight as user controlled, real-time melee strikes. With Chivalry's mostly-clientside attacking, there is also the issue of players with unstable or high latency connections gaining an advantage (which in many cases was not offset by everyone else lagging from the perspective of the player -- I suspect you could also faff about with only dropping packets in a certain direction). CheatEngine speedhacks additionally, though VAC generally gave those players a visit.
[URL="https://www.reddit.com/r/TheSlashering/comments/3q6qt2/a_new_engine_a_new_name_and_a_bunch_of_screenshots/cwcowfd"]
Apparently Mordhau is making use of a server authoritative networking model now, fwiw.[/URL]
No need to overcomplicate things, though -- client-trusting is a lot more straightforward!
[B]E:[/B] Oh I suppose you could go the other simple route and have the clients be dumb terminals displaying worldstate with no prediction (and thus no reconciliation or timetravel), but that punishes players for having higher latencies and can feel terrible if the gameplay is very fast paced.
Have you got any footage of how the combat works? I assume its somewhat physics based?
[QUOTE=Anven11;49464522]10,000 lines is nothing. The largest file I've seen in Frostbite is about 15,000 lines, and there are ~1,000 line files everywhere.[/QUOTE]
My first serious C# project had 17k lines I think.
[editline]6th January 2016[/editline]
[QUOTE]
Not too much. Don't really have any side projects ongoing at the moment. Aside from brain surgery, 2015 was pretty uneventful ([URL="http://i.imgur.com/97UQgle.png"]mri pre-op[/URL]).[/QUOTE]
I hope you are getting better. How did you felt before?
[QUOTE=wizard`;49464626][...]
A personal project of mine that generates PDFs that is written in C# hit 10000 lines a few weeks ago and its still pretty easy to maintain[/QUOTE]
Just a note: WPF has a built-in document formatter and printer, and there's a PDF printer by default in Windows now that you probably can automate.
[QUOTE=Em See;49468166]Yeah doing a "proper" authoritative server is tricky, especially for something as tight as user controlled, real-time melee strikes. With Chivalry's mostly-clientside attacking, there is also the issue of players with unstable or high latency connections gaining an advantage (which in many cases was not offset by everyone else lagging from the perspective of the player -- I suspect you could also faff about with only dropping packets in a certain direction). CheatEngine speedhacks additionally, though VAC generally gave those players a visit.
[URL="https://www.reddit.com/r/TheSlashering/comments/3q6qt2/a_new_engine_a_new_name_and_a_bunch_of_screenshots/cwcowfd"]
Apparently Mordhau is making use of a server authoritative networking model now, fwiw.[/URL]
No need to overcomplicate things, though -- client-trusting is a lot more straightforward!
[B]E:[/B] Oh I suppose you could go the other simple route and have the clients be dumb terminals displaying worldstate with no prediction (and thus no reconciliation or timetravel), but that punishes players for having higher latencies and can feel terrible if the gameplay is very fast paced.
Have you got any footage of how the combat works? I assume its somewhat physics based?[/QUOTE]
Oh god, [I]please[/I] do not go for the "other simple route". Unless you are happy with 150ms delay between every button press and the action actually happening on-screen, that's an awful idea. The only genre you can reasonably use that for are RTS games, and even so you'd need some immediate input to most actions (like an audio response), otherwise it feels sluggish.
[QUOTE=Tommyx50;49468988]Oh god, [I]please[/I] do not go for the "other simple route". Unless you are happy with 150ms delay between every button press and the action actually happening on-screen, that's an awful idea. The only genre you can reasonably use that for are RTS games, and even so you'd need some immediate input to most actions (like an audio response), otherwise it feels sluggish.[/QUOTE]
As I said, it can feel terrible. It depends on what latency you're aiming to handle, and more importantly it depends on the game itself. I do agree for many cases it feels like arse.
If you can fully resimulate to reconcile any client/server prediction differences smoothly, go for fully server authoritative with clients only transmitting input, and predicting the result for instant feedback. I'd imagine that's the best solution, if you can pull it off.
Icedshot clearly already understands all this, but going client authoritative opens you to connection issues (intentional or otherwise), rudimentary speedhacking and client modifications all potentially having an unfair effects on the server's (and other clients') states.
If cheating isn't a worry (and in most cases it probably isn't), ez. Otherwise you've got to incorporate checks to limit these effects and/or add a way for players to identify and respond to them (votekicks, I'd imagine players are pretty good at picking up on sus activity).
God networking makes me sad. It really seems like it rejects any elegant solution.
The only way you can prevent cheating (not even completely) is running everything on the server, but the only way you can have smooth gameplay is running everything on the client.
Maybe that would be fine if you could just reuse the same code but you probably want to spend your resources elsewhere and not recompute everything so you're settled with some shitty predictive simulation OF YOUR OWN GAME on the clients.
I've thought about making multiplayer games before and every time I would get discouraged by this.
[QUOTE=Darwin226;49467545]I bought a very cheap USB drive from ebay. 128GB which I thought would be pretty amazing for archiving. Turns out the drive's true capacity was only something like 4GB. Everything you store above that was just simply gone. Luckily I only copied my old stuff instead of moving it because you really can't tell something's wrong until you try to open one of the files.[/QUOTE]
[URL="http://www.heise.de/download/h2testw.html"]H2testw[/URL] can check (and has an English mode but that's not the default).
Apparently you can also reprogram these to the correct size using some Chinese utility, but I never really looked into that.
I got a fake game cartridge once (which failed to start due to the 3DS's copy protection), but I fairly easily got a refund for that.
[editline]edit[/editline]
[QUOTE=Darwin226;49469709]I assume you quoted the wrong d* user :D
I'll check it out.[/QUOTE]
I just fixed it with this. Thanks for the heads up!
[QUOTE=Tamschi;49469558][URL="http://www.heise.de/download/h2testw.html"]H2testw[/URL] can check (and has an English mode but that's not the default).
Apparently you can also reprogram these to the correct size using some Chinese utility, but I never really looked into that.
I got a fake game cartridge once (which failed to start due to the 3DS's copy protection), but I fairly easily got a refund for that.[/QUOTE]
I assume you quoted the wrong d* user :D
I'll check it out.
Does installing arch count? My mom gave me this old windows 7 laptop that is on its last legs with all the shit she installed. I can upgrade it to Windows 10 but I'm gonna put Arch on it instead.
[QUOTE=ichiman94;49467264]It's not like you can't define new functions and macros to deal with tedious pieces of code. All I get from this is you just import every single library and only code in main.
Don't get me wrong, but really, saying bullshit things about a language that's armed with a preprocessor is like saying lisp macros are completely useless.
Doing tedious things with this language is part of the fun (I like fiddling with this shit) which you don't like, so we all should back down and agree that nowadays it's all just personal preference.[/QUOTE]
If you think about it, that's just one way to solve this though. The other is adding rules and optimisations to the compiler to make the "easy versions" of the program run as fast as possible.
Even with C you have this to a very large extent now, because due to larger instruction sets the language is in many cases now far too high-level to really make use of the hardware's available shortcuts (not to mention that they differ from machine to machine).
It's much easier to optimise more general or abstract languages like this, which is why for example the output from Haskell often is very fast (but that language has other issues that make it inconvenient).
The C macro system (specifically; it's definitely possible to solve this in-theoretical-language) is far too limited to deal with these cases by itself to the same extent and with the same efficiency, so it's not a real replacement.
[QUOTE=Darwin226;49469196]God networking makes me sad. It really seems like it rejects any elegant solution.
The only way you can prevent cheating (not even completely) is running everything on the server, but the only way you can have smooth gameplay is running everything on the client.
Maybe that would be fine if you could just reuse the same code but you probably want to spend your resources elsewhere and not recompute everything so you're settled with some shitty predictive simulation OF YOUR OWN GAME on the clients.
I've thought about making multiplayer games before and every time I would get discouraged by this.[/QUOTE]
Just do prediction. My engine has the server do everything but for stuff like movement, the client does and the server simply skips that client when broadcasting the move packet.
[editline]6th January 2016[/editline]
-proper- prediction, that is, which is a nonissue if your server/client are in the same thing.
I'm doing a turn-based competitive game. I let the client check the moves of the other client for validity, and log [I]everything[/I]. Hasn't been tested in production yet so we'll see if it's enough but the only way it wouldn't be is if there's two cheaters playing against each other.
I miss posting here, you guys are great
[t]http://i.imgur.com/8dXAEaD.gif[/t]
Have some wiggles on me
wriggle is indeed a fun word and that proves it
So saw some people talking about project sizes in terms of lines of code a bit ago. Decided I would post what my current project at work line count is. It was calculated using the visual studio Code Metrics option.
[b]Current LOC[/b]: ~69,657
I am sure some are missing as the way it is setup is a bit strange and projects are all over the place. So I would assume somewhere between the number above and 70k. Pretty cool to see an estimate of how many lines of code are in the project.
I know LOC don't mean a whole lot but it is still interesting to see and can give you an idea of how large a project is.
[QUOTE=polkm;49470270]I miss posting here, you guys are great
[t]http://i.imgur.com/8dXAEaD.gif[/t]
Have some wiggles on me[/QUOTE]
Wacky waving inflatable arm flailing tube man
Sorry, you need to Log In to post a reply to this thread.