game_machine 0.0.11 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +12 -1
- data/Gemfile.lock +32 -47
- data/Rakefile +0 -27
- data/bin/bundle_run.sh +1 -0
- data/bin/game_machine +29 -27
- data/config/cluster.conf +6 -5
- data/config/default.conf +164 -0
- data/config/game_machine.sql +33 -0
- data/config/game_messages.proto +87 -25
- data/config/gamecloud.conf +140 -0
- data/config/messages.proto +46 -53
- data/config/test.conf +149 -0
- data/game_machine.gemspec +10 -5
- data/games/boot.rb +3 -0
- data/games/example/data/game_data.yml +4 -4
- data/games/example/lib/aggressive_npc.rb +1 -1
- data/games/example/lib/game.rb +1 -2
- data/games/example/lib/player_register.rb +1 -1
- data/games/routes.rb +9 -0
- data/games/tutorial/boot.rb +12 -0
- data/games/tutorial/item_manager.rb +256 -0
- data/games/tutorial/object_store.rb +55 -0
- data/games/tutorial/seed.rb +52 -0
- data/games/tutorial/sql_store.rb +30 -0
- data/java/project/build.gradle +134 -0
- data/java/project/component.erb +719 -0
- data/java/{gradle.properties → project/gradle.properties} +1 -1
- data/java/project/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/java/{gradle → project/gradle}/wrapper/gradle-wrapper.properties +2 -2
- data/java/{gradlew → project/gradlew} +0 -0
- data/java/{gradlew.bat → project/gradlew.bat} +0 -0
- data/java/project/local_lib/AdminUi.jar +0 -0
- data/java/{local_lib/protostuff-compiler-1.0.7-jarjar.jar → project/local_lib/protostuff-compiler-1.0.8-jarjar.jar} +0 -0
- data/java/project/local_lib/sigar/libsigar-amd64-freebsd-6.so +0 -0
- data/java/project/local_lib/sigar/libsigar-amd64-linux.so +0 -0
- data/java/project/local_lib/sigar/libsigar-amd64-solaris.so +0 -0
- data/java/project/local_lib/sigar/libsigar-ia64-hpux-11.sl +0 -0
- data/java/project/local_lib/sigar/libsigar-ia64-linux.so +0 -0
- data/java/project/local_lib/sigar/libsigar-pa-hpux-11.sl +0 -0
- data/java/project/local_lib/sigar/libsigar-ppc-aix-5.so +0 -0
- data/java/project/local_lib/sigar/libsigar-ppc-linux.so +0 -0
- data/java/project/local_lib/sigar/libsigar-ppc64-aix-5.so +0 -0
- data/java/project/local_lib/sigar/libsigar-ppc64-linux.so +0 -0
- data/java/project/local_lib/sigar/libsigar-s390x-linux.so +0 -0
- data/java/project/local_lib/sigar/libsigar-sparc-solaris.so +0 -0
- data/java/project/local_lib/sigar/libsigar-sparc64-solaris.so +0 -0
- data/java/project/local_lib/sigar/libsigar-universal-macosx.dylib +0 -0
- data/java/project/local_lib/sigar/libsigar-universal64-macosx.dylib +0 -0
- data/java/project/local_lib/sigar/libsigar-x86-freebsd-5.so +0 -0
- data/java/project/local_lib/sigar/libsigar-x86-freebsd-6.so +0 -0
- data/java/project/local_lib/sigar/libsigar-x86-linux.so +0 -0
- data/java/project/local_lib/sigar/libsigar-x86-solaris.so +0 -0
- data/java/project/local_lib/sigar/sigar-amd64-winnt.dll +0 -0
- data/java/project/local_lib/sigar/sigar-x86-winnt.dll +0 -0
- data/java/project/local_lib/sigar/sigar-x86-winnt.lib +0 -0
- data/java/project/model.erb +99 -0
- data/java/{settings.gradle → project/settings.gradle} +0 -0
- data/java/project/src/main/java/com/game_machine/authentication/DefaultAuthenticator.java +28 -0
- data/java/project/src/main/java/com/game_machine/authentication/PlayerAuthenticator.java +6 -0
- data/java/project/src/main/java/com/game_machine/authentication/PublicAuthenticator.java +20 -0
- data/java/{src → project/src}/main/java/com/game_machine/core/ActorFactory.java +0 -0
- data/java/{src → project/src}/main/java/com/game_machine/core/ActorUtil.java +13 -0
- data/java/project/src/main/java/com/game_machine/core/AuthorizedPlayers.java +23 -0
- data/java/project/src/main/java/com/game_machine/core/ClientMessageDecoder.java +36 -0
- data/java/project/src/main/java/com/game_machine/core/ClientMessageEncoder.java +19 -0
- data/java/project/src/main/java/com/game_machine/core/CloudClient.java +298 -0
- data/java/{src → project/src}/main/java/com/game_machine/core/CommandProxy.java +0 -0
- data/java/project/src/main/java/com/game_machine/core/Commands.java +20 -0
- data/java/project/src/main/java/com/game_machine/core/DatastoreCommands.java +43 -0
- data/java/project/src/main/java/com/game_machine/core/DbConnectionPool.java +72 -0
- data/java/project/src/main/java/com/game_machine/core/DefaultMovementVerifier.java +56 -0
- data/java/{src → project/src}/main/java/com/game_machine/core/EntitySerializer.java +0 -0
- data/java/project/src/main/java/com/game_machine/core/EntityTracking.java +119 -0
- data/java/{src → project/src}/main/java/com/game_machine/core/EventStreamHandler.java +1 -1
- data/java/project/src/main/java/com/game_machine/core/GameActor.java +73 -0
- data/java/project/src/main/java/com/game_machine/core/GameMachineLoader.java +43 -0
- data/java/project/src/main/java/com/game_machine/core/GameMessageActor.java +44 -0
- data/java/project/src/main/java/com/game_machine/core/Grid.java +255 -0
- data/java/{src → project/src}/main/java/com/game_machine/core/GridValue.java +0 -0
- data/java/project/src/main/java/com/game_machine/core/Hashring.java +66 -0
- data/java/{src → project/src}/main/java/com/game_machine/core/IActorFactory.java +0 -0
- data/java/project/src/main/java/com/game_machine/core/LocalLinkedBuffer.java +20 -0
- data/java/project/src/main/java/com/game_machine/core/MessageGateway.java +120 -0
- data/java/project/src/main/java/com/game_machine/core/MessagePersister.java +26 -0
- data/java/project/src/main/java/com/game_machine/core/MonoProxy.java +39 -0
- data/java/project/src/main/java/com/game_machine/core/MovementVerifier.java +7 -0
- data/java/{src → project/src}/main/java/com/game_machine/core/NetMessage.java +10 -6
- data/java/project/src/main/java/com/game_machine/core/PersistentMessage.java +9 -0
- data/java/project/src/main/java/com/game_machine/core/PlayerCommands.java +31 -0
- data/java/project/src/main/java/com/game_machine/core/TcpServer.java +100 -0
- data/java/project/src/main/java/com/game_machine/core/TcpServerHandler.java +54 -0
- data/java/project/src/main/java/com/game_machine/core/TcpServerInitializer.java +32 -0
- data/java/project/src/main/java/com/game_machine/core/UdpClient.java +86 -0
- data/java/{src → project/src}/main/java/com/game_machine/core/UdpServer.java +18 -27
- data/java/{src → project/src}/main/java/com/game_machine/core/UdpServerHandler.java +23 -26
- data/java/project/src/main/java/com/game_machine/core/Vector3.java +159 -0
- data/java/project/src/main/java/com/game_machine/orm/models/PlayerItem.java +118 -0
- data/java/project/src/main/java/com/game_machine/orm/models/TestObject.java +110 -0
- data/java/project/src/main/java/com/game_machine/tutorial/LootGenerator.java +26 -0
- data/java/{src → project/src}/main/resources/game_machine.java.stg +3 -1
- data/java/project/src/main/resources/logback.properties +13 -0
- data/java/project/src/main/resources/logback.xml +76 -0
- data/java/{src → project/src}/main/resources/protostuff.properties +0 -0
- data/java/src/main/java/game/MyGameActor.java +26 -0
- data/lib/game_machine.rb +17 -16
- data/lib/game_machine/actor.rb +1 -1
- data/lib/game_machine/actor/base.rb +8 -31
- data/lib/game_machine/actor/builder.rb +5 -6
- data/lib/game_machine/actor/game_actor.rb +55 -0
- data/lib/game_machine/actor/reloadable.rb +6 -1
- data/lib/game_machine/akka.rb +26 -32
- data/lib/game_machine/app_config.rb +39 -26
- data/lib/game_machine/application.rb +56 -62
- data/lib/game_machine/client_manager.rb +14 -8
- data/lib/game_machine/cloud_updater.rb +51 -0
- data/lib/game_machine/cluster_monitor.rb +3 -3
- data/lib/game_machine/commands.rb +1 -1
- data/lib/game_machine/commands/misc_commands.rb +4 -8
- data/lib/game_machine/commands/player_commands.rb +8 -0
- data/lib/game_machine/console.rb +1 -0
- data/lib/game_machine/console/build.rb +57 -24
- data/lib/game_machine/console/bundle.rb +95 -0
- data/lib/game_machine/console/deploy.rb +30 -0
- data/lib/game_machine/console/install.rb +70 -36
- data/lib/game_machine/console/server.rb +2 -69
- data/lib/game_machine/data_store.rb +111 -15
- data/lib/game_machine/data_stores/couchbase.rb +8 -3
- data/lib/game_machine/data_stores/gamecloud.rb +93 -0
- data/lib/game_machine/data_stores/jdbc.rb +98 -0
- data/lib/game_machine/default_handlers.rb +2 -0
- data/lib/game_machine/default_handlers/team_handler.rb +51 -0
- data/lib/game_machine/default_handlers/zone_manager.rb +30 -0
- data/lib/game_machine/endpoints.rb +0 -4
- data/lib/game_machine/endpoints/udp_incoming.rb +13 -5
- data/lib/game_machine/endpoints/udp_outgoing.rb +15 -9
- data/lib/game_machine/game_systems.rb +0 -2
- data/lib/game_machine/game_systems/agents/controller.rb +2 -2
- data/lib/game_machine/game_systems/entity_tracking.rb +0 -3
- data/lib/game_machine/game_systems/region_manager.rb +3 -2
- data/lib/game_machine/game_systems/region_service.rb +2 -2
- data/lib/game_machine/game_systems/remote_echo.rb +10 -0
- data/lib/game_machine/game_systems/team_manager.rb +2 -11
- data/lib/game_machine/grid.rb +5 -18
- data/lib/game_machine/handlers/authentication.rb +1 -9
- data/lib/game_machine/handlers/game.rb +27 -2
- data/lib/game_machine/handlers/player_authentication.rb +87 -0
- data/lib/game_machine/handlers/request.rb +9 -11
- data/lib/game_machine/hocon_config.rb +81 -0
- data/lib/game_machine/java_lib.rb +14 -1
- data/lib/game_machine/logger.rb +10 -23
- data/lib/game_machine/models.rb +1 -0
- data/lib/game_machine/mono_server.rb +6 -1
- data/lib/game_machine/object_db.rb +12 -6
- data/lib/game_machine/protobuf.rb +1 -1
- data/lib/game_machine/protobuf/game_messages.rb +13 -3
- data/lib/game_machine/protobuf/generate.rb +107 -5
- data/lib/game_machine/restart_watcher.rb +1 -1
- data/lib/game_machine/routes.rb +23 -0
- data/lib/game_machine/scheduler.rb +1 -1
- data/lib/game_machine/securerandom.rb +2 -0
- data/lib/game_machine/system_stats.rb +28 -7
- data/lib/game_machine/version.rb +1 -1
- data/lib/game_machine/wavefront_ext.rb +47 -0
- data/lib/game_machine/write_behind_cache.rb +24 -9
- data/mono/server/Makefile +1 -1
- data/mono/server/Newtonsoft.Json.dll +0 -0
- data/mono/server/build.bat +1 -1
- data/mono/server/callable.cs +9 -0
- data/mono/server/echo.cs +17 -0
- data/mono/server/message_router.cs +16 -23
- data/mono/server/messages.cs +1792 -417
- data/mono/server/protobuf-net.dll +0 -0
- data/mono/server/server.cs +120 -0
- data/mono/server/server.exe +0 -0
- data/pathfinding/astar.cpp +149 -0
- data/pathfinding/build.sh +6 -0
- data/pathfinding/build.txt +16 -0
- data/pathfinding/crowd.cpp +194 -0
- data/pathfinding/include/astar.h +49 -0
- data/pathfinding/include/common.h +5 -0
- data/pathfinding/include/crowd.h +43 -0
- data/pathfinding/include/micropather.h +511 -0
- data/pathfinding/include/navmesh.h +114 -0
- data/pathfinding/include/pathfinder.h +24 -0
- data/pathfinding/main.cpp +108 -17
- data/pathfinding/micropather.cpp +1062 -0
- data/pathfinding/navmesh.cpp +408 -0
- data/pathfinding/overrides/DetourCrowd.cpp +1446 -0
- data/pathfinding/overrides/DetourNavMeshQuery.cpp +3551 -0
- data/pathfinding/overrides/DetourNavMeshQuery.h +538 -0
- data/pathfinding/pathfinder.cpp +117 -0
- data/pathfinding/{bin → premake}/premake4 +0 -0
- data/pathfinding/premake/premake4.exe +0 -0
- data/pathfinding/premake4.lua +12 -3
- data/spec/actor/actor_spec.rb +0 -7
- data/spec/client_manager_spec.rb +1 -1
- data/spec/couchproxy_spec.rb +38 -0
- data/spec/entity_persistence_spec.rb +129 -0
- data/spec/game_systems/team_manager_spec.rb +2 -2
- data/spec/hashring_spec.rb +17 -39
- data/spec/java_grid_spec.rb +0 -2
- data/spec/misc_spec.rb +111 -0
- data/spec/mono_spec.rb +50 -3
- data/spec/reliable_message_spec.rb +38 -0
- data/spec/spec_helper.rb +4 -4
- data/spec/spec_helper_minimal.rb +10 -0
- data/web/app.rb +108 -86
- data/web/config/trinidad.yml +1 -0
- data/web/views/add_player.erb +25 -0
- data/web/views/index.erb +0 -0
- data/web/views/layout.erb +48 -0
- data/web/views/login.erb +25 -0
- data/web/views/players.erb +24 -0
- metadata +209 -94
- data/config/config.example.yml +0 -100
- data/config/regions.example.yml +0 -9
- data/games/example/lib/authentication_handler.rb +0 -69
- data/games/models.rb +0 -3
- data/games/models/clan_member.rb +0 -8
- data/games/models/clan_profile.rb +0 -9
- data/games/models/player.rb +0 -7
- data/games/plugins.rb +0 -1
- data/games/plugins/team_handler.rb +0 -49
- data/games/preload.rb +0 -13
- data/java/.gitignore +0 -1
- data/java/build.gradle +0 -95
- data/java/component.erb +0 -396
- data/java/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/java/src/main/java/com/game_machine/core/GameMachineLoader.java +0 -25
- data/java/src/main/java/com/game_machine/core/Grid.java +0 -195
- data/java/src/main/resources/logback.xml +0 -14
- data/java/src/main/resources/logging.properties +0 -3
- data/lib/game_machine/actor/mono_actor.rb +0 -89
- data/lib/game_machine/auth_handlers/base.rb +0 -21
- data/lib/game_machine/auth_handlers/public.rb +0 -34
- data/lib/game_machine/endpoints/mono_gateway.rb +0 -87
- data/lib/game_machine/endpoints/tcp.rb +0 -51
- data/lib/game_machine/endpoints/tcp_handler.rb +0 -75
- data/lib/game_machine/endpoints/udp.rb +0 -88
- data/lib/game_machine/game_loader.rb +0 -46
- data/lib/game_machine/game_systems/region_settings.rb +0 -13
- data/lib/game_machine/hashring.rb +0 -48
- data/lib/game_machine/settings.rb +0 -11
- data/mono/server/actor.cs +0 -37
- data/mono/server/iactor.cs +0 -11
- data/mono/server/message_util.cs +0 -29
- data/mono/server/proxy_client.cs +0 -73
- data/mono/server/proxy_server.cs +0 -30
- data/mono/server/test_actor.cs +0 -33
- data/pathfinding/include/pathfind.h +0 -167
- data/pathfinding/pathfind.cpp +0 -174
- data/pathfinding/pathfinder.cs +0 -66
- data/script/server.sh +0 -109
- data/script/watch.sh +0 -11
- data/spec/commands/navigation_commands_spec.rb +0 -51
- data/spec/game_systems/entity_tracking_spec.rb +0 -64
- data/spec/navigation/detour_navmesh_spec.rb +0 -34
- data/spec/navigation/detour_path_spec.rb +0 -25
- data/spec/udp_server_spec.rb +0 -10
- data/web/controllers/auth_controller.rb +0 -19
- data/web/controllers/base_controller.rb +0 -16
- data/web/controllers/index_controller.rb +0 -7
- data/web/controllers/log_controller.rb +0 -47
- data/web/controllers/messages_controller.rb +0 -59
- data/web/controllers/player_register_controller.rb +0 -15
- data/web/views/game_messages.haml +0 -45
- data/web/views/index.haml +0 -6
- data/web/views/layout.haml +0 -41
- data/web/views/logs.haml +0 -32
- data/web/views/player_register.haml +0 -22
- data/web/views/player_registered.haml +0 -2
- data/web/views/register_layout.haml +0 -22
- data/web/views/restart.haml +0 -35
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
// Mysql
|
3
|
+
DROP TABLE IF EXISTS `entities`;
|
4
|
+
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
5
|
+
/*!40101 SET character_set_client = utf8 */;
|
6
|
+
CREATE TABLE `entities` (
|
7
|
+
`id` varchar(128) NOT NULL,
|
8
|
+
`value` varbinary(2048) DEFAULT NULL,
|
9
|
+
`datatype` int(11) NOT NULL,
|
10
|
+
PRIMARY KEY (`id`)
|
11
|
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
12
|
+
|
13
|
+
|
14
|
+
// Postgresql
|
15
|
+
CREATE TABLE entities
|
16
|
+
(
|
17
|
+
id character varying(128) NOT NULL,
|
18
|
+
value bytea,
|
19
|
+
datatype smallint,
|
20
|
+
CONSTRAINT entities_pkey PRIMARY KEY (id)
|
21
|
+
)
|
22
|
+
WITH (
|
23
|
+
OIDS=FALSE
|
24
|
+
);
|
25
|
+
ALTER TABLE entities
|
26
|
+
OWNER TO gamemachine;
|
27
|
+
|
28
|
+
CREATE OR REPLACE RULE entities_merge AS
|
29
|
+
ON INSERT TO entities
|
30
|
+
WHERE (EXISTS ( SELECT 1
|
31
|
+
FROM entities entities_1
|
32
|
+
WHERE entities_1.id::text = new.id::text)) DO INSTEAD UPDATE entities SET value = new.value, datatype = new.datatype
|
33
|
+
WHERE entities.id::text = new.id::text;
|
data/config/game_messages.proto
CHANGED
@@ -1,46 +1,108 @@
|
|
1
1
|
|
2
2
|
// Used to by the entity tracking system to attack additional fields to your
|
3
|
-
// tracking updates. You can change any of the fields in
|
3
|
+
// tracking updates. You can change any of the fields in TrackData to suit your
|
4
4
|
// needs, but do NOT remove the message definition!
|
5
5
|
|
6
|
-
message
|
6
|
+
message TrackData {
|
7
7
|
optional float speed = 1;
|
8
8
|
optional float velocity = 2;
|
9
9
|
optional Vector3 direction = 3;
|
10
10
|
optional string json = 4;
|
11
|
+
optional string id = 5;
|
12
|
+
optional float x = 6;
|
13
|
+
optional float y = 7;
|
14
|
+
optional float z = 8;
|
15
|
+
optional string entityType = 9;
|
16
|
+
optional string neighborEntityType = 11;
|
17
|
+
optional int32 action = 12;
|
11
18
|
}
|
12
19
|
|
13
|
-
message
|
14
|
-
|
20
|
+
message GameMessage {
|
21
|
+
// Used internally, do not change
|
22
|
+
optional string playerId = 1;
|
23
|
+
optional string messageId = 2;
|
24
|
+
optional int32 destinationId = 3;
|
25
|
+
optional string destination = 4;
|
26
|
+
|
27
|
+
// User modifiable
|
28
|
+
optional PlayerItems playerItems = 10;
|
29
|
+
optional AddPlayerItem addPlayerItem = 11;
|
30
|
+
optional RemovePlayerItem removePlayerItem = 12;
|
31
|
+
optional RequestPlayerItems requestPlayerItems = 13;
|
32
|
+
}
|
33
|
+
|
34
|
+
message GameMessages {
|
35
|
+
repeated GameMessage gameMessage = 1;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Inventory messages
|
39
|
+
|
40
|
+
local_persistent_message PlayerItem {
|
41
|
+
required string id = 1;
|
42
|
+
required string name = 2;
|
43
|
+
required int32 quantity = 3;
|
44
|
+
optional string color = 4;
|
45
|
+
optional Weapon weapon = 5;
|
46
|
+
optional Consumable consumable = 6;
|
47
|
+
optional Cost cost = 8;
|
48
|
+
}
|
49
|
+
|
50
|
+
|
51
|
+
local_message Cost {
|
52
|
+
required float amount = 1;
|
53
|
+
required string currency = 2;
|
54
|
+
}
|
55
|
+
|
56
|
+
local_message Consumable {
|
57
|
+
required string type = 1;
|
58
|
+
required string size = 2;
|
15
59
|
}
|
16
60
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
optional int32 healthDiff = 3;
|
21
|
-
optional int32 damageDiff = 4;
|
22
|
-
optional int32 timePeriod = 5;
|
23
|
-
optional string type = 6;
|
61
|
+
local_message Weapon {
|
62
|
+
required int32 attack = 1;
|
63
|
+
required int32 delay = 2;
|
24
64
|
}
|
25
65
|
|
26
|
-
|
27
|
-
|
66
|
+
local_message RequestPlayerItems {
|
67
|
+
optional bool catalog = 1;
|
28
68
|
}
|
29
69
|
|
30
|
-
message
|
31
|
-
|
32
|
-
|
33
|
-
optional int32 hitChance = 3;
|
34
|
-
required int32 range = 4;
|
35
|
-
optional string type = 5;
|
70
|
+
message PlayerItems {
|
71
|
+
optional bool catalog = 1;
|
72
|
+
repeated PlayerItem playerItem = 2;
|
36
73
|
}
|
37
74
|
|
38
|
-
|
39
|
-
required
|
40
|
-
required string target = 2;
|
41
|
-
optional int32 combatAbilityId = 3;
|
75
|
+
local_message AddPlayerItem {
|
76
|
+
required PlayerItem playerItem = 1;
|
42
77
|
}
|
43
78
|
|
44
|
-
|
45
|
-
|
79
|
+
local_message RemovePlayerItem {
|
80
|
+
required string id = 1;
|
81
|
+
required int32 quantity = 2;
|
46
82
|
}
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
persistent_message TestObject {
|
87
|
+
required string id = 12;
|
88
|
+
optional string optionalString = 1;
|
89
|
+
required string requiredString = 2;
|
90
|
+
repeated int32 numbers = 3;
|
91
|
+
optional bytes bstring = 4;
|
92
|
+
optional bool bvalue = 5;
|
93
|
+
optional double dvalue = 6;
|
94
|
+
optional float fvalue = 7;
|
95
|
+
optional int64 numbers64 = 8;
|
96
|
+
repeated Player player = 9;
|
97
|
+
enum Corpus {
|
98
|
+
UNIVERSAL = 0;
|
99
|
+
WEB = 1;
|
100
|
+
IMAGES = 2;
|
101
|
+
LOCAL = 3;
|
102
|
+
NEWS = 4;
|
103
|
+
PRODUCTS = 5;
|
104
|
+
VIDEO = 6;
|
105
|
+
}
|
106
|
+
optional Corpus corpus = 10;
|
107
|
+
repeated Corpus corpus2 = 11;
|
108
|
+
}
|
@@ -0,0 +1,140 @@
|
|
1
|
+
|
2
|
+
gamemachine {
|
3
|
+
|
4
|
+
environment = development
|
5
|
+
use_regions = true
|
6
|
+
orm = false
|
7
|
+
mono_enabled = false
|
8
|
+
|
9
|
+
client {
|
10
|
+
|
11
|
+
# Sets the protocol and host/port used by the client if set to TCP or UDP. ANY lets the client use it's own values
|
12
|
+
protocol = UDP
|
13
|
+
}
|
14
|
+
|
15
|
+
handlers {
|
16
|
+
|
17
|
+
# Team handler
|
18
|
+
team = "GameMachine::DefaultHandlers::TeamHandler"
|
19
|
+
|
20
|
+
# Authentication handlers.
|
21
|
+
|
22
|
+
#PublicAuthenticator allows any user/password combination to work
|
23
|
+
#auth = "com.game_machine.authentication.PublicAuthenticator"
|
24
|
+
|
25
|
+
# The default. Uses salted password hash (bcrypt)
|
26
|
+
auth = "com.game_machine.authentication.DefaultAuthenticator"
|
27
|
+
|
28
|
+
}
|
29
|
+
|
30
|
+
routers {
|
31
|
+
# Size of the router for incoming message from all clients
|
32
|
+
game_handler = 5
|
33
|
+
|
34
|
+
# Also in the pipeline for all incoming requests, should be set the same as
|
35
|
+
# game_handler_routers
|
36
|
+
request_handler = 5
|
37
|
+
|
38
|
+
# router size for the udp actor that handles all incoming upd messages
|
39
|
+
udp = 5
|
40
|
+
|
41
|
+
objectdb = 5
|
42
|
+
}
|
43
|
+
|
44
|
+
datastore {
|
45
|
+
# What data store the object database will use (one of memory, mapdb, or couchbase)
|
46
|
+
store = gamecloud
|
47
|
+
|
48
|
+
serialization = json
|
49
|
+
|
50
|
+
# minimum time in milliseconds between writes to the backing store of the same key. When a message
|
51
|
+
# exceeds the limit it is either enqueued, or if already enqueued, it's value is updated, it's
|
52
|
+
# value is updated. -1 disables caching. Default 1000
|
53
|
+
cache_write_interval = -1
|
54
|
+
|
55
|
+
# Total writes per second to the backing store that an actor will allow, across all keys. Note this is on a per actor
|
56
|
+
# basis. If you want to limit total writes per second to your database, this value should be a multiple of the number
|
57
|
+
# of write behind cache actors that are started. -1 disables caching. Default 100
|
58
|
+
cache_writes_per_second = -1
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
gamecloud {
|
63
|
+
host = "cloud.gamemachine.io"
|
64
|
+
user = test
|
65
|
+
#api_key = 294122207690d6e93867c56fae265c24
|
66
|
+
api_key = 20934a81ba104ad1936b8a3e9e7fdaef
|
67
|
+
}
|
68
|
+
|
69
|
+
grids {
|
70
|
+
default = "4000, 50, 1"
|
71
|
+
aoe = "4000, 5, 1"
|
72
|
+
local_chat = "4000, 10, 10"
|
73
|
+
}
|
74
|
+
|
75
|
+
couchbase {
|
76
|
+
bucket = gamemachine
|
77
|
+
password = pass
|
78
|
+
servers = ["http://127.0.0.1:8091/pools"]
|
79
|
+
}
|
80
|
+
|
81
|
+
jdbc {
|
82
|
+
// Postgres
|
83
|
+
hostname = 127.0.0.1
|
84
|
+
port = 5432
|
85
|
+
database = gamemachine
|
86
|
+
url = "jdbc:postgresql://127.0.0.1:5432/gamemachine"
|
87
|
+
ds = "org.postgresql.ds.PGSimpleDataSource"
|
88
|
+
driver = "org.postgresql.Driver"
|
89
|
+
username = gamemachine
|
90
|
+
password = gamemachine
|
91
|
+
|
92
|
+
// Mysql
|
93
|
+
#hostname = 127.0.0.1
|
94
|
+
#port = 3306
|
95
|
+
#database = gamemachine
|
96
|
+
#url = "mysql://127.0.0.1:3306/game_machine"
|
97
|
+
#ds = "com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
|
98
|
+
#driver = "com.mysql.jdbc.Driver"
|
99
|
+
#username = gamemachine
|
100
|
+
#password = gamemachine
|
101
|
+
|
102
|
+
}
|
103
|
+
|
104
|
+
http {
|
105
|
+
enabled = true
|
106
|
+
host = 0.0.0.0
|
107
|
+
port = 3000
|
108
|
+
}
|
109
|
+
|
110
|
+
udp {
|
111
|
+
enabled = true
|
112
|
+
host = 0.0.0.0
|
113
|
+
port = 24130
|
114
|
+
}
|
115
|
+
|
116
|
+
tcp {
|
117
|
+
enabled = true
|
118
|
+
host = 0.0.0.0
|
119
|
+
port = 8910
|
120
|
+
}
|
121
|
+
|
122
|
+
akka {
|
123
|
+
host = 127.0.0.1
|
124
|
+
port = 2551
|
125
|
+
}
|
126
|
+
|
127
|
+
seeds = []
|
128
|
+
|
129
|
+
admin {
|
130
|
+
user = admin
|
131
|
+
pass = pass
|
132
|
+
}
|
133
|
+
|
134
|
+
regions = [
|
135
|
+
["zone1","GameMachine::DefaultHandlers::ZoneManager"],
|
136
|
+
["zone2", "GameMachine::DefaultHandlers::ZoneManager"]
|
137
|
+
]
|
138
|
+
}
|
139
|
+
|
140
|
+
|
data/config/messages.proto
CHANGED
@@ -3,23 +3,30 @@ option optimize_for = SPEED;
|
|
3
3
|
|
4
4
|
//GAME_MESSAGES
|
5
5
|
|
6
|
-
message
|
7
|
-
required
|
8
|
-
|
9
|
-
|
6
|
+
message NodeStatus {
|
7
|
+
required int32 containerId = 1;
|
8
|
+
required string clusterName = 2;
|
9
|
+
required int32 lastUpdated = 3;
|
10
|
+
required string hostname = 4;
|
11
|
+
required int32 port = 5;
|
12
|
+
required int32 clientCount = 6;
|
13
|
+
required double loadAverage = 7;
|
14
|
+
required int32 heapUsed = 8;
|
15
|
+
}
|
16
|
+
|
17
|
+
message MonoMessage {
|
18
|
+
optional Entity entity = 1;
|
19
|
+
optional string klass = 2;
|
10
20
|
}
|
11
21
|
|
12
|
-
message
|
13
|
-
required string
|
14
|
-
optional string server = 2;
|
15
|
-
optional string id = 3;
|
16
|
-
required string type = 4;
|
22
|
+
message DeliveryConfirmation {
|
23
|
+
required string messageId = 1;
|
17
24
|
}
|
18
25
|
|
19
26
|
message TrackEntity {
|
20
27
|
required bool value = 1;
|
21
28
|
optional bool internal = 2;
|
22
|
-
optional
|
29
|
+
optional TrackData trackData = 3;
|
23
30
|
}
|
24
31
|
|
25
32
|
message PlayerLogout {
|
@@ -148,6 +155,7 @@ message ObjectdbDel {
|
|
148
155
|
message ObjectdbGet {
|
149
156
|
required string entityId = 1;
|
150
157
|
optional string playerId = 2;
|
158
|
+
optional string klass = 3;
|
151
159
|
}
|
152
160
|
|
153
161
|
message ObjectdbGetResponse {
|
@@ -176,16 +184,11 @@ message Name {
|
|
176
184
|
required string value = 1;
|
177
185
|
}
|
178
186
|
|
179
|
-
message IsNpc {
|
180
|
-
required bool enabled = 1;
|
181
|
-
}
|
182
|
-
|
183
187
|
message Player {
|
184
188
|
required string id = 1;
|
185
|
-
optional
|
186
|
-
optional
|
187
|
-
optional string
|
188
|
-
optional Transform transform = 5;
|
189
|
+
optional bool authenticated = 2;
|
190
|
+
optional string authtoken = 3;
|
191
|
+
optional string passwordHash = 4;
|
189
192
|
}
|
190
193
|
|
191
194
|
message Vector3 {
|
@@ -197,6 +200,14 @@ message Vector3 {
|
|
197
200
|
optional int32 zi = 6;
|
198
201
|
}
|
199
202
|
|
203
|
+
message Polygon {
|
204
|
+
repeated Vector3 vertex = 1;
|
205
|
+
}
|
206
|
+
|
207
|
+
message Mesh {
|
208
|
+
repeated Polygon polygon = 1;
|
209
|
+
}
|
210
|
+
|
200
211
|
message Quaternion {
|
201
212
|
optional float w = 1;
|
202
213
|
optional float x = 2;
|
@@ -216,33 +227,15 @@ message Transform {
|
|
216
227
|
message EchoTest {
|
217
228
|
required string message = 1;
|
218
229
|
}
|
219
|
-
|
220
|
-
message TestObject {
|
221
|
-
optional string optionalString = 1;
|
222
|
-
required string requiredString = 2;
|
223
|
-
repeated int32 numbers = 3;
|
224
|
-
optional bytes bstring = 4;
|
225
|
-
optional bool bvalue = 5;
|
226
|
-
optional double dvalue = 6;
|
227
|
-
optional float fvalue = 7;
|
228
|
-
optional int64 numbers64 = 8;
|
229
|
-
repeated Player player = 9;
|
230
|
-
enum Corpus {
|
231
|
-
UNIVERSAL = 0;
|
232
|
-
WEB = 1;
|
233
|
-
IMAGES = 2;
|
234
|
-
LOCAL = 3;
|
235
|
-
NEWS = 4;
|
236
|
-
PRODUCTS = 5;
|
237
|
-
VIDEO = 6;
|
238
|
-
}
|
239
|
-
optional Corpus corpus = 10;
|
240
|
-
repeated Corpus corpus2 = 11;
|
241
|
-
}
|
242
|
-
|
243
230
|
|
244
231
|
message Neighbors {
|
245
|
-
repeated
|
232
|
+
repeated TrackData trackData = 1;
|
233
|
+
}
|
234
|
+
|
235
|
+
message Neighbor {
|
236
|
+
optional TrackData trackData = 1;
|
237
|
+
required Vector3 location = 2;
|
238
|
+
required string id = 3;
|
246
239
|
}
|
247
240
|
|
248
241
|
message GetNeighbors {
|
@@ -252,14 +245,16 @@ message GetNeighbors {
|
|
252
245
|
optional string gridName = 5;
|
253
246
|
}
|
254
247
|
|
255
|
-
message
|
256
|
-
optional
|
257
|
-
|
258
|
-
optional string id = 3;
|
248
|
+
message NativeBytes {
|
249
|
+
optional bytes bytes = 1;
|
250
|
+
repeated bytes byteArray = 2;
|
259
251
|
}
|
260
252
|
|
261
|
-
message
|
262
|
-
required
|
253
|
+
message CloudQueryResponse {
|
254
|
+
required string format = 1;
|
255
|
+
repeated string messageId = 2;
|
256
|
+
repeated bytes byteMessage = 3;
|
257
|
+
repeated string jsonMessage = 4;
|
263
258
|
}
|
264
259
|
|
265
260
|
message JsonEntity {
|
@@ -278,7 +273,6 @@ message Regions {
|
|
278
273
|
message Entity {
|
279
274
|
optional Player player = 1;
|
280
275
|
optional Neighbors neighbors = 2;
|
281
|
-
optional MessageEnvelope messageEnvelope = 3;
|
282
276
|
optional ChatMessage chatMessage = 4;
|
283
277
|
optional ClientConnection clientConnection = 5;
|
284
278
|
optional EchoTest echoTest = 6;
|
@@ -295,7 +289,6 @@ message Entity {
|
|
295
289
|
optional GetNeighbors getNeighbors = 21;
|
296
290
|
optional TrackEntity trackEntity = 22;
|
297
291
|
optional Transform transform = 23;
|
298
|
-
optional IsNpc isNpc = 24;
|
299
292
|
optional Vector3 vector3 = 25;
|
300
293
|
optional EntityList entityList = 27;
|
301
294
|
optional bool published = 29;
|
@@ -303,10 +296,8 @@ message Entity {
|
|
303
296
|
optional PlayerAuthenticated playerAuthenticated = 37;
|
304
297
|
optional PlayerLogout playerLogout = 38;
|
305
298
|
optional bool sendToPlayer = 39;
|
306
|
-
optional Rpc rpc = 40;
|
307
299
|
optional Subscribers subscribers = 41;
|
308
300
|
optional bool save = 42;
|
309
|
-
optional MessageRouting messageRouting = 43;
|
310
301
|
optional ObjectdbGetResponse objectdbGetResponse = 44;
|
311
302
|
optional NativeBytes nativeBytes = 45;
|
312
303
|
optional ObjectdbGet objectdbGet = 46;
|
@@ -324,6 +315,7 @@ message Entity {
|
|
324
315
|
optional JsonStorage jsonStorage = 58;
|
325
316
|
optional ClientManagerEvent clientManagerEvent = 59;
|
326
317
|
optional Regions regions = 60;
|
318
|
+
optional bool fastpath = 61;
|
327
319
|
//GAME_ENTITY_MESSAGES
|
328
320
|
}
|
329
321
|
|
@@ -340,4 +332,5 @@ message ClientMessage {
|
|
340
332
|
optional PlayerConnect playerConnect = 7;
|
341
333
|
optional PlayerConnected playerConnected = 8;
|
342
334
|
optional int32 connection_type = 9;
|
335
|
+
optional bool fastpath = 10;
|
343
336
|
}
|