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

Application state management - launch #39

Merged
merged 25 commits into from
Apr 21, 2021
Merged

Application state management - launch #39

merged 25 commits into from
Apr 21, 2021

Conversation

jelster
Copy link
Owner

@jelster jelster commented Feb 13, 2021

Adds the space-truckers application initialization logic and launch event handling.

Contributes to #32

@jelster
Copy link
Owner Author

jelster commented Feb 13, 2021

Changes so far in the commits pushed:

  • refactoring to extract the planet creation into factory methods
  • design improvements via refactoring
  • hiding of html ui on button click
  • BJS loading scene and screen management

@jelster jelster requested a review from RaananW February 13, 2021 17:49
@jelster
Copy link
Owner Author

jelster commented Feb 14, 2021

  • Added a quick-hack fsm that uses function* generators to manage application state
  • Main menu loads after initialization -- no cutscene yet to play
  • THEME SONG!!! Plays when the main menu appears

#40 is an experimental branch that uses an NPM package to provide the state machine logic - @RaananW do you have any experience with libraries like this with BJS, and any reason to use or not use them?

src/astroFactory.js Outdated Show resolved Hide resolved
src/astroFactory.js Show resolved Hide resolved
src/astroFactory.js Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
src/mainMenuScene.js Outdated Show resolved Hide resolved
src/mainMenuScene.js Outdated Show resolved Hide resolved
src/spaceTruckerApplication.js Show resolved Hide resolved
src/spaceTruckerApplication.js Outdated Show resolved Hide resolved
src/startscene.js Show resolved Hide resolved
@jelster
Copy link
Owner Author

jelster commented Feb 17, 2021

Here's a diagram I drew showing the different application versus game states and how they interact. Many elements will have state machines of their own; I've omitted most of them to keep the big picture more clear

application state diagram

@jelster jelster marked this pull request as ready for review March 15, 2021 00:06
@jelster jelster changed the base branch from main to develop April 21, 2021 01:09
@jelster jelster merged commit 272212e into develop Apr 21, 2021
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.

2 participants