Register FAQ Search Today's Posts Mark Forums Read
Go Back   JazzJackrabbit Community Forums » Open Forums » General Jazz Jackrabbit Talk

JJ2, cheating, and what JJ2+ can(not) do about it

Stijn Stijn's Avatar

Administrator

Joined: Mar 2001

Posts: 6,964

Stijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to behold

Aug 23, 2020, 06:02 AM
Stijn is offline
Reply With Quote
Post JJ2, cheating, and what JJ2+ can(not) do about it

Over the past months, cheating in Jazz Jackrabbit 2 has been discussed a lot. Part of this discussion has been what JJ2+ could do to make it harder to cheat, and also whether it is doing enough. I have discussed this with people individually, but I thought it would also be useful to make my thoughts on this subject available as an article, so everyone can read it at their own leisure and so we don’t need to have the same conversation multiple times. With a recent new JJ2+ release, it seemed to me that a companion article about JJ2 cheating could be useful. It’s a relatively long text, but hopefully it clarifies what the problems are with cheating and what the role of JJ2+ in preventing it can (and cannot) be. I'll discuss how cheating works in JJ2, what JJ2+ does to prevent it, and a couple of alternative solutions that could also be effective but don't have a place in JJ2+.

Principles of cheating
Cheating is a problem of information. Jazz Jackrabbit 2’s multiplayer mode was designed with certain restrictions on the information players have in mind. You can only see who is on your screen; you cannot know the health of another player; there is no timer that shows you when a pickup will respawn. Through these and other rules, Jazz Jackrabbit 2 becomes a level playing field where everyone has to make the best of this situation. Next to dexterity this is an important component of player skill; correctly predicting where other players will be based on your knowledge of the level, keeping track of when pickups will respawn in your head, and telling your teammates what you believe your enemy’s health to be.

The problem is that some of the information that players should not know is still known by the game they’re playing. If I shoot a seeker missile, it should fly towards a nearby player, even if that player is just off-screen, so the game keeps track of their location even when you can’t see them. Likewise, some weapons have a long enough range that you can hit off-screen power-ups with them, and thus the game needs to know whether a power-up has (re-)spawned or not even if you can't see it.

Usually this is okay, because that information is not made visible to the player; it exists only in the game’s memory, which is internal to your computer and only a small part of it is made visible to you through the game’s interface. This way you cannot see any information the game doesn't want you to see. The fundamental problem is, however, that there are other ways of seeing and even manipulating what is stored in the game’s memory. It will always be possible to find where in the game's memory this information is stored, and if people know how to do that, they will have more information than the players who don’t. This is how most cheating works in Jazz Jackrabbit 2.

The server and the client
It helps here to briefly discuss the role of the server and the client in Jazz Jackrabbit 2. The server is the game server you join; the client is you, or more precisely, your game. You and other clients (i.e. players) send information to the server constantly, about player location, bullets that have been fired, et cetera. The server then collects that information from all players, collates it, and sends some of that information back to the players so they know where everyone is, when a bullet has been fired, et cetera.

The server is therefore crucial in deciding what information everyone has. If the server doesn’t send it to you, you won’t know that it happened. Likewise, if you don’t send information about that bullet that you just fired to the server, it won’t know that it has been fired, and no other players will see it on their screen because that information cannot be sent to them.

Any discussion about cheating in Jazz Jackrabbit 2’s multiplayer thus involves the server-client relation by default. If the server doesn’t send you the information, you cannot abuse it. If it does send you information, even when you shouldn’t have it, that can be abused. Many anti-cheat measures then come down to making sure that as little information is sent to the client as possible, while still providing all information needed to play the game as you normally would.

JJ2+ anti-cheating: Anti-radar mode
This is what the ‘anti-radar mode’ of JJ2+ does. Each time an update about a player’s position and health is sent from the server to the client, the server checks if the player is close enough to you that you actually need to know it. If not, it sends a nonsensical position, or the incorrect amount of health, so this information cannot be abused.

