game_machine 0.0.11 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +12 -1
  3. data/Gemfile.lock +32 -47
  4. data/Rakefile +0 -27
  5. data/bin/bundle_run.sh +1 -0
  6. data/bin/game_machine +29 -27
  7. data/config/cluster.conf +6 -5
  8. data/config/default.conf +164 -0
  9. data/config/game_machine.sql +33 -0
  10. data/config/game_messages.proto +87 -25
  11. data/config/gamecloud.conf +140 -0
  12. data/config/messages.proto +46 -53
  13. data/config/test.conf +149 -0
  14. data/game_machine.gemspec +10 -5
  15. data/games/boot.rb +3 -0
  16. data/games/example/data/game_data.yml +4 -4
  17. data/games/example/lib/aggressive_npc.rb +1 -1
  18. data/games/example/lib/game.rb +1 -2
  19. data/games/example/lib/player_register.rb +1 -1
  20. data/games/routes.rb +9 -0
  21. data/games/tutorial/boot.rb +12 -0
  22. data/games/tutorial/item_manager.rb +256 -0
  23. data/games/tutorial/object_store.rb +55 -0
  24. data/games/tutorial/seed.rb +52 -0
  25. data/games/tutorial/sql_store.rb +30 -0
  26. data/java/project/build.gradle +134 -0
  27. data/java/project/component.erb +719 -0
  28. data/java/{gradle.properties → project/gradle.properties} +1 -1
  29. data/java/project/gradle/wrapper/gradle-wrapper.jar +0 -0
  30. data/java/{gradle → project/gradle}/wrapper/gradle-wrapper.properties +2 -2
  31. data/java/{gradlew → project/gradlew} +0 -0
  32. data/java/{gradlew.bat → project/gradlew.bat} +0 -0
  33. data/java/project/local_lib/AdminUi.jar +0 -0
  34. data/java/{local_lib/protostuff-compiler-1.0.7-jarjar.jar → project/local_lib/protostuff-compiler-1.0.8-jarjar.jar} +0 -0
  35. data/java/project/local_lib/sigar/libsigar-amd64-freebsd-6.so +0 -0
  36. data/java/project/local_lib/sigar/libsigar-amd64-linux.so +0 -0
  37. data/java/project/local_lib/sigar/libsigar-amd64-solaris.so +0 -0
  38. data/java/project/local_lib/sigar/libsigar-ia64-hpux-11.sl +0 -0
  39. data/java/project/local_lib/sigar/libsigar-ia64-linux.so +0 -0
  40. data/java/project/local_lib/sigar/libsigar-pa-hpux-11.sl +0 -0
  41. data/java/project/local_lib/sigar/libsigar-ppc-aix-5.so +0 -0
  42. data/java/project/local_lib/sigar/libsigar-ppc-linux.so +0 -0
  43. data/java/project/local_lib/sigar/libsigar-ppc64-aix-5.so +0 -0
  44. data/java/project/local_lib/sigar/libsigar-ppc64-linux.so +0 -0
  45. data/java/project/local_lib/sigar/libsigar-s390x-linux.so +0 -0
  46. data/java/project/local_lib/sigar/libsigar-sparc-solaris.so +0 -0
  47. data/java/project/local_lib/sigar/libsigar-sparc64-solaris.so +0 -0
  48. data/java/project/local_lib/sigar/libsigar-universal-macosx.dylib +0 -0
  49. data/java/project/local_lib/sigar/libsigar-universal64-macosx.dylib +0 -0
  50. data/java/project/local_lib/sigar/libsigar-x86-freebsd-5.so +0 -0
  51. data/java/project/local_lib/sigar/libsigar-x86-freebsd-6.so +0 -0
  52. data/java/project/local_lib/sigar/libsigar-x86-linux.so +0 -0
  53. data/java/project/local_lib/sigar/libsigar-x86-solaris.so +0 -0
  54. data/java/project/local_lib/sigar/sigar-amd64-winnt.dll +0 -0
  55. data/java/project/local_lib/sigar/sigar-x86-winnt.dll +0 -0
  56. data/java/project/local_lib/sigar/sigar-x86-winnt.lib +0 -0
  57. data/java/project/model.erb +99 -0
  58. data/java/{settings.gradle → project/settings.gradle} +0 -0
  59. data/java/project/src/main/java/com/game_machine/authentication/DefaultAuthenticator.java +28 -0
  60. data/java/project/src/main/java/com/game_machine/authentication/PlayerAuthenticator.java +6 -0
  61. data/java/project/src/main/java/com/game_machine/authentication/PublicAuthenticator.java +20 -0
  62. data/java/{src → project/src}/main/java/com/game_machine/core/ActorFactory.java +0 -0
  63. data/java/{src → project/src}/main/java/com/game_machine/core/ActorUtil.java +13 -0
  64. data/java/project/src/main/java/com/game_machine/core/AuthorizedPlayers.java +23 -0
  65. data/java/project/src/main/java/com/game_machine/core/ClientMessageDecoder.java +36 -0
  66. data/java/project/src/main/java/com/game_machine/core/ClientMessageEncoder.java +19 -0
  67. data/java/project/src/main/java/com/game_machine/core/CloudClient.java +298 -0
  68. data/java/{src → project/src}/main/java/com/game_machine/core/CommandProxy.java +0 -0
  69. data/java/project/src/main/java/com/game_machine/core/Commands.java +20 -0
  70. data/java/project/src/main/java/com/game_machine/core/DatastoreCommands.java +43 -0
  71. data/java/project/src/main/java/com/game_machine/core/DbConnectionPool.java +72 -0
  72. data/java/project/src/main/java/com/game_machine/core/DefaultMovementVerifier.java +56 -0
  73. data/java/{src → project/src}/main/java/com/game_machine/core/EntitySerializer.java +0 -0
  74. data/java/project/src/main/java/com/game_machine/core/EntityTracking.java +119 -0
  75. data/java/{src → project/src}/main/java/com/game_machine/core/EventStreamHandler.java +1 -1
  76. data/java/project/src/main/java/com/game_machine/core/GameActor.java +73 -0
  77. data/java/project/src/main/java/com/game_machine/core/GameMachineLoader.java +43 -0
  78. data/java/project/src/main/java/com/game_machine/core/GameMessageActor.java +44 -0
  79. data/java/project/src/main/java/com/game_machine/core/Grid.java +255 -0
  80. data/java/{src → project/src}/main/java/com/game_machine/core/GridValue.java +0 -0
  81. data/java/project/src/main/java/com/game_machine/core/Hashring.java +66 -0
  82. data/java/{src → project/src}/main/java/com/game_machine/core/IActorFactory.java +0 -0
  83. data/java/project/src/main/java/com/game_machine/core/LocalLinkedBuffer.java +20 -0
  84. data/java/project/src/main/java/com/game_machine/core/MessageGateway.java +120 -0
  85. data/java/project/src/main/java/com/game_machine/core/MessagePersister.java +26 -0
  86. data/java/project/src/main/java/com/game_machine/core/MonoProxy.java +39 -0
  87. data/java/project/src/main/java/com/game_machine/core/MovementVerifier.java +7 -0
  88. data/java/{src → project/src}/main/java/com/game_machine/core/NetMessage.java +10 -6
  89. data/java/project/src/main/java/com/game_machine/core/PersistentMessage.java +9 -0
  90. data/java/project/src/main/java/com/game_machine/core/PlayerCommands.java +31 -0
  91. data/java/project/src/main/java/com/game_machine/core/TcpServer.java +100 -0
  92. data/java/project/src/main/java/com/game_machine/core/TcpServerHandler.java +54 -0
  93. data/java/project/src/main/java/com/game_machine/core/TcpServerInitializer.java +32 -0
  94. data/java/project/src/main/java/com/game_machine/core/UdpClient.java +86 -0
  95. data/java/{src → project/src}/main/java/com/game_machine/core/UdpServer.java +18 -27
  96. data/java/{src → project/src}/main/java/com/game_machine/core/UdpServerHandler.java +23 -26
  97. data/java/project/src/main/java/com/game_machine/core/Vector3.java +159 -0
  98. data/java/project/src/main/java/com/game_machine/orm/models/PlayerItem.java +118 -0
  99. data/java/project/src/main/java/com/game_machine/orm/models/TestObject.java +110 -0
  100. data/java/project/src/main/java/com/game_machine/tutorial/LootGenerator.java +26 -0
  101. data/java/{src → project/src}/main/resources/game_machine.java.stg +3 -1
  102. data/java/project/src/main/resources/logback.properties +13 -0
  103. data/java/project/src/main/resources/logback.xml +76 -0
  104. data/java/{src → project/src}/main/resources/protostuff.properties +0 -0
  105. data/java/src/main/java/game/MyGameActor.java +26 -0
  106. data/lib/game_machine.rb +17 -16
  107. data/lib/game_machine/actor.rb +1 -1
  108. data/lib/game_machine/actor/base.rb +8 -31
  109. data/lib/game_machine/actor/builder.rb +5 -6
  110. data/lib/game_machine/actor/game_actor.rb +55 -0
  111. data/lib/game_machine/actor/reloadable.rb +6 -1
  112. data/lib/game_machine/akka.rb +26 -32
  113. data/lib/game_machine/app_config.rb +39 -26
  114. data/lib/game_machine/application.rb +56 -62
  115. data/lib/game_machine/client_manager.rb +14 -8
  116. data/lib/game_machine/cloud_updater.rb +51 -0
  117. data/lib/game_machine/cluster_monitor.rb +3 -3
  118. data/lib/game_machine/commands.rb +1 -1
  119. data/lib/game_machine/commands/misc_commands.rb +4 -8
  120. data/lib/game_machine/commands/player_commands.rb +8 -0
  121. data/lib/game_machine/console.rb +1 -0
  122. data/lib/game_machine/console/build.rb +57 -24
  123. data/lib/game_machine/console/bundle.rb +95 -0
  124. data/lib/game_machine/console/deploy.rb +30 -0
  125. data/lib/game_machine/console/install.rb +70 -36
  126. data/lib/game_machine/console/server.rb +2 -69
  127. data/lib/game_machine/data_store.rb +111 -15
  128. data/lib/game_machine/data_stores/couchbase.rb +8 -3
  129. data/lib/game_machine/data_stores/gamecloud.rb +93 -0
  130. data/lib/game_machine/data_stores/jdbc.rb +98 -0
  131. data/lib/game_machine/default_handlers.rb +2 -0
  132. data/lib/game_machine/default_handlers/team_handler.rb +51 -0
  133. data/lib/game_machine/default_handlers/zone_manager.rb +30 -0
  134. data/lib/game_machine/endpoints.rb +0 -4
  135. data/lib/game_machine/endpoints/udp_incoming.rb +13 -5
  136. data/lib/game_machine/endpoints/udp_outgoing.rb +15 -9
  137. data/lib/game_machine/game_systems.rb +0 -2
  138. data/lib/game_machine/game_systems/agents/controller.rb +2 -2
  139. data/lib/game_machine/game_systems/entity_tracking.rb +0 -3
  140. data/lib/game_machine/game_systems/region_manager.rb +3 -2
  141. data/lib/game_machine/game_systems/region_service.rb +2 -2
  142. data/lib/game_machine/game_systems/remote_echo.rb +10 -0
  143. data/lib/game_machine/game_systems/team_manager.rb +2 -11
  144. data/lib/game_machine/grid.rb +5 -18
  145. data/lib/game_machine/handlers/authentication.rb +1 -9
  146. data/lib/game_machine/handlers/game.rb +27 -2
  147. data/lib/game_machine/handlers/player_authentication.rb +87 -0
  148. data/lib/game_machine/handlers/request.rb +9 -11
  149. data/lib/game_machine/hocon_config.rb +81 -0
  150. data/lib/game_machine/java_lib.rb +14 -1
  151. data/lib/game_machine/logger.rb +10 -23
  152. data/lib/game_machine/models.rb +1 -0
  153. data/lib/game_machine/mono_server.rb +6 -1
  154. data/lib/game_machine/object_db.rb +12 -6
  155. data/lib/game_machine/protobuf.rb +1 -1
  156. data/lib/game_machine/protobuf/game_messages.rb +13 -3
  157. data/lib/game_machine/protobuf/generate.rb +107 -5
  158. data/lib/game_machine/restart_watcher.rb +1 -1
  159. data/lib/game_machine/routes.rb +23 -0
  160. data/lib/game_machine/scheduler.rb +1 -1
  161. data/lib/game_machine/securerandom.rb +2 -0
  162. data/lib/game_machine/system_stats.rb +28 -7
  163. data/lib/game_machine/version.rb +1 -1
  164. data/lib/game_machine/wavefront_ext.rb +47 -0
  165. data/lib/game_machine/write_behind_cache.rb +24 -9
  166. data/mono/server/Makefile +1 -1
  167. data/mono/server/Newtonsoft.Json.dll +0 -0
  168. data/mono/server/build.bat +1 -1
  169. data/mono/server/callable.cs +9 -0
  170. data/mono/server/echo.cs +17 -0
  171. data/mono/server/message_router.cs +16 -23
  172. data/mono/server/messages.cs +1792 -417
  173. data/mono/server/protobuf-net.dll +0 -0
  174. data/mono/server/server.cs +120 -0
  175. data/mono/server/server.exe +0 -0
  176. data/pathfinding/astar.cpp +149 -0
  177. data/pathfinding/build.sh +6 -0
  178. data/pathfinding/build.txt +16 -0
  179. data/pathfinding/crowd.cpp +194 -0
  180. data/pathfinding/include/astar.h +49 -0
  181. data/pathfinding/include/common.h +5 -0
  182. data/pathfinding/include/crowd.h +43 -0
  183. data/pathfinding/include/micropather.h +511 -0
  184. data/pathfinding/include/navmesh.h +114 -0
  185. data/pathfinding/include/pathfinder.h +24 -0
  186. data/pathfinding/main.cpp +108 -17
  187. data/pathfinding/micropather.cpp +1062 -0
  188. data/pathfinding/navmesh.cpp +408 -0
  189. data/pathfinding/overrides/DetourCrowd.cpp +1446 -0
  190. data/pathfinding/overrides/DetourNavMeshQuery.cpp +3551 -0
  191. data/pathfinding/overrides/DetourNavMeshQuery.h +538 -0
  192. data/pathfinding/pathfinder.cpp +117 -0
  193. data/pathfinding/{bin → premake}/premake4 +0 -0
  194. data/pathfinding/premake/premake4.exe +0 -0
  195. data/pathfinding/premake4.lua +12 -3
  196. data/spec/actor/actor_spec.rb +0 -7
  197. data/spec/client_manager_spec.rb +1 -1
  198. data/spec/couchproxy_spec.rb +38 -0
  199. data/spec/entity_persistence_spec.rb +129 -0
  200. data/spec/game_systems/team_manager_spec.rb +2 -2
  201. data/spec/hashring_spec.rb +17 -39
  202. data/spec/java_grid_spec.rb +0 -2
  203. data/spec/misc_spec.rb +111 -0
  204. data/spec/mono_spec.rb +50 -3
  205. data/spec/reliable_message_spec.rb +38 -0
  206. data/spec/spec_helper.rb +4 -4
  207. data/spec/spec_helper_minimal.rb +10 -0
  208. data/web/app.rb +108 -86
  209. data/web/config/trinidad.yml +1 -0
  210. data/web/views/add_player.erb +25 -0
  211. data/web/views/index.erb +0 -0
  212. data/web/views/layout.erb +48 -0
  213. data/web/views/login.erb +25 -0
  214. data/web/views/players.erb +24 -0
  215. metadata +209 -94
  216. data/config/config.example.yml +0 -100
  217. data/config/regions.example.yml +0 -9
  218. data/games/example/lib/authentication_handler.rb +0 -69
  219. data/games/models.rb +0 -3
  220. data/games/models/clan_member.rb +0 -8
  221. data/games/models/clan_profile.rb +0 -9
  222. data/games/models/player.rb +0 -7
  223. data/games/plugins.rb +0 -1
  224. data/games/plugins/team_handler.rb +0 -49
  225. data/games/preload.rb +0 -13
  226. data/java/.gitignore +0 -1
  227. data/java/build.gradle +0 -95
  228. data/java/component.erb +0 -396
  229. data/java/gradle/wrapper/gradle-wrapper.jar +0 -0
  230. data/java/src/main/java/com/game_machine/core/GameMachineLoader.java +0 -25
  231. data/java/src/main/java/com/game_machine/core/Grid.java +0 -195
  232. data/java/src/main/resources/logback.xml +0 -14
  233. data/java/src/main/resources/logging.properties +0 -3
  234. data/lib/game_machine/actor/mono_actor.rb +0 -89
  235. data/lib/game_machine/auth_handlers/base.rb +0 -21
  236. data/lib/game_machine/auth_handlers/public.rb +0 -34
  237. data/lib/game_machine/endpoints/mono_gateway.rb +0 -87
  238. data/lib/game_machine/endpoints/tcp.rb +0 -51
  239. data/lib/game_machine/endpoints/tcp_handler.rb +0 -75
  240. data/lib/game_machine/endpoints/udp.rb +0 -88
  241. data/lib/game_machine/game_loader.rb +0 -46
  242. data/lib/game_machine/game_systems/region_settings.rb +0 -13
  243. data/lib/game_machine/hashring.rb +0 -48
  244. data/lib/game_machine/settings.rb +0 -11
  245. data/mono/server/actor.cs +0 -37
  246. data/mono/server/iactor.cs +0 -11
  247. data/mono/server/message_util.cs +0 -29
  248. data/mono/server/proxy_client.cs +0 -73
  249. data/mono/server/proxy_server.cs +0 -30
  250. data/mono/server/test_actor.cs +0 -33
  251. data/pathfinding/include/pathfind.h +0 -167
  252. data/pathfinding/pathfind.cpp +0 -174
  253. data/pathfinding/pathfinder.cs +0 -66
  254. data/script/server.sh +0 -109
  255. data/script/watch.sh +0 -11
  256. data/spec/commands/navigation_commands_spec.rb +0 -51
  257. data/spec/game_systems/entity_tracking_spec.rb +0 -64
  258. data/spec/navigation/detour_navmesh_spec.rb +0 -34
  259. data/spec/navigation/detour_path_spec.rb +0 -25
  260. data/spec/udp_server_spec.rb +0 -10
  261. data/web/controllers/auth_controller.rb +0 -19
  262. data/web/controllers/base_controller.rb +0 -16
  263. data/web/controllers/index_controller.rb +0 -7
  264. data/web/controllers/log_controller.rb +0 -47
  265. data/web/controllers/messages_controller.rb +0 -59
  266. data/web/controllers/player_register_controller.rb +0 -15
  267. data/web/views/game_messages.haml +0 -45
  268. data/web/views/index.haml +0 -6
  269. data/web/views/layout.haml +0 -41
  270. data/web/views/logs.haml +0 -32
  271. data/web/views/player_register.haml +0 -22
  272. data/web/views/player_registered.haml +0 -2
  273. data/web/views/register_layout.haml +0 -22
  274. 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;
