Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

game_state: add user-controlled in-game timers #97

Open
6 tasks
jorgegv opened this issue Sep 14, 2022 · 0 comments
Open
6 tasks

game_state: add user-controlled in-game timers #97

jorgegv opened this issue Sep 14, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jorgegv
Copy link
Owner

jorgegv commented Sep 14, 2022

Allow definition of game timers:

  • 16 bit counters
  • They count seconds
  • They have a name (for DATAGEN)
  • They can be RESET, STARTed and STOPped
  • They can be checked (FLOW checks)
  • They can be acted upon (FLOW actions)
  • There is always at least one global game timer (GAME_TIME) - This is to be implemented separately in game_state: add main in-game timer #98
  • Not managed by IM2 ISR, but from the main game loop - check for current_time.seconds changes

Tasks:

  • New data struct timer_data_s: counter, state and initial state (running, stopped)
  • New global table all_timers
  • New functions: timer_init (called at program initialization), timer_reset (called on game initialization and in FLOW action), timer_start (called at game start and in flow action), timer_stop (called in flow action), timer_update_all_timers (called from main game loop), timer_reset_all_timers (called on game initialization)
  • FLOW checks: TIMER_EQUAL, TIMER_MORE_THAN, TIMER_LESS_THAN
  • FLOW actions: TIMER_STOP, TIMER_START, TIMER_RESET
  • DATAGEN: directive for TIMER in GAME_CONFIG: name, initial_state
@jorgegv jorgegv added the enhancement New feature or request label Sep 14, 2022
@jorgegv jorgegv added this to the Release 0.5.0 milestone Sep 14, 2022
@jorgegv jorgegv self-assigned this Sep 14, 2022
@jorgegv jorgegv modified the milestones: Release 0.5.0, Release 0.6.0 Sep 14, 2022
@jorgegv jorgegv changed the title game_state: add in-game timers game_state: add user-controlled in-game timers Sep 29, 2022
@jorgegv jorgegv modified the milestones: Release 0.6.0, Release 0.7.0 Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant