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

Refactor/move call sites to functional #60

Merged
merged 8 commits into from
Feb 7, 2024

Conversation

mrufsvold
Copy link
Contributor

This PR moves function ownership up to the JulGame module, refactors UI and Entity to use multiple dispatch, and refactors Camera and the main game loop to use functional call sites.

You'll notice some verbose function calls like JulGame.function(args...). That's not necessary if I import the functions, but before I mess with import/export statements, I just wanted to make sure things were working.

@mrufsvold
Copy link
Contributor Author

Also, is there a reason that the main game loop has it's own module? It feels like it should belong to JulGame, but I didn't want to mess with your module structure without asking.

@Kyjor
Copy link
Owner

Kyjor commented Feb 7, 2024

Also, is there a reason that the main game loop has it's own module? It feels like it should belong to JulGame, but I didn't want to mess with your module structure without asking.

Yeah that's actually something I was planning on working on soon, so if you find it better to do that, please do. I think that's something I did so I could access information from user scripts when I really first started the engine. However you want to change that is fine. The issue that I need corrected (which hopefully this helps you) is that I create an instance of main at the top level.

const MAIN = Main(Float64(1.0))

I believe this is causing the issue with running multiple sessions in the same repl session.

Anyways, take a swing at whatever you wanted to do for that! Thanks!

@mrufsvold
Copy link
Contributor Author

Cool! I'll take a look at that in a separate PR.

@Kyjor Kyjor merged commit e0f5620 into Kyjor:main Feb 7, 2024
12 of 13 checks passed
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