feat: integrate Pycolytics analytics + AppFocus pause for Aurora OS - #55
Open
VladislavEllert wants to merge 8 commits into
Open
feat: integrate Pycolytics analytics + AppFocus pause for Aurora OS#55VladislavEllert wants to merge 8 commits into
VladislavEllert wants to merge 8 commits into
Conversation
Canonical app_focus.gd: pause tree + cap fps to 10 + pause all AudioStreamPlayers on focus loss; restore on focus gain (keep manual pause). Stops the game running/playing audio in background on Aurora. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add Pycolytics addon (PycoLog autoload) and register AppFocus. Wire events: start_playing/stop_playing (session + duration on exit/background), game_new, game_continue, save_delete, death (spike), level_complete + game_win (door), game_over (lives out), leaderboard_submit. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- session_id now persists for the whole app lifetime (no longer reset on minimize/restore). session_duration accumulates foreground-only time and is flushed as a stop_playing checkpoint on every background, so an OS-kill from background loses no data; server takes MAX(session_duration) per session_id. - every event now carries value.is_test=true while testing against the live server (PycoEvent.test_mode); to be flipped to false before release. - point the test webhook at the new endpoint. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Lower AppFocus BACKGROUND_FPS from 10 to 1 to minimize engine load while the app is backgrounded on Aurora. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Point Pycolytics at the live effective.games server (url + hash_salt + api_key from the backend). Test-data flag (value.is_test) stays on until the Rustore release. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
_generate_user_id wrote to user://../common/userdata.json, but Godot does
not create parent directories, so the write failed ("Failed to save
user_id") and a fresh UUID was generated on every launch (breaking the
Device ID / DAU-MAU metric). Create the common directory first.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
test_mode is now `not OS.has_feature("production")`: default builds (editor,
forum/friends export) keep value.is_test=true, while the Rustore export
preset that declares the custom feature "production" sends real (untagged)
data. One codebase, toggle lives in the export preset.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Apex had no Aurora-size icons (only Android 192/432). Generated from icon432.png so the Aurora export preset can reference res://icons/<size>.png.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Зачем этот PR
Игра Apex New Ball опубликована в Rustore от аккаунта effective.games. В рамках публикации добавлена аналитика Pycolytics и пауза при потере фокуса.
Что добавлено
Аналитика (Pycolytics)
Аддон
addons/pycolytics/+ autoloadPycoLogвproject.godot.Отслеживаемые события:
start_playing/stop_playing{session_duration}game_new— новая играgame_continue{scene_number} — продолжениеsave_delete— удаление сохраненияdeath{level, lives_left} — гибель (шип)level_complete{level, score} — прохождение уровняgame_win{score} — победа (>5 уровней)game_over{level, score} — конец игры (0 жизней)leaderboard_submit{score} — отправка в таблицу лидеровAppFocus
Пауза при сворачивании на ОС Аврора.
Если интересует аналитика
Обращайся к Владиславу (@vladellert или vladellert3438@gmail.com).
Опубликовано effective.games