There are some limitations to this approach. Recall the aforementioned example, where the game needs to know a player’s position to know where to send a seeker missile shot at them. Seekers should be able to ‘find’ a player even if they are just off-screen. So anti-radar cannot be as strict as making the server send information only when a player is on-screen; you also need to know their position when they're barely off-screen, because else seekers and similar location-aware game behaviour doesn’t work properly.

The other issue here is the interval at which player information is sent from the server to the client. These updates are not continuous; there is a small pause between each update that is sent. Between those updates, the game locally tries to predict where the player will be. This is not very sophisticated; basically, the game assumes players will keep traveling at the same speed and in the same direction they had in the previous update. This is why you sometimes see players go through walls or make impossible-looking turns, especially when they have a high ping; the prediction wasn’t accurate, and the ‘correction’ of the next update received from the server makes things look strange.

If anti-radar mode were to send fake information about players until they’re actually visible, this prediction would be even more off when they enter the screen, and the game would look really choppy. So there needs to be a ‘buffer’ around the area immediately visible to you to make sure that the game has enough time to ‘catch up’ to the player’s actual location once they re-enter visible range. This is why currently anti-radar is only effective outside a certain area surrounding your position. This could, maybe, be expanded a little, but not much, as sooner or later you run into the problems described above.

Alternatives: changing the client-server model
So currently, to some extent, players will always have more information available to them than shown by the game, if they know where to look. This is a fundamental limitation of how Jazz Jackrabbit 2 works. So to address that issue, you would need to make similarly fundamental changes to the game.

This fundamental change would need to be made to the client-server model described above. Instead of your own game determining where and at what angle to draw the seeker missile, the server could do it, and constantly tell you what position the missile needs to be at, according to its information. And if you eliminate the pause between updates sent from the server, the server would only need to send you exactly what is on the screen, and nothing more.

This is difficult, because a lot more information would need to be sent from the server to the client, and it would need to be sent far more often. As you will know if you played Jazz Jackrabbit 2 online for more than a few minutes, lag is already an issue. So to make this work smoothly, a lot of changes would need to be made to how the server and client communicate, and people with a slow connection would be at even more of a disadvantage than they already are.

Alternatives: memory monitoring
Another way to address this issue is to make sure the parts of the memory that a player should not be able to interact with are not interacted with. The game or an external application could constantly check if someone was accessing the information that they shouldn’t be accessing directly, and if that happens they could try to prevent it, or for example send a signal so the player can be kicked from the server.

This is the approach to anti-cheating many modern multiplayer games use, e.g. Blizzard’s games and games using Valve Anti-Cheat or PunkBuster, as well as other third-party anti-cheat solutions. This can be quite effective, but it places a large responsibility on the anti-cheat software. To be able to detect cheats and mark players as cheaters, the software needs to scan people’s computer memory and send some of what it finds to a server so it can be checked whether the memory access is legitimate or not. It's not enough to just check if a specific cheating app is running, as people can easily rename the app, or make a small change so it is no longer recognised. As such the software needs relatively low-level access to the operating system to properly do its job.

It’s also pretty complex software; cheating is, to an extent, an endless cat-and-mouse game, and to really plug all holes and eliminate all shortcuts a player can take to interact with the game’s memory outside of the game itself is not easy. Furthermore, there needs to be a guarantee that all players are actually running (correct version of) the software, which is also not easy to do. It's no surprise then that the development of anti-cheat software is a legitimate business and licensing it for games is often not cheap.

Why these alternatives are not part of JJ2+
Changing the client-server model could be done by JJ2+; there is nothing stopping it from happening on a technical level. But it is a lot of work, for reasons stated, and JJ2+ is made by volunteers. It is also not particularly exciting work, as the end result would be exactly the same game as we had before, except now cheating is harder. And while that would be great, it’s a lot of work with little perceptible benefit. This is exactly the type of work that is least appealing to a volunteer. Many of us in the JJ2+ team already do a lot of this kind of programming just as part of our daily jobs, so doing it again in our spare time is not an attractive prospect. So I don’t think it’s very likely that such a large update will be made.

