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

How should modules be organized? #42

Closed
johnthagen opened this issue Feb 7, 2017 · 1 comment
Closed

How should modules be organized? #42

johnthagen opened this issue Feb 7, 2017 · 1 comment
Assignees
Milestone

Comments

@johnthagen
Copy link
Owner

johnthagen commented Feb 7, 2017

We'll soon have different types of models (#5 , #14, etc) and the current structure of having all nine modules at the top level is starting to feel a little disorganized. I think it would be worth getting this organized before the weapon is started (#5).

rocket organizes its structure like:

main.rs
game.rs
drawing/
    point.rs
    ...
models/
    bullet.rs
    player.rs
    ...
traits/

rust-belt will be a little different because we have a menu that sits above our game.

A rough sketch:

main.rs
menu/
    game/
        models/
            player.rs
            bullet, enemy, etc
            mod.rs (Drawable, Updateable)
        drawing/
            mod.rs (color, Vector, Point, etc?)
        mod.rs (Game)
    mod.rs (Menu)
    story.rs
    settings.rs

@mcdenhoed, @theandrewdavis any thoughts on this? I'm unsure if the menu/ top level directory is necessary, but seemed to model how the game is currently structured.

@mcdenhoed
Copy link
Collaborator

I'd vote against having menu be the top level, but otherwise, seems reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants