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

Lets discuss the new config and the init sub state! #73

Open
E-A-N opened this issue Nov 23, 2018 · 0 comments
Open

Lets discuss the new config and the init sub state! #73

E-A-N opened this issue Nov 23, 2018 · 0 comments

Comments

@E-A-N
Copy link
Collaborator

E-A-N commented Nov 23, 2018

Please have a good look at the new config model https://github.com/michellelynne/LTC_game_jam/blob/df112bc22e81e450e4918e0b5cea22b17ad1ab0f/client/config/config.js#L1 and the arbitrary nature of the "default" abstraction in config.js! When adding ANY values to the config that aren't derived from an explicit state in the game, the values should be added to the config according to the following model:

config.default.attributeType = {

}

Next major thing to take note of is the init state! https://github.com/michellelynne/LTC_game_jam/blob/df112bc22e81e450e4918e0b5cea22b17ad1ab0f/client/js/gameLoop.js#L4 This is completely my fault but I forgot to go over Phaser subStates with our gameJam group! Until we can do that in person thoroughly, lets model the initState for ALL state modules this exact way! (Look at the current way it's done in gameLoop.js on the Master branch) Notice that with an init state there's literally 0 need for any globals! This is how we'll secure our game and protect user data (for example). Until all modules have an init state, we'll have to use a logical OR assignment operator to refer to the (still global) config value instead for the moment:

var data = initData || config.init.data;

I'll be assigning tickets to add an init state and implement the correct config model in your modules when someone approves the pull request.

At least our game data will flow cleanly now. Remember, the focal point of this development process is coding in a way that simplifies things for maintainers! That's far more difficult than just implementing stuff the 1st way it comes to mind.

Anyway, are there any questions about sub states, our config model, or anything oriented to how we're structuring the game going forward?

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

No branches or pull requests

10 participants