@@ -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 TrackExtra to suit your
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 TrackExtra {
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 Health {
14
- required int32 health = 1;
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
- message Effect {
18
- optional int32 length = 1;
19
- optional string name = 2;
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
- message EffectList {
27
- repeated Effect effect = 1;
66
+ local_message RequestPlayerItems {
67
+ optional bool catalog = 1;
28
68
  }
29
69
 
30
- message CombatAbility {
31
- required string name = 1;
32
- required int32 damage = 2;
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
- message Attack {
39
- required string attacker = 1;
40
- required string target = 2;
41
- optional int32 combatAbilityId = 3;
75
+ local_message AddPlayerItem {
76
+ required PlayerItem playerItem = 1;
42
77
  }
43
78
 
44
- message IsPlayer {
45
- optional bool enabled = 1;
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
+
@@ -3,23 +3,30 @@ option optimize_for = SPEED;
3
3
 
4
4
  //GAME_MESSAGES
5
5
 
6
- message Rpc {
7
- required string method = 1;
8
- repeated string arguments = 2;
9
- optional bool returnValue = 3;
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 MessageEnvelope {
13
- required string name = 1;
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 TrackExtra trackExtra = 3;
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 string name = 2;
186
- optional bool authenticated = 3;
187
- optional string authtoken = 4;
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 Entity entity = 1;
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 MessageRouting {
256
- optional string destination = 1;
257
- optional string senderId = 2;
258
- optional string id = 3;
248
+ message NativeBytes {
249
+ optional bytes bytes = 1;
250
+ repeated bytes byteArray = 2;
259
251
  }
260
252
 
261
- message NativeBytes {
262
- required bytes bytes = 1;
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
  }