If your developing a game then it’s possible that for someone to manipulate and hack the games data to cheat.
Blockchain just uses a chained hashing function to ensure any modification to the data will require an update to the chained data therefore raising the processing cost of updating data.
So in theory in fast paced games a finely balanced hashing blockchain could mean cheaters would be slowed down affecting game performance.
In addition the hashing function could be server validated allowing for server side detection of data changes.
So do we need a way to protect our games data and could a blockchain approach work?
A fast paced game is using all the users machines separately to determine their actions. In this instance everything is far from perfect and it will not matter what you do with the data afterwards if the user already cheated that data.
The only way to stop cheating would be to run the entire game on a server then have only user inputs sent to the server and send the users the data that represents a screen; a picture.
I recommented Google Stadia. Only way to hack is to access the google cloud server and hack it. Player cannot do anything to the game except send the input and receive output (image and sound)
I’ll stand by my opinion that blockchain was and is a fad that is not really needed anywhere. All the ‘muh decentralization’ stuff started because people had to convince themselves that their investment in cryptocurrencies was justified. And the last place where we need this are games.
Blockchain can be effectively used for developing a decentralized ownership system for virtual goods. Blockchain cannot be used effectively to prevent cheating in fast paced games, though. Think about how blockchain works, and then contrast that with how a typical fast paced networked multiplayer game is implemented.
Well, you might want to learn more about Bitcoin just in case you are wrong about it all being a fad. Historically speaking, all fiat currencies end up being a fad. All fiat currencies eventually get enough inflation that they lose massive value over time and then collapse. Gold has a great history as a store of value, but gold is a hassle when using for payments. Bitcoin has many of the advantages of gold regarding store of value, and is also able to handle payments very easily.
This answer is a very simple no.
The longevity of this thread…
Also this thread will likely have a very short lifespan for two reasons
the answer to the posed question is no. No valid discussion will come from it and:
since you invoked the B-words), spam bots are surely on their way.
The answer is no for a variety of reasons, and basic understanding of both technologies would make that obvious.
First:
This^. Not fast enough. Speed is key.
Second, blockchain is not a magic word that means “Secure, yea!” it is ledger that tracks transactions and verifies the integrity of the ledger. This is NOT HOW a connected game works. It is sending transitory data to and from the server to the client. There is not ledger, or more accurately there is no need for one. Server has a log already, and that is nether a target of cheating or something a cheater has access to.
And more importantly since the client is sending data, that is usually where the cheat occurs. Blockchain doesn’t validate values being sent, it just wraps them up. Validation happens on the server. There is literally no valid, practical to place to apply blockchain in that process. Seriously, littereally reading the wikipedia page on either of those topics would illustrate what is this pointless ‘idea’.
This simple test shows that SHA512 applied to a 300k data set can be processed in 0.5ms on my PC
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using uRnd = UnityEngine.Random;
using System.Security.Cryptography;
using System.Diagnostics;
using System;
using uDebug = UnityEngine.Debug;
public class SHATest : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
const int DATA_SIZE = 300 * 1024; // 300 K per
byte[] data = new byte[DATA_SIZE];
const int DATA_SETS = 1000;
List<byte[]> largeBuffer = new List<byte[]>(DATA_SETS);
byte[] result;
for (int l = 0; l < DATA_SETS; l++)
{
for (int i = 0; i < DATA_SIZE; i++)
{
data[i] = (byte)uRnd.Range(0, byte.MaxValue);
}
largeBuffer.Add(data);
}
SHA512 shaM = new SHA512Managed();
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
for (int l = 0; l < DATA_SETS; l++)
{
data = largeBuffer[l];
result = shaM.ComputeHash(data);
}
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
ts.Hours, ts.Minutes, ts.Seconds,
ts.Milliseconds / 10);
uDebug.Log("RunTime " + elapsedTime);
float t = ts.Milliseconds / 1000f;
uDebug.Log("ms "+ts.Milliseconds);
uDebug.Log("Time Per 300k block = " + t.ToString("0.000"));
}
// Update is called once per frame
void Update()
{
}
}
Most networked games according to Battlenonsense transfer less than 300k per second.
Although half a millisecond is quite a long time when you consider modern games that need to run at 60hz/144hz or 280hz refresh rates (16.6 ms / 6.9 ms or 3.57 ms).
However that is the point because SHA512 is slow any cheater will be playing the game slower than a none cheater so should be easier to detect.
There is a huge difference between using encryption in a networked game and using blockchain.
Using encryption in a networked game can prevent most proxy bots. Encryption can add a few milliseconds of delay and about 5% CPU usage to a typical networked game.
Blockchain involves distributed ledger, and can take a long time to verify transactions. For example, when you transfer Bitcoin, it is completely normal for each transaction to take an hour to verify with enough nodes. Is one hour an acceptable packet delay for a fast paced network game? No.
On average my bitcoin purchases take between 1 and 4 hours to confirm fully, and you want me/users to wait that long in a scenario where they are playing a game?
It just makes absolutely no sense if you know anything about blockchain.
Bitcoin is one implementation of a Blockchain - which is just an application of the SHA512 hashing function to the data. However in the case of Bitcoin it massively artificially pads that data with POW (proof of work) which would be like passing your screen render data to be processed along with your network data.
If you try the above example you will see that SHA512 is slow in computer terms but a lot faster than Bitcoin which is intentionally slow.
For a game we would want to make the block chained data processing fast-enough but not too fast.
I think your missing the point, its not the way they hash, store, access or anything to do with the data that is the problem here with speed. You could make all that faster than is possible right now and it would not make that much of a difference to the main problem. Its the design of blockchain itself - having other nodes of the network verify every transaction will always result in a delay. A big one in terms of computer-scale time.
Part of the problem is cheaters/hackers altering local data therefore a blockchain is a very good deterrent as that data must pass SHA512 integrity checks or be invalid. So it makes the work of a local cheat program a lot harder as it would need to update the hashing result as well as local data.
Why would you need every other players computer to validate one players data?
I would have thought that a shared hashmapped ledger with the server would ensure that data from and too the server is more easily validated and changed data hacked on the network more easily detected and harder to do due to hashing function cost.
Additional encryption of data would probably really be needed over the network to stop man in the middle attacks.
Then feel free to pick any Altcoin implementation of blockchain for your idea. I was quoting Bitcoin simply because it is the best known use case currently. Even the fastest Altcoins are too slow to handle network packets during fast paced gameplay.
The issue is not related to the hashing function itself. The issue is that blockchain is the completely wrong solution for fast paced networked games. Pick the fastest proof of stake Altcoin that you can find, and then try to implement the networking for Counter Strike or PUBG using that Altcoin’s blockchain.
Aimbots, wallhacks, and ESP hacks are the most common cheats used in fast paced multiplayer games. Blockchain would do nothing for these, as they don’t involve the modification of any data.
No, it does not. a cheater would just need to change the value before it goes in. And it doesn’t need to change the previous values in the chain because the server doesn’t care. And keeping the changes (ledger) is problematic anyway, as they are increasing the size of the data sent. Connected games want to keep data transfer fast as possible which means small chunks. I mean… nevermind. Not going to waste more time explaining.
Look, everyone here has explained the multiple reasons this is really nonsense. It is not that it is a bad idea, it is non-sequitur in terms of logic. A equally valid solution to preventing cheating would be to integrate an networked coffee machine, because… caffeine.
Closed, if you want more information, read the links provided above, especially this one .