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

Will GZ.jl eventually be able to do multiple files in a project? #79

Open
SabeDoesThings opened this issue Dec 21, 2023 · 2 comments
Open

Comments

@SabeDoesThings
Copy link

So I was trying to organize a game and I wanted to split it up in multiple files but then I realized after many errors that GameZero can't do multiple files (I think it can't I am not entirely sure but if it is true it can't do multiple files please consider making it able to because it would make productivity a lot better and less messy).

@aviks
Copy link
Owner

aviks commented Jan 2, 2024

Ah, yes, we do want to do that eventually. Initially, I wanted people to be able to use GameZero without worrying about modules, environments or includes -- which most of us consider trivial, but are actually quite a barrier for beginner programmers. I wanted them to get something on screen in five minutes, without having to learn a lot of extraneous stuff.

However, the flip side is that that the design we ended up with makes it difficult to support plain includes now. This is, to be honest, a collateral damage. I am hopeful we can fix it, but it will need some careful thinking and coding. I've just not had the time to do that. We had a PR that attempted to fix that, but unfortunately broke some other functionality.

@mattianeroni
Copy link

Can't you for the moment just allow to pass the filenames to the rungame method in order to include these files before the main loop? Is frustrating not having the possibility to import other file into the game.

rungame("mainfile.jl", externals=["lib1.jl", "lib2.jl"])

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

3 participants