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

Reorganization of the code (new modules) #18

Closed
XenonLab-Studio opened this issue Apr 7, 2018 · 4 comments
Closed

Reorganization of the code (new modules) #18

XenonLab-Studio opened this issue Apr 7, 2018 · 4 comments
Assignees
Labels
improved code Code optimization and more

Comments

@XenonLab-Studio
Copy link
Owner

The main.py module has become too big! I want to divide the classes and functions into various modules to make the project more organized and easy to manage.

@XenonLab-Studio XenonLab-Studio changed the title Reorganization of the code Reorganization of the code (new modules) Apr 7, 2018
@XenonLab-Studio XenonLab-Studio self-assigned this Apr 7, 2018
@XenonLab-Studio XenonLab-Studio added the improved code Code optimization and more label Apr 7, 2018
XenonLab-Studio pushed a commit that referenced this issue Apr 7, 2018
XenonLab-Studio pushed a commit that referenced this issue Apr 8, 2018
XenonLab-Studio pushed a commit that referenced this issue Apr 8, 2018
@XenonLab-Studio
Copy link
Owner Author

Now the project is organized in a better way, it is easier to work comfortably without scrolling over 1000 lines of code in a single module 👍

@benmoran56
Copy link
Collaborator

I have actually started a refactoring of the original codebase myself, into an ECS design. You can see my work here: https://github.com/benmoran56/Minecraft
The "ecs.py" module is a copy of my esper ECS library, which is a simple drop in). The codebase is about 70% refactored to an ECS design; the BlockController class still needs to be broken into Processors.

This refactor is also arranged to have the code in one Scene, which will make it easy to seperate the main menu, game field, etc. with a simple SceneManager.

Would you be open to adopting this type of design for TerraCraft? In my opinion it's the easiest way to go for maintainability and refactoring, which is important for projects that might have many contributors.

@benmoran56
Copy link
Collaborator

As an update, I have opened a smaller pull request. Maybe we can forget about the ECS refactor for now, unless it makes sense to you.

@XenonLab-Studio
Copy link
Owner Author

Yes, it's a good idea for me. My intention is to implement a main menu, and other features making them separate from the current code (classes and external functions), so your idea is 100% adherent to mine. Thank you for your help, I appreciate it very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improved code Code optimization and more
Projects
None yet
Development

No branches or pull requests

2 participants