Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
For now, I will only setup the lists and such and and think of exactly what I will include in this tutorial. I have a couple of ideas on parts that can improve the speed. And we'll see if it turns out any good at all.
-
Idea 1
- Hard Coded Items - Currently the items are loaded from a file server side. And each time a player logs into the game. The server sends all the item information to the client. But instead of sending them, I thought it would be better to skip the simple item editor and just hard code them into the game. The idea would be something like this, on both the server and client:
Code: Item(1).Name = "Sword of everything"
Item(1).Pic = 3
Item(1).Type = ITEM_TYPE_WEAPON
This way the client will always have the information and no packets will be sent. Only the item number when needed.
Idea 2
- Hard Coded Items - The 2:nd idea if that instead of the server being the only part that has the items, the client could also posses them, and instead of letting the server send the information. The client just loads them from the item files in the Client. This is the easy and non time consuming way. Since it only includes the loading part and not much coding. But still it would make the server send less packets.
William Wrote:For now, I will only setup the lists and such and and think of exactly what I will include in this tutorial. I have a couple of ideas on parts that can improve the speed. And we'll see if it turns out any good at all.
-
Idea 1
- Hard Coded Items - Currently the items are loaded from a file server side. And each time a player logs into the game. The server sends all the item information to the client. But instead of sending them, I thought it would be better to skip the simple item editor and just hard code them into the game. The idea would be something like this, on both the server and client:
Code: Item(1).Name = "Sword of everything"
Item(1).Pic = 3
Item(1).Type = ITEM_TYPE_WEAPON
This way the client will always have the information and no packets will be sent. Only the item number when needed.
Idea 2
- Hard Coded Items - The 2:nd idea if that instead of the server being the only part that has the items, the client could also posses them, and instead of letting the server send the information. The client just loads them from the item files in the Client. This is the easy and non time consuming way. Since it only includes the loading part and not much coding. But still it would make the server send less packets.
Wouldn't that make items really easy to hack?
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Not nesseccarily, you could always encrypt them on the 2:nd idea and such.
Trust me. It makes them hackable. Kal Online has done exactly that idea, how do you think people get super strong in game?
The first idea, I guess is good, but the 2nd, not so much. Would make it extremely easy to hack.
Dragoons Master
Unregistered
I don't agree. If you make it the right way, all the things would be checked SERVER side and there will be no problems with the items client side, I mean, it doesn't matter if you can see items with 999 attack, if the server still knows the right attack, you will be the only idiot to see that...
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Dragoons Master Wrote:I don't agree. If you make it the right way, all the things would be checked SERVER side and there will be no problems with the items client side, I mean, it doesn't matter if you can see items with 999 attack, if the server still knows the right attack, you will be the only idiot to see that... Exactly, as I said you will only send the item number. So the server reads of their variables and those are not connected to the client. But still the client items can be modified so they show more stats on the statmenu perhaps. but all the damages and such will still be constant on the server.
How you think Kal has it? It's that exact way, but it's still really easy to hack the items.
But w/e. Do what you think will work. I know what I know, you know what you know. Let's see who's wrong and who's right in the long run.
I like this idea. You could always do this to spells, quests, etc. But wouldn't this make the EXE a lot bigger?
Dragoons Master
Unregistered
Ramsey Wrote:I like this idea. You could always do this to spells, quests, etc. But wouldn't this make the EXE a lot bigger? Not much.... depends on how many things(all that stuff) you have...
Perfekt Wrote:How you think Kal has it? It's that exact way, but it's still really easy to hack the items.
But w/e. Do what you think will work. I know what I know, you know what you know. Let's see who's wrong and who's right in the long run. Well, it really doesn't matter about how Kal did it. If it is done correctly then it's impossible to hack, just plx think about it...
Every thing is server side, all you do is make the same information about all this items client side. No attack depends on what you see and yes ab out what the server knows...
You're trying to do this to eliminate packets being sent, seems to me you'd add more. Having to check to make sure the client version is the same as the server, would require more packets.
Just my 2 cents.
I just don't think this is a good idea.
I am an advocate for having things done on the client side as much as possible. Any reduction on server load i am for. Once it does not create too much of a security problem.
One thing i don't like about MS for example is that users download maps directly from the game server. I prefer updates to the game be implemented in patches or new releases. A game server should be leaning towards processing and handling game logic than towards being a warehouse of information. Players experience faster response times, hence faster game play. Every millisecond counts, especially when you have 100's of players on one server, where each player requires a lot actions to be handled.
There are many ways to prevent clients from modifying local game content. But at the same time, if the client/server structure is designed well then the type of item hacks you are talking about would be impossible. Whether the server sends the item information or whether the client already has it, the server must 'still' do checks. Why? Because hacks can be done at runtime on the application's memory.
I myself though would not hard code the items into the client program. Rather, I would have the items loaded when the clients starts up from separate files. Updating your items would be a bitch, lol.
I have my items like this Client Side.
It doesn't make it any more hackable, the server only sends item data to the client for display purposes/editing.
When item packets are sent to the server, it only sends the item index number.
Then the server uses it's own data to use each item.
So Client side, I could add +50 to item 3's attack, but when the item is equipped, the server will look at it's own attack value for Item #3, and use it.
I did this a few weeks ago because my items have descriptions, and I didn't see any reason to send text packets that will only be used client side.
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Im convinced. Topic closed.
Magnus Wrote:if the server has to check the items, you'd still need to send ALL the information the client has to the server, then have the server end an "ok" so it'd still be the same, only backwards? Of course not.
Server knows data. Clients knows data. Client uses the data to inform players, like what item it is, amount of dmg, picture, etc, and server knows the data for the calculations, such as damage. So even if someone'd modify his client-side data, it would only appear to be something else in his client, and wouldn't do any more dmg or so.
|