The other option, external monitoring of memory access, is not something that we want to add to JJ2+. As said, whoever creates and runs it has direct access to basically whatever happens on the player’s computer, and will have to use that access to monitor what is happening on the computer and report on it to the game server. We don’t think this is something JJ2+ should be doing. It would take a lot of effort to make this work well and not accidentally break things or reveal too much about what is happening, and people would be concerned that JJ2+ is spying on them – rightfully, because it would be, after a fashion. There is a reason whole companies have been started just to make anti-cheat solutions, and even then these often end up in controversies about exactly this problem.

Wrapping up: so there’s no solution?
There are technical solutions to comprehensively prevent cheating, but they are complex and/or invasive, and JJ2+ is not the right project to implement them. What we can do is try and limit the information sent to players within the confines of how Jazz Jackrabbit 2 works currently. This is what anti-radar mode does, and the newest JJ2+ version contains updates to it that will hopefully make it more useful to at least prevent some forms of cheating. And we will keep looking for ways to make it work better, something you can help with by reporting bugs and requesting features. But there is a limit to what can be done with this approach, and to go further would be more work than is currently feasible.

So, what to do then? Some people are working on their own anti-cheating solution along the lines of the second approach outlined above, monitoring what happens on a player’s computer. If this is done well and in a transparent way, and people are okay with their computer being monitored by a third party during the game, this could address some of the cheating issues.

Otherwise, non-technical solutions could have an impact. This is the realm of competition policies and refereeing, so it’s not something JJ2+ can really contribute to directly. People could be (and have been) monitored via JJ2+’s spectator feature, and their gameplay can then be judged to see if it is suspicious or not. This involves interpretation, and while that always leaves room for discussion, with clear and transparent procedures in place this can also address some forms of cheating.

In summary, that cheating is possible is somewhat inherent to how Jazz Jackrabbit 2 works. Some things can be done to mitigate it within the confines of how the game works, and this is where JJ2+ can help. To address it comprehensively, however, would require large and fundamental changes or additions to the game. Because JJ2+ is made by volunteers, and because these changes are complex and/or delicate, they are probably outside of JJ2+’s scope. As such, the place to look for these fundamental anti-cheating solutions is in new third-party tools or non-technical solutions.

Hopefully this clarifies the problem with cheating in JJ2, and what JJ2+’s role in combating it can be. If you have any questions, please leave a reply.

While the message of this article was agreed upon within the JJ2+ team, I am this article's author, and if you disagree with it I am the one you should address that disagreement to. -Stijn
ShakerNL ShakerNL's Avatar

JCF Member

Joined: May 2009

Posts: 115

ShakerNL is an asset to this forumShakerNL is an asset to this forum

Aug 23, 2020, 06:26 AM
ShakerNL is offline
Reply With Quote
Great article. This should clear up many questions regarding antiradar and how it works. We (the community) should be grateful to the developers for all the time they have spent in JJ2+.
__________________
Ahmed Magdy Ahmed Magdy's Avatar

JCF Member

Joined: Jan 1970

Posts: 3

Ahmed Magdy has disabled reputation

Aug 24, 2020, 12:24 PM
Ahmed Magdy is offline
Reply With Quote
sigh, the update is **VERY GOOD**. However, I wanted a command that load the admin file and more, like a new character or new resolution, there are more but you understood
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,978

Violet CLM has disabled reputation

Aug 24, 2020, 02:42 PM
Violet CLM is offline
Reply With Quote
Please try to keep the conversation in this thread focused on the topic of anticheating. JJ2+ already includes a command for loading the admin file—"/resetadmins"—and there is even a dropdown menu option for it new in 5.7. Other suggestions belong in https://jj2.plus or https://issues.jj2.plus as usual.
__________________
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT -8. The time now is 12:50 PM.