From 7417ac0103c0e0b94666b715ce2fd546f46f4e61 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Mon, 16 Aug 2021 19:20:24 +0200 Subject: [PATCH] groundwork for generalized messaging functionality --- .efrocachemap | 88 ++++----- .idea/dictionaries/ericf.xml | 6 + CHANGELOG.md | 68 +++---- Makefile | 5 + assets/.asset_manifest_public.json | 2 + assets/Makefile | 2 + assets/src/ba_data/python/._ba_sources_hash | 2 +- .../.idea/dictionaries/ericf.xml | 7 + .../inspectionProfiles/Project_Default.xml | 5 + ballisticacore-cmake/.idea/misc.xml | 25 ++- ballisticacore-cmake/.idea/scopes/Ignored.xml | 3 + docs/ba_module.md | 2 +- src/ballistica/app/app.cc | 12 +- src/ballistica/audio/audio.cc | 8 +- src/ballistica/audio/audio.h | 2 +- src/ballistica/audio/audio_server.cc | 38 ++-- src/ballistica/audio/audio_source.cc | 4 +- src/ballistica/ballistica.cc | 18 +- src/ballistica/config/config_common.h | 6 +- src/ballistica/core/module.cc | 2 +- src/ballistica/core/thread.h | 4 +- src/ballistica/dynamics/bg/bg_dynamics.cc | 4 +- src/ballistica/dynamics/bg/bg_dynamics.h | 2 +- .../dynamics/bg/bg_dynamics_draw_snapshot.h | 2 +- .../dynamics/bg/bg_dynamics_fuse.cc | 6 +- .../dynamics/bg/bg_dynamics_fuse_data.h | 4 +- .../dynamics/bg/bg_dynamics_server.cc | 50 ++--- .../dynamics/bg/bg_dynamics_shadow.cc | 8 +- .../dynamics/bg/bg_dynamics_volume_light.cc | 8 +- src/ballistica/dynamics/collision_cache.cc | 8 +- src/ballistica/game/account.h | 2 +- src/ballistica/generic/utils.cc | 5 +- src/ballistica/graphics/camera.cc | 12 +- src/ballistica/graphics/camera.h | 4 +- .../input/device/client_input_device.cc | 2 +- src/ballistica/platform/platform.cc | 8 +- .../python/class/python_class_node.cc | 13 +- src/ballistica/scene/node/anim_curve_node.cc | 2 +- src/ballistica/scene/node/bomb_node.cc | 2 +- src/ballistica/scene/node/combine_node.h | 2 +- src/ballistica/ui/widget/button_widget.cc | 8 +- src/ballistica/ui/widget/button_widget.h | 2 +- src/ballistica/ui/widget/check_box_widget.cc | 4 +- src/ballistica/ui/widget/check_box_widget.h | 2 +- src/ballistica/ui/widget/column_widget.cc | 2 +- tests/test_efro/test_message.py | 34 ++++ tools/bacommon/net.py | 3 + tools/batools/androidsdkutils.py | 4 +- tools/batools/build.py | 48 +++-- tools/efro/message.py | 184 ++++++++++++++++++ tools/efrotools/pybuild.py | 34 +++- 51 files changed, 541 insertions(+), 237 deletions(-) create mode 100644 ballisticacore-cmake/.idea/scopes/Ignored.xml create mode 100644 tests/test_efro/test_message.py create mode 100644 tools/efro/message.py diff --git a/.efrocachemap b/.efrocachemap index a2e47271..0f91c73b 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -565,7 +565,7 @@ "assets/build/ba_data/models/bridgitLevelBottom.bob": "https://files.ballistica.net/cache/ba1/1e/f4/8e8c6b86081aecc89888677b1dda", "assets/build/ba_data/models/bridgitLevelCollide.cob": "https://files.ballistica.net/cache/ba1/9c/19/b3f44e34a9153e645ae6e05bed9e", "assets/build/ba_data/models/bridgitLevelRailingCollide.cob": "https://files.ballistica.net/cache/ba1/91/18/1fe3cd097d0b1e01ff76a531990f", - "assets/build/ba_data/models/bridgitLevelTop.bob": "https://files.ballistica.net/cache/ba1/c2/d7/dadd52531f7eb9c5a1165bc30edb", + "assets/build/ba_data/models/bridgitLevelTop.bob": "https://files.ballistica.net/cache/ba1/8a/ff/e930989beb9e741c86fbc9d8b9c5", "assets/build/ba_data/models/bunnyForeArm.bob": "https://files.ballistica.net/cache/ba1/7f/0c/31eb734e202a206b27df16f0bce3", "assets/build/ba_data/models/bunnyHand.bob": "https://files.ballistica.net/cache/ba1/48/36/a7172c3d3660811d3c660719ab9a", "assets/build/ba_data/models/bunnyHead.bob": "https://files.ballistica.net/cache/ba1/81/1e/999f5c55663b73c3a3506864f226", @@ -911,7 +911,7 @@ "assets/build/ba_data/models/witchUpperLeg.bob": "https://files.ballistica.net/cache/ba1/da/f3/83bf5f77abce88e0ba7ddd3bfbde", "assets/build/ba_data/models/wizardForeArm.bob": "https://files.ballistica.net/cache/ba1/7e/20/824b45fd56ef923d61ea7b91a904", "assets/build/ba_data/models/wizardHand.bob": "https://files.ballistica.net/cache/ba1/66/bd/6059a0dcf1c14eb4dc47904aec94", - "assets/build/ba_data/models/wizardHead.bob": "https://files.ballistica.net/cache/ba1/81/e6/04e09e74169c7582d433eb972f01", + "assets/build/ba_data/models/wizardHead.bob": "https://files.ballistica.net/cache/ba1/8b/64/918cea6808d80f53a57ccee2029b", "assets/build/ba_data/models/wizardLowerLeg.bob": "https://files.ballistica.net/cache/ba1/f4/9a/d8f380aba0775bff0fd35f98ba9a", "assets/build/ba_data/models/wizardPelvis.bob": "https://files.ballistica.net/cache/ba1/63/e7/f5940cc4598d1dbeece261ea6c82", "assets/build/ba_data/models/wizardToes.bob": "https://files.ballistica.net/cache/ba1/a2/c0/9b550223f1df470b6bfc2df23f71", @@ -3936,50 +3936,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/72/82/86956fae909ac2fe2a1abd84a361", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/78/d0/f3bf896c369ca302fb24129ac652", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/14/65/e76d6db4acf8d4aa4911cc9d028a", "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/74/1d/fc9e33e565475daaac80da5252f0", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/01/e8/469e2da917853f6dc96e4aaadb12", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/26/b8/a3fa9d99d4720d188f28f577704e", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/eb/bd/9d8561a74476b704ad252c5c9807", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/bf/7d/77c00ddc1c099b369ba2b8df28d9", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1b/7c/ce10fe8508a295a677560861c586", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/27/ce/334457db385ce15f76b33c42d382", "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/9c/7b/ac1a200be0f37078af0991faca3b", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c2/03/26b9ff129007266c48f1a45277a5", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ff/20/5a1d6f82f1903395f70e6ff9c165", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/d4/48/af1ff6b22ef9622fa823c3fb45d8", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/95/77/d72b460cd5af4045d2805120cb39", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d8/bb/526cda66921b0578144adfeb7ee1", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e4/ac/1c69bcacc277bca5b07501f7df57", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/04/52/60c5ea5e91cf8583d4837bdcee47", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a7/08/8f990244433ba4264dabdcd72299", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b2/1e/3fdeab959e3eeae775920c4920d7", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/00/e0/f5aa9e8948b991dc0e0a208070c2", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/fa/2f/6d5d9d34651aef7b36bfa941d9aa", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/b6/c5/6b54d23c72ef591eb6937df71ed1", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/bb/f6/8f6c63c971af7bac231a637aea7f", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/f7/fb/8ac747420042532ebd9e3b77c81d", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c8/2b/f877075b157d502c658a4cd0d866", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e4/d9/0ac2d149b9815a6fcd816114df18", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d3/00/b495df3471f5eddc94a60c88f654", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ad/65/ac79287366619dce16152d45d207", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9b/d2/893807bc441d9b85ac0df6e4d7e5", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f4/a7/8956e8178655dd4ab9366b404ac3", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/84/44/5dc62136e984a157688359a4ff31", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/71/ed/81eb2fd97f23894690c67ab063e2", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/32/f3/41b621fdee9487b24e83cc2fd173", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e3/b5/0c8a61c5d6d277fe4575292ce40f", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/bf/09/946527282b82da7bb41c44c33c4e", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b1/c0/c26053fe27dc6a23f7c4e33d9887", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b4/82/3c20d2819811068477eb4f82d530", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/05/31/854b99de8afa01e8f59998c5325b", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f0/92/e2e41ac2c731b49e55b2afb11d59", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/13/f6/1e9ff73e247539fcfedc9665046a", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/93/4c/b134b1185befb63ee9891ff790f2", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/d4/35/7de64b81ec626a06f224f2c7b352", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/60/67/def358beedd594c91009a8810480", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/35/50/302253b0fdab74a9fa1722e90d91", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/0e/11/914ca2032a70cc70a5552d60b6f8", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/25/3e/9402625d0f5db5756fcc73e83998", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/2f/4f/8d6a2d6548753e01119b6b2c14ed", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/cb/ce/cb22f47b9efca8e08d776dd8c876", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f4/2b/d2610ee3521acca45dc010d96940", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/74/1d/142b429f823320491387ed97d877", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/9e/d9/c7e3bd2adee613ca901238c26bb8", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/86/a4/c4b4a6e6d5dda42199e4dac5184a", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b7/5a/60fdcd55840cebc736673ff32416", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4c/6f/1af3830bdcf69fba8078b2866fd1", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/0d/08/8c329bd71c2df09ead449bac480a", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3b/2f/ef7a91e2b36e29f124febca5c62a", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/20/c0/942cd20ac2265769b1a1f14f0d17", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3f/e0/f462366cd16674ebeea4e2463d69", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/04/36/24006cd9c69d896fa09294f1c551", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/82/42/2f8d90b396536430bac4e8f9e1a6", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/64/bf/7f5e32cc0ccfa83fac033c7f6e3e", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/e2/d7/2a22130c82126c06debcd2e07d9a", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/87/8c/8844f896ae2f2e23fc7de8ebf83e", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b6/34/c5f471383506bec47851780c51fa", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ef/05/a7b311b98f8eb082352f89c0467b", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1c/be/12c89e97422620f979482dee9be2", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/27/23/a0ca2d8114858f9d73e6fe1e3a49", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ab/ab/7773aa505ac380b7aa17e5a01d7d", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/50/37/b3af9d6405c1dbe08b1ab9d0c5e0", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/62/65/86ccbcdf8ca0f1aeb97607271f7b", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/22/74/b91237a1c27491892ac77448e684", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/23/9b/5b5b5d663cef540a9462ef2a37d0", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6c/ff/1e06dd40fd61042e36e83cecdb38", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/20/55/39ac5c3257e9767512671bf80272", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b7/0c/848465c86d4933a025e45eaa1148", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/30/7f/419770d849f568a170d956081452", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2d/6e/d4665bf704a16f4df850df6b3fa7", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/04/d3/7cbe365469441b408e8b1b537e97", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/6e/f3/3084e35e36e378a31efcd5322475", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/bc/68/170b706d3424ae63d087038c8132", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/ed/7e/efc93d28f9540a66998d3981d8d2", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/bb/8d/212edd7de31aa73920ddad2a6c45", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/e6/8a/df58e0d6ab23f9242b7ca806f084", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/b2/80/d6f4f629e96bc2ead3921c20e2cf", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/5f/f8/f14410dbaeffbb1e8cb1ca24a293", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/a9/7a/2ec01f037c3a5ac14cf99c0bbe74", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/fc/b5/62133319c6df8567aecfd29b1204", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/8d/96/c1516dee7d458c9065597e0aede6" } \ No newline at end of file diff --git a/.idea/dictionaries/ericf.xml b/.idea/dictionaries/ericf.xml index 63dc1c68..d055fb1d 100644 --- a/.idea/dictionaries/ericf.xml +++ b/.idea/dictionaries/ericf.xml @@ -532,6 +532,7 @@ devel devicename devtool + dffc dgram dhave dheadless @@ -705,6 +706,7 @@ excludetypes excstr execcode + execing execlocals executils exhash @@ -746,6 +748,7 @@ feedparser ffaeff ffap + ffbbdf fflush fhash fhashes @@ -1285,6 +1288,7 @@ lprop lsbo lsbt + lshort lsprof lsqlite lssl @@ -1295,6 +1299,7 @@ lsval ltex ltypes + lubyte lzma lzmamodule macappstore @@ -1855,6 +1860,7 @@ realpath realsies recache + recv redist redistributables relpath diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e65cf69..723fde22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,7 +39,7 @@ - Fixed a potential crash-on-exit due to statically allocated colliders/caches in `ode_collision_trimesh.cpp` getting torn down while in use - Better randomization for player free-for-all starting locations - Plugins can now register to be called for pause, resume, and shutdown events in addition to launch -- Added ba.app.state holding the overall state of the app (running, paused, etc) +- Added ba.app.state holding the overall state of the app (running, paused, etc.) - renamed the efro.dataclasses module to efro.dataclassio and added significant functionality - command-line input no longer errors on commands longer than 4k bytes. - added show-tutorial option to the server wrapper config @@ -84,7 +84,7 @@ - Android asset-sync phase (completing install...) now emits log output for debugging. ### 1.5.24 (20163) -- Upgraded Python from version 3.7 to 3.8. This is a substantial change (though nothing like the previous update from 2.7 to 3.7) so please holler if anything is broken. These updates will happen once every year or two now.. +- Upgraded Python from version 3.7 to 3.8. This is a substantial change (though nothing like the previous update from 2.7 to 3.7) so please holler if anything is broken. These updates will happen once every year or two now... - Windows debug builds now use Python debug libraries. This should hopefully catch more errors that would otherwise go undetected and potentially cause crashes. - Switched windows builds to use 'fast' mode math instead of 'strict'. This should make the game run more efficiently (similar modes are already in use on other platforms) but holler if any odd breakage happens such as things falling through floors (more often than the occasional random fluke-y case that happens now). - Added `_ba.can_display_full_unicode()` for any code that wants to avoid printing things that won't show up locally. @@ -123,13 +123,13 @@ - Fixed a case where an early fatal error could lead to a hung app and no error dialog. - Added environment variables which can override UI scale for testing. Set `BA_FORCE_UI_SCALE` to small, medium or large. - Added a ba.UIScale enum. The value at ba.app.uiscale replaces the old `ba.app.interface_type`, `ba.app.small_ui`, and `ba.app.med_ui` values. -- Emoji no longer display in-game with a washed-out appearance. If there are any places in-game where bright colored emoji become distracting, please holler. -- `_ba.get_game_roster()` now includes `account_id` which is the validated account id of all clients (will be None until completes). Also a few keys are renamed: `specString->spec_string` and `displayString->display_string`. +- Emoji no longer display in-game with a washed-out appearance. If there are any places in-game where bright-colored emoji become distracting, please holler. +- `_ba.get_game_roster()` now includes `account_id` which is the validated account id of all clients (will be None until completes). Also, a few keys are renamed: `specString->spec_string` and `displayString->display_string`. ### 1.5.19 (20123) - Cleaned up some bomb logic to avoid weird corner-cases such as land-mine explosions behaving like punches when set off by punches or bombs potentially resulting in multiple explosions when triggered by multiple other bombs simultaneously. Holler if anything explosion-related seems off now. -- Reactivated and cleaned up fatal-error message dialogs; they should now show up more consistently and on more platforms when something really bad happens instead of getting a silent crash. -- Certain hardware buttons on Android which stopped working in 1.5 should now be working again.. +- Reactivated and cleaned up fatal-error message dialogs; they should now show up more consistently and on more platforms when something catastrophic happens instead of getting a silent crash. +- Certain hardware buttons on Android which stopped working in 1.5 should now be working again... ### 1.5.18 (20108) - A bit of project cleanup; tools/snippets is now tools/pcommand, etc. @@ -137,7 +137,7 @@ ### 1.5.17 (20102) - More cleanup to logging and crash reporting system. -- Various other minor bug fixes.. +- Various other minor bug fixes... ### 1.5.16 (20099) - Hopefully finally fixed that pesky crash bug on score submissions. @@ -185,7 +185,7 @@ - Lots of low level input handling cleanup, also related to Android 1.5 version. Please holler if keyboard/game-controllers/etc. are behaving odd on any platforms. - Now including Android test builds for the first time since 1.5. These have not been thoroughly tested yet so please holler with anything that is obviously broken. - Mouse wheel now works in manual camera mode on more platforms. -- Server scripts now run in opt mode in release builds so they can use bundled .opt-1.pyc files. +- Server scripts now run in opt mode in release builds, so they can use bundled .opt-1.pyc files. - Fixes a potential crash in the local network browser. - Fixes an issue where Hockey Pucks would not show up in network games. - More misc bug fixes and tidying. @@ -196,11 +196,11 @@ ### 1.5.4 (20067) - Should now work properly with non-ascii paths on Windows (for real this time). -- Note that Windows game data is now stored under 'Local' appdata instead of 'Roaming'; if you have an old install with data you want to preserve, you may want to move it over manually. +- Note that Windows game data is now stored under 'Local' appdata instead of 'Roaming'; if you have an old installation with data you want to preserve, you may want to move it over manually. - Misc cleanup and minor bug fixes. ### 1.5.3 (20065) -- Improved handling of non-ascii characters in file paths on windows. +- Improved handling of non-ascii characters in file paths on Windows. ### 1.5.2 (20063) - Fixes an issue with controls not working correctly in net-play between 1.4.x and 1.5.x. @@ -208,15 +208,15 @@ - Fixes various other minor bugs. ### 1.5.1 (20062) -- Windows server now properly displays color when run by double clicking the .bat file. +- Windows server now properly displays color when run by double-clicking the .bat file. - Misc bug fixes. ### 1.5.0 (20001) - This build contains about 2 years worth of MAJOR internal refactoring to prepare for the future of BombSquad. As a player this should not (yet) look different from 1.4, but for modders there is a lot new. See the rest of these change entries or visit [ballistica.net](https://ballistica.net) for more info. -- Ported the entire scripting layer from Python 2 to to Python 3 (currently at 3.7, and I intend to keep this updated to the latest widely-available release). There's some significant changes going from python 2 to 3 (new print statement, string behavior, etc), but these are well documented online, so please read up as needed. This should provide us some nice benefits and future-proofs everything. (my janky 2.7 custom Python builds were getting a little long in the tooth). +- Ported the entire scripting layer from Python 2 to Python 3 (currently at 3.7, and I intend to keep this updated to the latest widely-available release). There's some significant changes going from python 2 to 3 (new print statement, string behavior, etc.), but these are well documented online, so please read up as needed. This should provide us some nice benefits and future-proofs everything. (my janky 2.7 custom Python builds were getting a little long in the tooth). - Refactored all script code to be PEP8 compliant (Python coding standards). Basically, this means that stuff that was camel-case (fooBar) is now a single word or underscores (`foobar` / `foo_bar`). There are a few minor exceptions such as existing resource and media filenames, but in general old code can be ported by taking a pass through and killing the camel-case. I know this is a bit of a pain in the ass, but it'll let us use things like Pylint and just be more consistent with the rest of the Python world. -- On a related note, I'm now using 'yapf' to keep my Python code formatted nicely (using pep8 style); I'd recommend checking it out if you're doing a lot of scripting as its a great time-saver. -- On another related note, I'm trying to confirm to Google's recommendations for Python code (search 'Google Python Style Guide'). There are some good bits of wisdom in there so I recommend at least skimming through it. +- On a related note, I'm now using 'yapf' to keep my Python code formatted nicely (using pep8 style); I'd recommend checking it out if you're doing a lot of scripting as it's a great time-saver. +- On another related note, I'm trying to confirm to Google's recommendations for Python code (search 'Google Python Style Guide'). There are some good bits of wisdom in there, so I recommend at least skimming through it. - And as one last related note, I'm now running Pylint on all my own Python code. Highly recommended if you are doing serious scripting, as it can make Python almost feel as type-safe as C++. - The minimum required android version will now be 5.0 (a requirement of the Python 3 builds I'm using) - Minimum required macOS version is now 10.13 (for similar reasons) @@ -227,13 +227,13 @@ - Renamed 'exceptionOnNone' arg to 'doraise' in various calls. - bs.emitBGDynamics() is now ba.emitfx() - bs.shakeCamera() is now ba.camerashake() -- Various other minor name changes (bs.getUIBounds() -> ba.app.uibounds, etc). I'm keeping old and new Python API docs around for now so you can compare as needed. +- Various other minor name changes (bs.getUIBounds() -> ba.app.uibounds, etc.). I'm keeping old and new Python API docs around for now, so you can compare as needed. - Renamed bot classes based on their actions instead of their appearances (ie: PirateBot -> ExplodeyBot) - bs.getSharedObject() is now ba.stdobj() - Removed bs.uni(), bs.utf8(), `bs.uni_to_ints()`, and `bs.uni_from_ints()` which are no longer needed due to Python 3's better string handling. - Removed bs.SecureInt since it didn't do much to slow down hackers and hurts code readability. - Renamed 'finalize' to 'expire' for actors and activities. 'Finalize' sounds too much like a destructor, which is not really what that is. -- bs.getMapsSupportingPlayType() is now simply ba.getmaps(). I might want to add more filter options to it besides just play-type, hence the rename. +- bs.getMapsSupportingPlayType() is now simply ba.getmaps(). I might want to add more filter options to it besides just play-type, hence the renaming. - Changed the concept of 'game', 'net', and 'real' times to 'sim', 'base', and 'real'. See time function docs for specifics. Also cleared up a few ambiguities over what can be used where. - I'm converting all scripting functions to operate on floating-point seconds by default instead of integer milliseconds. This will let us support more accurate simulations later and is just cleaner I feel. To keep existing calls working you should be able to add timeformat='ms' and you'll get the old behavior (or multiply your time values by 0.001). Specific notes listed below. - ba.Timer now takes its 'time' arg as seconds instead of milliseconds. To port old calls, add: timeformat='ms' to each call (or multiply your input by 0.001) @@ -251,18 +251,18 @@ - bs.getRealTime() is no more. Pass timetype='real' and timeformat='ms' to ba.time() if you need to recreate its behavior. - bs.getTimeString() is now just ba.timestring(), and accepts seconds by default (pass timeformat='ms' to keep old calls working). - bs.callInGameThread() has been replaced by an optional `from_other_thread` arg for ba.pushcall() -- There is now a special ba.UNHANDLED value that handlemessage() calls should return any time they don't handle a passed message. This will allow fallback message types and other nice things in the future. +- There is now a special `ba.UNHANDLED` value that handlemessage() calls should return any time they don't handle a passed message. This will allow fallback message types and other nice things in the future. - Wired the boolean operator up to ba.Actor's exists() method, so now a simple "if mynode" will do the right thing for both Actors and None values instead of having to explicitly check for both. - Ditto for ba.Node; you can now just do 'if mynode' which will do the right thing for both a dead Node or None. - Ditto for ba.InputDevice, ba.Widget, ba.Player - Added a bs.App class accessible via ba.app; will be migrating global app values there instead of littering python modules with globals. The only remaining module globals should be all-caps public 'constants' -- 'Internal' methods and classes living in `_ba` and elsewhere no longer start with underscores. They are now simply marked with '(internal)' in their docstrings. 'Internal' bits are likely to have janky interfaces and can change without warning, so be wary of using them. If you find yourself depending on some internal thing often, please let me know and I can try to clean it up and make it 'public'. +- 'Internal' methods and classes living in `_ba` and elsewhere no longer start with underscores. They are now simply marked with '(internal)' in their docstrings. 'Internal' bits are likely to have janky interfaces and can change without warning, so be wary of using them. If you find yourself depending on some internal thing often, please let me know, and I can try to clean it up and make it 'public'. - bs.getLanguage() is no more; that value is now accessible via ba.app.language -- bs.Actor now accepts an optional 'node' arg which it will store as self.node if passed. Its default DieMessage() and exists() handlers will use self.node if it exists. This removes the need for a separate NodeActor() for simple cases. +- bs.Actor now accepts an optional 'node' arg which it will store as `self.node` if passed. Its default DieMessage() and exists() handlers will use `self.node` if it exists. This removes the need for a separate NodeActor() for simple cases. - bs.NodeActor is no more (it can simply be replaced with ba.Actor()) - bs.playMusic() is now ba.setmusic() which better fits its functionality (it sometimes just continues playing or stops playing). - The bs.Vector class is no more; in its place is a shiny new ba.Vec3 which is implemented internally in C++ so its nice and speedy. Will probably update certain things like vector node attrs to support this class in the future since it makes vector math nice and convenient. -- Ok you get the point.. see [ballistica.net](https://ballistica.net) for more info on these changes. +- Ok you get the point... see [ballistica.net](https://ballistica.net) for more info on these changes. ### 1.4.155 (14377) - Added protection against a repeated-input attack in lobbies. @@ -282,7 +282,7 @@ ### 1.4.147 (14364) - Fixes an issue where a client rejoining a server after being kicked could get stuck in limbo - Language updates -- Increased security on games that list themselves as public. All joining players must now be validated by the master server or they will be kicked. This will let me globally ban accounts or ip addresses from joining games to avoid things like ad spam bots (which has been a problem this week). +- Increased security on games that list themselves as public. All joining players must now be validated by the master server, or they will be kicked. This will let me globally ban accounts or ip addresses from joining games to avoid things like ad spam-bots (which has been a problem this week). - Added a max chat message length of 100 - Clients sending abnormal amounts of data to the server will now be auto-kicked @@ -319,7 +319,7 @@ ### 1.4.137 (14331) - Lots of internal code cleanup and reorganization before I dig into networking rework (hopefully didn't break too much) -- Slowly cleaning up Python files (hoping to move closer to to PEP 8 standards and eventually Python 3) +- Slowly cleaning up Python files (hoping to move closer to PEP 8 standards and eventually Python 3) - Added Hindi language - Cleared out some old build types (farewell OUYA; thanks for the memories) - Added support for meshes with > 65535 verts (though turns out OpenGL ES2 doesn't support this so moot at the moment) @@ -330,7 +330,7 @@ - Fixed an issue where 'report this player' window would show up behind the window that spawned it ### 1.4.135 (14324) -- Updated various SDKs for the android build (now building against api 27, removed inmobi ads, etc) +- Updated various SDKs for the android build (now building against api 27, removed inmobi ads, etc.) ### 1.4.134 (14322) - Fixed an issue where the internal keyboard would sometimes show up behind game windows @@ -350,8 +350,8 @@ - Replay speed can now be controlled with -/= keys (on devices with keyboards) - Added Serbian language - Remote app connections are now disabled by default on server builds -- Server wrapper script now supports python 3 in addition to python 2. (Python 3 support in the actual game will still be a while) -- Added better crash reporting on Android so I can hopefully fix bugs quicker +- Server wrapper script now supports python 3 in addition to python 2. (Python 3 support in the actual game will still be awhile) +- Added better crash reporting on Android, so I can hopefully fix bugs more quickly. - bs.Lstr() can now take a 'fallbackResource' or 'fallbackValue' argument; the old 'fallback' argument is deprecated - Removed the long-since-deprecated bs.translate() and bs.getResource() calls (bs.Lstr() should be used for all that stuff now) - Removed some deprecated functions from GameActivity: getInstanceScoreBoardNameLocalized(), getInstanceNameLocalized(), getConfigDescriptionLocalized() @@ -382,7 +382,7 @@ - Added support for account unlinking ### 1.4.118 (14298) -- Added 64 bit arm binary to Android builds +- Added 64-bit arm binary to Android builds ### 1.4.111 (14286) - BallisticaCore Pro now unlocks 2 additional characters @@ -398,15 +398,15 @@ - added a 'playlistCode' option in the server config which corresponds with playlist codes added in Ballisticacore 1.4.100 (used for sharing playlists with friends). Now you can create a custom playlist, grab a code for it, and easily use it in a dedicated server. ### 1.4.99 (14252) -- there is now a forced 10 second delay between a player leaving the game and another player from that same client joining the game. This should fix the exploit where players were leaving and re-joining to avoid spawn times. +- there is now a forced 10-second delay between a player leaving the game and another player from that same client joining the game. This should fix the exploit where players were leaving and re-joining to avoid spawn times. - most in-game text is now set as bs.Lstr() values so that they show up in the client's own language instead of the server's There are currently a few exceptions such as time values which I need to address. ### 1.4.98 (14248) -- added kick-votes that can be started by any client. currently a client must type '0' or '1' in chat to vote, but i'll add buttons for them soon. -- modified text nodes so they can display in each client's own language. (most text nodes don't do this yet but the capability is there). However this means older clients can't connect to 1.4.98 servers, so you may want to stick with an older server for a bit until the userbase gets more updated. +- added kick-votes that can be started by any client. Currently, a client must type '0' or '1' in chat to vote, but I'll add buttons for them soon. +- modified text nodes so that they can display in each client's own language. (most text nodes don't do this yet but the capability is there). However, this means older clients can't connect to 1.4.98 servers, so you may want to stick with an older server for a bit until the userbase gets more updated. ### 1.4.97 (14247) -- back to displaying long names in more places; mainly just the in-game ones are clamped.. trying to find a good balance.. +- back to displaying long names in more places; mainly just the in-game ones are clamped... trying to find a good balance... ### 1.4.97 (14246) - public party names will now show up for clients as the title of their party windows instead of "My Party" and also during connect/disconnect (requires client 14246+) @@ -420,16 +420,16 @@ - server now clamps in-game names to 8 characters so there's some hope of reading them in-game. Can loosen this or add controls for how clamping happens if need be. ### 1.4.96 (14241) -- added an automatic chat-block to combat chat spammers. Blocks start at 10 seconds and double in duration for each repeat offense +- added an automatic chat-block to combat chat spammers. Block durations start at 10 seconds and double with each repeat offense ### 1.4.95 (14240) - fixed an issue where a single account could not be used to host multiple parties at once ### 1.4.95 (14236) -- added a port option to the config so its now possible to host multiple parties on one machine (note that ballisticacore 1.4.95+ is required to connect ports aside from 43210) +- added a port option to the config, so it's now possible to host multiple parties on one machine (note that ballisticacore 1.4.95+ is required to connect ports aside from 43210) ### 1.4.95 (14234) -- fixed a bug that could cause the windows version to freeze randomly after a while +- fixed a bug that could cause the Windows version to freeze randomly after a while ### 1.4.95 (14233) - ballisticacore (both `bs_headless` and regular) now reads commands from standard input, making it easier to run commands via scripts or the terminal @@ -439,7 +439,7 @@ - added more options such as the ability to set game series lengths and to host a non-public party ### 1.4.94 -- now have mac, windows, and both 32 and 64 bit linux server builds +- now have mac, windows, and both 32 and 64-bit linux server builds - added an optional config.py file that can be used instead of modifying the server script itself - added an autoBalanceTeams option for teams games - people joining and leaving the party are no longer announced (too much noise) diff --git a/Makefile b/Makefile index 5fdcc661..f3a18f93 100644 --- a/Makefile +++ b/Makefile @@ -705,6 +705,11 @@ test-dataclassio: @tools/pcommand pytest -o log_cli=true -o log_cli_level=debug -s -vv \ tests/test_efro/test_dataclassio.py +# Individual test with extra output enabled. +test-message: + @tools/pcommand pytest -o log_cli=true -o log_cli_level=debug -s -vv \ + tests/test_efro/test_message.py + # Individual test with extra output enabled. test-entity: @tools/pcommand pytest -o log_cli=true -o log_cli_level=debug -s -vv \ diff --git a/assets/.asset_manifest_public.json b/assets/.asset_manifest_public.json index 35fd2b26..8b15328c 100644 --- a/assets/.asset_manifest_public.json +++ b/assets/.asset_manifest_public.json @@ -499,6 +499,7 @@ "ba_data/python/efro/__pycache__/dataclassio.cpython-38.opt-1.pyc", "ba_data/python/efro/__pycache__/error.cpython-38.opt-1.pyc", "ba_data/python/efro/__pycache__/json.cpython-38.opt-1.pyc", + "ba_data/python/efro/__pycache__/message.cpython-38.opt-1.pyc", "ba_data/python/efro/__pycache__/net.cpython-38.opt-1.pyc", "ba_data/python/efro/__pycache__/terminal.cpython-38.opt-1.pyc", "ba_data/python/efro/__pycache__/util.cpython-38.opt-1.pyc", @@ -520,6 +521,7 @@ "ba_data/python/efro/entity/util.py", "ba_data/python/efro/error.py", "ba_data/python/efro/json.py", + "ba_data/python/efro/message.py", "ba_data/python/efro/net.py", "ba_data/python/efro/terminal.py", "ba_data/python/efro/util.py", diff --git a/assets/Makefile b/assets/Makefile index 235dfe83..abbe812a 100644 --- a/assets/Makefile +++ b/assets/Makefile @@ -652,6 +652,7 @@ SCRIPT_TARGETS_PY_PUBLIC_TOOLS = \ build/ba_data/python/efro/entity/util.py \ build/ba_data/python/efro/error.py \ build/ba_data/python/efro/json.py \ + build/ba_data/python/efro/message.py \ build/ba_data/python/efro/net.py \ build/ba_data/python/efro/terminal.py \ build/ba_data/python/efro/util.py @@ -674,6 +675,7 @@ SCRIPT_TARGETS_PYC_PUBLIC_TOOLS = \ build/ba_data/python/efro/entity/__pycache__/util.cpython-38.opt-1.pyc \ build/ba_data/python/efro/__pycache__/error.cpython-38.opt-1.pyc \ build/ba_data/python/efro/__pycache__/json.cpython-38.opt-1.pyc \ + build/ba_data/python/efro/__pycache__/message.cpython-38.opt-1.pyc \ build/ba_data/python/efro/__pycache__/net.cpython-38.opt-1.pyc \ build/ba_data/python/efro/__pycache__/terminal.cpython-38.opt-1.pyc \ build/ba_data/python/efro/__pycache__/util.cpython-38.opt-1.pyc diff --git a/assets/src/ba_data/python/._ba_sources_hash b/assets/src/ba_data/python/._ba_sources_hash index 9cbeb594..21541fb7 100644 --- a/assets/src/ba_data/python/._ba_sources_hash +++ b/assets/src/ba_data/python/._ba_sources_hash @@ -1 +1 @@ -3589099007368754607207796662508579801 \ No newline at end of file +119796669300700074719883839459258868842 \ No newline at end of file diff --git a/ballisticacore-cmake/.idea/dictionaries/ericf.xml b/ballisticacore-cmake/.idea/dictionaries/ericf.xml index a309ceec..a8be275e 100644 --- a/ballisticacore-cmake/.idea/dictionaries/ericf.xml +++ b/ballisticacore-cmake/.idea/dictionaries/ericf.xml @@ -256,6 +256,7 @@ dernit dets dfba + dffc dfff dfmt dictval @@ -326,6 +327,7 @@ ewwwww exctype execinfo + execing exhash exhashstr expbool @@ -347,6 +349,7 @@ fdirz fenv fesetround + ffbbdf ffff ffffff fffffff @@ -577,9 +580,11 @@ lpsockaddr lrintf lscope + lshort lstr lsync ltypes + lubyte lvec lvoid macbuild @@ -626,6 +631,7 @@ mmask mmdevapi modder + modders modelview moduletype momemtary @@ -845,6 +851,7 @@ reallocations realtimers recalc + recv recvfrom redundants refcounted diff --git a/ballisticacore-cmake/.idea/inspectionProfiles/Project_Default.xml b/ballisticacore-cmake/.idea/inspectionProfiles/Project_Default.xml index bd40a33a..8a923ba0 100644 --- a/ballisticacore-cmake/.idea/inspectionProfiles/Project_Default.xml +++ b/ballisticacore-cmake/.idea/inspectionProfiles/Project_Default.xml @@ -11,10 +11,12 @@ + + @@ -31,6 +33,9 @@ + + +