Btw: It should already be possible to use Lua to store all equipped items, player scores and deaths and to restore them once the left player joins again. The only thing you're unable to set is the teamscores but the next new version will allow this with the new command setteamscores which I just added because of your request. This way you could save and restore (nearly) any game state with Lua.
Forum
CS2D General Ideas for CS2D - READ THE FIRST POST (OP)!Btw: It should already be possible to use Lua to store all equipped items, player scores and deaths and to restore them once the left player joins again. The only thing you're unable to set is the teamscores but the next new version will allow this with the new command setteamscores which I just added because of your request. This way you could save and restore (nearly) any game state with Lua.
@ slimK: high five
Thank you DC
Mode 4: 1 if the file exists, 0 otherwise (second value cryptographic hash)
You can choose the cryptographic hash easiest to implement e.g. crc32 or md5.
My idea maybe useless...
1
freeimage(imageValue, newValue)
On freeimage, we could insert a new value to be set to the old imageValue. This solves a couple of things:
1. Confusion of how freeimage works (right now beginners will think it will remove the image and nothing can go wrong).
2. Less code.
Also it just feels better this way.
I'm currently playing in 350 ping and 250 ping servers.
That means i get like 175ms or 125ms delay, both servers have Lag Comp enabled.
But Lag Comp doesn't seem to be working well, because when i hit a moving player in my screen, shots don't sync to him and there's no damage given, I have to lag shoot the enemy to hit him (Shoot the position where he's going to move (if it's obvious)), but it barely works.
it would be good to have like player possition calculator thing, if you have lag, it calculates, and shows you the player position in your screen with red squares depending the ping you have on. it would work only if a player is moving on a straight line.
zazz has written
350? How about playing on different servers? Or fixing your network? Better Lag comp please! :c
I'm currently playing in 350 ping and 250 ping servers.
That means i get like 175ms or 125ms delay
I'm currently playing in 350 ping and 250 ping servers.
That means i get like 175ms or 125ms delay
By the default the set value is 5 so it will cover up most of high pings to 500. It just usually depends on the values itself as it may won't fit for any client with high lags. Also you won't get so many benefits of Lag Compensation either and it can be unfair as well for other people due to many factors (such as inability to dodge, unrealistic gameplay as it has been already said) thus leading to a big advantage for high ping players.
With that said, there's nothing you can do at all, either ask the owner's server to set up values which would fit for most of people (including you) or just go to another server which has less pings.
Quote
Since Beta 0.1.2.5 the default setting is 2 which means that pings up to 200 (0,2 seconds delay) will be compensated. Highest setting is 10 (1 second delay, a ping of 1000). The default setting in prior versions was 5.
It is 2. Only compensating up to 200 ms. This has been changed because higher values lead to pretty bad game play experiences for low ping player already.
I adjusted the default value in the reference from 5 to 2. Forgot that when I updated it for 0.1.2.5.
It (probably) doesn't make too much sense to change mp_lagcompensationdivisor at all (I now added a note to its documentation as well)
@ zazz: Compensation is always a trade-off and I'm sorry but there must be limits for compensation otherwise weird things will happen like low ping players being killed half a second after reaching safe cover. These things are very frustrating.
I know that it is also frustrating to play with a high ping but players with good pings shouldn't suffer because of that.
I really wouldn't recommend anyone to player shooters with such high pings anyway. It just CAN'T work very well. Even the most awesome compensation can only help a bit. You always have a massive disadvantage with high pings.
edited 1×, last 15.01.16 08:41:45 pm
So we could for example put Zombies (NPC) on the terrorists team, and Soldiers (NPC) in the counter terrorists team, then in Zombie mode , the Zombies (NPC) would not attack the zombies (PLAYERS) and the Soldiers (NPC) would not attack the humans (PLAYERS).
And my english still poor.
edit:
Quote
.. Ignore my idea Anything that can be done with Lua is forbidden.
edited 1×, last 15.01.16 08:52:06 pm
Avo has written
@ BCG2000:
1) Already said. Nah.
2) Possible with a script. Just use "walk" hook and check how the position of the player changed.
3) I believe somebody has already mentioned this.
4) Well, this is pretty nice idea.
1) Already said. Nah.
2) Possible with a script. Just use "walk" hook and check how the position of the player changed.
3) I believe somebody has already mentioned this.
4) Well, this is pretty nice idea.
Just gonna reply to points 1 and 2:
1) In much shorter words, by Blank Weapons I don't mean adding new weapons, but a "framework" that lets us easily create new ones via Lua scripting, but still, new weapon IDs (for the Blank Weapons of course) would need to be added for that to work. Doing so would open a lot of new possibilities and anybody would be able to create any weapon they wanted. And yes I know about that script called "Custom Weapons", but that's more like a "hacky weapon creation system" than a proper one, it would be much more nice if we had an actual "framework" inside the game to create them, with proper bullet and projectile behavior.
2) That wasn't what I meant and it's not practical, because for example, when the player keeps moving right and reaches a wall, he won't move to the right anymore, thus we won't be able to know that he is pressing right. New hooks for detecting keypresses would not only make a proper keypress detection system, but would solve the problem I said above and of course, open new possibilities as well. To make it clear again, I mean detecting GAME keypresses, like forward, backward, right, left, shoot, walk, etc which would work regardless of how the player configured his/her controls. But again detecting all keyboard keys like "A", "B", "C" would be even better but could be insecure if not implemented correctly, just GAME keypress detection would do the job to be honest.
Number 2 shouldn't be too hard to do by the way, DC can just make the game send a 32-bit integer where each bit represents a key, keys that the player is currently pressing will have their bits set to TRUE, while ones that are not being pressed will have their bit set to FALSE. Then to detect if a specific key is being pressed, do "IF Keys AND KeyValue == TRUE THEN CodeExecution", in other words AND the 32-bit integer with the keyvalue, if it returns true, then the player is pressing that specific key. The "keyvalues" are integer constants representing each bit, like 1, 2, 4, 8, 16, 32, etc. That's what SA-MP does for keypress detection and it should add almost no overhead to CS2D's network performance, since it's just an extra 32-bit integer being sent over that Lua scripts can handle. More operations can also be done by using NOT and combining AND and NOT (note that here I'm talking about the binary operators, not the relational ones that have the same names), like check if the player is pressing two specific keys while not pressing another specific one. Here is a link showing how it's done in SA-MP: http://wiki.sa-mp.com/wiki/OnPlayerKeyStateChange > EDIT: This could be simplified for scripters by making a Lua command to do the AND/NOT automatically and return TRUE/FALSE for the keypress checks.
edited 8×, last 17.01.16 09:42:26 am
DC has written
@user zAzz: Compensation is always a trade-off and I'm sorry but there must be limits for compensation otherwise weird things will happen like low ping players being killed half a second after reaching safe cover. These things are very frustrating.
That already happens, and yes, it is very frustrating. If it was frustrating for high ping players to play, then they would hang with themselves instead of getting easy kills on low pingers. Pls change, dc
Keep in mind that there are many skins already made for the player. And they should be used as a base. Cloth does not work in topdown 2D.
That's before temp-banning you of course.
main reason why i want this is so we can custom balance weapons
edited 1×, last 21.01.16 11:29:32 pm