Skip to content

feat: integrate Pycolytics analytics + AppFocus pause for Aurora OS - #55

Open
VladislavEllert wants to merge 8 commits into
top-it-090304:mainfrom
VladislavEllert:main
Open

feat: integrate Pycolytics analytics + AppFocus pause for Aurora OS#55
VladislavEllert wants to merge 8 commits into
top-it-090304:mainfrom
VladislavEllert:main

Conversation

@VladislavEllert

Copy link
Copy Markdown

Зачем этот PR

Игра Apex New Ball опубликована в Rustore от аккаунта effective.games. В рамках публикации добавлена аналитика Pycolytics и пауза при потере фокуса.

Что добавлено

Аналитика (Pycolytics)

Аддон addons/pycolytics/ + autoload PycoLog в 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

VladislavEllert and others added 8 commits June 6, 2026 13:02
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant