Skip to content

Commit

Permalink
language updates, dev-console polishing, internal time format cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
efroemling committed Oct 28, 2023
1 parent 1115983 commit d35f479
Show file tree
Hide file tree
Showing 27 changed files with 293 additions and 189 deletions.
94 changes: 47 additions & 47 deletions .efrocachemap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### 1.7.28 (build 21528, api 8, 2023-10-27)
### 1.7.28 (build 21531, api 8, 2023-10-27)

- Massively cleaned up code related to rendering and window systems (OpenGL,
SDL, etc). This code had been growing into a nasty tangle for 15 years
Expand Down Expand Up @@ -192,6 +192,16 @@
technical users can still fix and restore their old configs. Note that the app
still also writes .prev configs for extra security, though it no longer uses
them for anything itself.
- Converted more internal engine time values from milliseconds to microseconds,
including things like the internal EventLoop timeline. Please holler if you
notice anything running 1000x too fast or slow. In general my strategy going
forward is to use microseconds for exact internal time values but to mostly
expose float seconds to the user on the Python layer. There were starting to
be a few cases were integer milliseconds was not enough precision for internal
values. For instance, if we run with unclamped framerates and hit several
hundred FPS, milliseconds per frame would drop to 0 which could cause
problems. Note that scenev1 will be remaining on milliseconds internally for
compatibility reasons. Scenev2 should move to microseconds though.

### 1.7.27 (build 21282, api 8, 2023-08-30)

Expand Down
1 change: 1 addition & 0 deletions ballisticakit-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ set(BALLISTICA_SOURCES
${BA_SRC_ROOT}/ballistica/base/support/classic_soft.h
${BA_SRC_ROOT}/ballistica/base/support/context.cc
${BA_SRC_ROOT}/ballistica/base/support/context.h
${BA_SRC_ROOT}/ballistica/base/support/display_timer.h
${BA_SRC_ROOT}/ballistica/base/support/huffman.cc
${BA_SRC_ROOT}/ballistica/base/support/huffman.h
${BA_SRC_ROOT}/ballistica/base/support/plus_soft.h
Expand Down
1 change: 1 addition & 0 deletions ballisticakit-windows/Generic/BallisticaKitGeneric.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@
<ClInclude Include="..\..\src\ballistica\base\support\classic_soft.h" />
<ClCompile Include="..\..\src\ballistica\base\support\context.cc" />
<ClInclude Include="..\..\src\ballistica\base\support\context.h" />
<ClInclude Include="..\..\src\ballistica\base\support\display_timer.h" />
<ClCompile Include="..\..\src\ballistica\base\support\huffman.cc" />
<ClInclude Include="..\..\src\ballistica\base\support\huffman.h" />
<ClInclude Include="..\..\src\ballistica\base\support\plus_soft.h" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,9 @@
<ClInclude Include="..\..\src\ballistica\base\support\context.h">
<Filter>ballistica\base\support</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ballistica\base\support\display_timer.h">
<Filter>ballistica\base\support</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\base\support\huffman.cc">
<Filter>ballistica\base\support</Filter>
</ClCompile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@
<ClInclude Include="..\..\src\ballistica\base\support\classic_soft.h" />
<ClCompile Include="..\..\src\ballistica\base\support\context.cc" />
<ClInclude Include="..\..\src\ballistica\base\support\context.h" />
<ClInclude Include="..\..\src\ballistica\base\support\display_timer.h" />
<ClCompile Include="..\..\src\ballistica\base\support\huffman.cc" />
<ClInclude Include="..\..\src\ballistica\base\support\huffman.h" />
<ClInclude Include="..\..\src\ballistica\base\support\plus_soft.h" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,9 @@
<ClInclude Include="..\..\src\ballistica\base\support\context.h">
<Filter>ballistica\base\support</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ballistica\base\support\display_timer.h">
<Filter>ballistica\base\support</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\base\support\huffman.cc">
<Filter>ballistica\base\support</Filter>
</ClCompile>
Expand Down
2 changes: 1 addition & 1 deletion src/assets/ba_data/python/baenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

# Build number and version of the ballistica binary we expect to be
# using.
TARGET_BALLISTICA_BUILD = 21528
TARGET_BALLISTICA_BUILD = 21531
TARGET_BALLISTICA_VERSION = '1.7.28'


Expand Down
4 changes: 2 additions & 2 deletions src/ballistica/base/assets/assets_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void AssetsServer::OnAppStartInThread() {
// Ask our thread to give us periodic processing time (close to but
// not *exactly* one second; try to avoid aliasing with similar updates).
process_timer_ = event_loop()->NewTimer(
987, true, NewLambdaRunnable([this] { Process(); }).Get());
987 * 1000, true, NewLambdaRunnable([this] { Process(); }).Get());
}

void AssetsServer::PushPendingPreload(Object::Ref<Asset>* asset_ref_ptr) {
Expand Down Expand Up @@ -258,7 +258,7 @@ void AssetsServer::Process() {
// we're writing a replay.. otherwise just sleep indefinitely.
if (pending_preloads_.empty() && pending_preloads_audio_.empty()) {
if (writing_replay_) {
process_timer_->SetLength(1000);
process_timer_->SetLength(1000 * 1000);
} else {
process_timer_->SetLength(-1);
}
Expand Down
6 changes: 3 additions & 3 deletions src/ballistica/base/audio/audio_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ LPALCDEVICEPAUSESOFT alcDevicePauseSOFT;
LPALCDEVICERESUMESOFT alcDeviceResumeSOFT;
#endif

const int kAudioProcessIntervalNormal{500};
const int kAudioProcessIntervalFade{50};
const int kAudioProcessIntervalPendingLoad{1};
const int kAudioProcessIntervalNormal{500 * 1000};
const int kAudioProcessIntervalFade{50 * 1000};
const int kAudioProcessIntervalPendingLoad{1 * 1000};

#if BA_DEBUG_BUILD || BA_TEST_BUILD
const bool kShowInUseSounds{};
Expand Down
1 change: 1 addition & 0 deletions src/ballistica/base/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class ClassicSoftInterface;
class CollisionMeshAsset;
class CollisionCache;
class DevConsole;
class DisplayTimer;
class Context;
class ContextRef;
class DataAsset;
Expand Down
Loading

0 comments on commit d35f479

Please sign in to comment.