-
Notifications
You must be signed in to change notification settings - Fork 3
Bdtss data management for connection #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: nik_connecting
Are you sure you want to change the base?
Conversation
| true,id, RandomSystem.random.nextInt()); | ||
| Entity weapon = Factory.spawnWeapon(null,position,wid,player); | ||
|
|
||
| MCClient.getClientState().getIdHashTable().put(id,player); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ты пока без спавна сделала?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
пока да
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ну тоесть она есть - закомментирована но работает или нет - хз
|
я тут отдебажила throw/take(не вылетают exeptions) но они не работают |
|
и смену оружия |
|
смена оружия работает |
|
но вот с take/throw вопросы |
|
Короче вроде добавила более менее нормальную систему классов JSON-ов, в соответствии с этим подправила мультиплеер - по идее исправила костыль нахождением заспавненого объекта по координатам. Но теперь для каждого Action нужно генерить ID(String) - выдает создатель вместе со своим ID в формате : "1:123234" 1 игрок, 123234 действие. |
|
Текущая структура примерно такая: GameStatePacket состоит из update данных(List) и из ActionPacket в котором хранятся все листы с каждым Action(в последствии - пока только Spawn и немного TakeWeapon). |
|
Еще у каждого Action есть метод do() который автоматически все данные использует и спавнит(и добавляет Entity в мапу) |
|
Села писать удаление объектов и поняла что у нас есть проблема: в данный момент мы на сервере просто подтверждаем данные - и все. Правильнее хранить ActionPacket с активными действиями и уже их обновлять инфой из пакетов и передавать. |
… bdtss-data-management-for-connection # Conflicts: # src/main/java/ru/nsu/fit/dib/projectdib/newMultiplayer/data/ActionPacket.java # src/main/java/ru/nsu/fit/dib/projectdib/newMultiplayer/data/ActionStatus.java # src/main/java/ru/nsu/fit/dib/projectdib/newMultiplayer/data/EntityState.java # src/main/java/ru/nsu/fit/dib/projectdib/newMultiplayer/data/actions/GameAction.java # src/main/java/ru/nsu/fit/dib/projectdib/newMultiplayer/data/actions/NewEntity.java # src/main/java/ru/nsu/fit/dib/projectdib/newMultiplayer/threads/ClientThread.java # src/main/java/ru/nsu/fit/dib/projectdib/newMultiplayer/threads/ServerThread.java
…ta-management-for-connection # Conflicts: # src/main/java/ru/nsu/fit/dib/projectdib/data/ProjectConfig.java # src/main/java/ru/nsu/fit/dib/projectdib/ui/MainMenu.java
No description provided.