Are you coding a game or a nuclear launcher?
The idea is very simple: if i play football with someone and this guy just use his hands or drugs, i will not play with him anymore.
The root of cheats (and flame, and toxic community) is that you are trying to be a boss, a chief, who decides who is playing with who. You have kind of the same problem you have with big society, with thief and tax evasion etc.
You can see it the other way around and think of this simple principle that should always be used by open source community: i, owner of my computer, decides what my computer will do.
If i go in a dungeon with a lot of monster and it pisses my off then i should be able to tell to my computer «delete them, i don't want that».
You can go further: you play with a friends (in the same bus, neighbourhood ect. it's what i tried to achieve in a previous game engine) and you go in a cave. Then, you friend decides that there is a lot of monster spitting nukes and throwing lasers with their eyes etc.
If you agree with that, well, it's ok, you can play with him. If you don't want it, ask him to don't do that. If he still wants to do that, then you can either let him fight them alone (and you'll not see them, nor take damage from them) or you just stop play with that guy.
You probably have this picture from terminator 2 with the 2 boys saying «i shot you first», «no i did it first» «no, me» (in french it's like that). There is not perfect solution to that. The server approach means that an adult will sit on a rock and arbiter everything.
But i am not a kid. No one is gonna tell me who is right and who is wrong just as if i was a kid. I am old enough to decide if i want to play with someone or not.
Note that it's also the best way to avoid trolls, haters, trashtalkers etc. How do you avoid them irl? How do you avoid them on skype?
You can avoid them because nobody but you decides who is your friend and who is not.
The server vs p2p is an opposition much deeper than it looks like. It's political, it's boss/employees or, the opposite, people working together because they want it, like in open source. It's internet vs minitel (https://en.wikipedia.org/wiki/Minitel i don't know equivalent things in other countries), it's microsoft/apple vs linux, imperialism vs anarchism, transcendence vs immanence…
I am learning, reading, listening conferences, thinking etc on that for years. I could do a thesis on it.
Are you in open source because you don't have enough money/influence to make proprietary things or are you on open source because you want it?
https://hub.jmonkeyengine.org/t/server-architecture-not-for-fun/35520/35
Ну двумерном массиве который будет представлять из себя абстракцию карты кроме игроков и монстров буду стоять, непроходимости, телепорты туда можно запихать спецефические вещи.
Цитирую совет Погугли «гексагональная сетка» и «гексагональная система координат»
Предлогают NIO + простой клиент сервер.
На каждом клиенте будет что то вроде гварда+шифрование и имитация сервера в критических местах:
Взломать зафлудить и распарсить можно что угодно.
Вопрос сколько времени и трудозатрат это займет и нужно ли вообще. Библиотек пока нет нарабатываем идею — сделаю выложу в свой гитхаб и на тестах распиарю.
Статья псевдокод, что бы просто передать мысль в целом — на объективность не покушаюсь. Любые советы ценны.
Первое что будет сделано это p2p udp чат, для эмитации пересылки сообщений. Про бородатых дядек забудьте — это бабкины сказки, в linux/unix есть комьюнити которое все коллективно пишет и обсуждает.
java jmonkey engine, они предлагают использовать spidermonkey.
Сложно/невозможно тоже забудь: поток, сокет, очереди немножко алгоритмов и сообщение.
В общем объект(клиент/сервер) просто посылает сообщения серверу и другим игрока.
Вопрос в том как это оптимизировать: 1) ускорить передачу 2) отсечь ненужную информацию 3) правильно синхронизировать
Спасибо интересно. Добавлю к описанию алгоритма — есть над чем подумать.
Самое сложное сформулировать — а захардкодить уже не так сложно.
В основе лежит идея, просто есть ряд проблем их можно обсудить и придумать решение. Несколько движков с чужим кодом до старости крутить можно. Пример:
Я написал некое p2p приложение в нем есть: клиент написаный на C++, сервер написанный на Java, а внутри вставки из С/Python+asm, код подвергся обфускации и документации нет.
Спасибо, дело в том что если игровой мир меняется минимум 1 раз в секунду то — придется отправлять обновление всего мира каждому игроку т.е. отправлять всю базу данных кажому игроку.
И один игрок в Америке, второй в России, третий Англии отсюда собственно и тема.
Это уже отдельный вопрос безопасности:
1)Шифрование самого сообщения
2)Прием сообщений только от клиента — прикрепления хэша или ключа клиентскоро приложения
3)Некий гвард
4)Жалобы пользователь
5)Контроль админа
Да массив будет огромным- вся бза данных, одно большое сообщение со всеми объектами, поэтому сообщениями будут обмениваться только ближай друг к другу объекты и сервер.
Незнаю будет он рад нет своей роли но кто то должен это делать, какой то из клиентов с быстрой скоростью или сервер.
Если афк то да, а если вы бежите по локации с зажатой клавишой W?
https://yadi.sk/d/G6MC4IuMqgzsr
NIO: http://tutorials.jenkov.com/java-nio/overview.html and simple client server
Source Multiplayer Networking: https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
protobuf: https://github.com/google/protobuf
гексогональная система координат
The idea is very simple: if i play football with someone and this guy just use his hands or drugs, i will not play with him anymore.
The root of cheats (and flame, and toxic community) is that you are trying to be a boss, a chief, who decides who is playing with who. You have kind of the same problem you have with big society, with thief and tax evasion etc.
You can see it the other way around and think of this simple principle that should always be used by open source community: i, owner of my computer, decides what my computer will do.
If i go in a dungeon with a lot of monster and it pisses my off then i should be able to tell to my computer «delete them, i don't want that».
You can go further: you play with a friends (in the same bus, neighbourhood ect. it's what i tried to achieve in a previous game engine) and you go in a cave. Then, you friend decides that there is a lot of monster spitting nukes and throwing lasers with their eyes etc.
If you agree with that, well, it's ok, you can play with him. If you don't want it, ask him to don't do that. If he still wants to do that, then you can either let him fight them alone (and you'll not see them, nor take damage from them) or you just stop play with that guy.
You probably have this picture from terminator 2 with the 2 boys saying «i shot you first», «no i did it first» «no, me» (in french it's like that). There is not perfect solution to that. The server approach means that an adult will sit on a rock and arbiter everything.
But i am not a kid. No one is gonna tell me who is right and who is wrong just as if i was a kid. I am old enough to decide if i want to play with someone or not.
Note that it's also the best way to avoid trolls, haters, trashtalkers etc. How do you avoid them irl? How do you avoid them on skype?
You can avoid them because nobody but you decides who is your friend and who is not.
The server vs p2p is an opposition much deeper than it looks like. It's political, it's boss/employees or, the opposite, people working together because they want it, like in open source. It's internet vs minitel (https://en.wikipedia.org/wiki/Minitel i don't know equivalent things in other countries), it's microsoft/apple vs linux, imperialism vs anarchism, transcendence vs immanence…
I am learning, reading, listening conferences, thinking etc on that for years. I could do a thesis on it.
Are you in open source because you don't have enough money/influence to make proprietary things or are you on open source because you want it?
https://hub.jmonkeyengine.org/t/server-architecture-not-for-fun/35520/35
Цитирую совет Погугли «гексагональная сетка» и «гексагональная система координат»
Предлогают NIO + простой клиент сервер.
Взломать зафлудить и распарсить можно что угодно.
Вопрос сколько времени и трудозатрат это займет и нужно ли вообще. Библиотек пока нет нарабатываем идею — сделаю выложу в свой гитхаб и на тестах распиарю.
Первое что будет сделано это p2p udp чат, для эмитации пересылки сообщений. Про бородатых дядек забудьте — это бабкины сказки, в linux/unix есть комьюнити которое все коллективно пишет и обсуждает.
java jmonkey engine, они предлагают использовать spidermonkey.
Сложно/невозможно тоже забудь: поток, сокет, очереди немножко алгоритмов и сообщение.
Вопрос в том как это оптимизировать: 1) ускорить передачу 2) отсечь ненужную информацию 3) правильно синхронизировать
Спасибо интересно. Добавлю к описанию алгоритма — есть над чем подумать.
Самое сложное сформулировать — а захардкодить уже не так сложно.
Я написал некое p2p приложение в нем есть: клиент написаный на C++, сервер написанный на Java, а внутри вставки из С/Python+asm, код подвергся обфускации и документации нет.
И один игрок в Америке, второй в России, третий Англии отсюда собственно и тема.
Простой клиент сервер не решает проблем в топике, есть идеи?
1)Шифрование самого сообщения
2)Прием сообщений только от клиента — прикрепления хэша или ключа клиентскоро приложения
3)Некий гвард
4)Жалобы пользователь
5)Контроль админа
Незнаю будет он рад нет своей роли но кто то должен это делать, какой то из клиентов с быстрой скоростью или сервер.
Если афк то да, а если вы бежите по локации с зажатой клавишой W?