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

Make the entire engine modular #1091

Open
L1lith opened this issue Apr 1, 2022 · 2 comments
Open

Make the entire engine modular #1091

L1lith opened this issue Apr 1, 2022 · 2 comments
Labels

Comments

@L1lith
Copy link
Contributor

L1lith commented Apr 1, 2022

I recently published the library Melon Solid. Unfortunately, there is no way to instantiate each game/canvas to a specific component on the page (which is bad if the a game component is put on the page, taken off again, and put back again, like in the side of client side routing, or simply if there 2 games on the same page). Basically what I need to make everything work properly would be a way to instantiate every part of the engine (the pool, video object, etc) so that I can have one instance for each game (this prevents games from overlapping in memory).

I talked to the author in discord so I'm pretty sure they're already aware, but I'm just opening an issue so we can track this issue and others can comment.

obiot added a commit that referenced this issue May 13, 2022
with the global pool property now being an instance of the new ObjectPool Class
obiot added a commit that referenced this issue Jun 13, 2022
time (namespace) is now a default instance of the Timer class
obiot added a commit that referenced this issue Jul 9, 2022
…t, with `game` now being the default instance of it

this not yet though possible to create a different Application instance, as references to the "default" game are hardcoded a bit everywhere and need more rework for instances to work independently.
@obiot
Copy link
Member

obiot commented Jul 9, 2022

@L1lith making some progress here, with now game being an instance of Application (a new class).

Unfortunately this not yet though possible to create a different Application instance, as references to the "default" game are hardcoded a bit everywhere and need more rework for instances to work independently. This is the last bit though as all other required elements can also now or already be dynamically instantiated.

obiot added a commit that referenced this issue Jul 12, 2022
…esponding parent application/game

no more direct reference to the global namespace:
- world is now properly attached to an "Application"
- Body are now properly updated based on their "parent" world gravity
- Quadtree also now refers to its parent World when required
@obiot obiot added the Feature label Aug 19, 2022
@L1lith
Copy link
Contributor Author

L1lith commented Sep 29, 2022

I feel like this one kinda fits here too #1139

obiot added a commit that referenced this issue Dec 26, 2022
…ames within the same page

(still a work in progress)
obiot added a commit that referenced this issue Dec 28, 2022
…instance to detect and solve collisions
obiot added a commit that referenced this issue Mar 26, 2023
- the `sortOn` property is now a proper getter/setter for the App World instance `sortOn` property
- Container now defines a `getRootAncestor()` method that will return the reference to the root container parent (aka world container)
- remove more internal reference to me.game in Container and Trigger
obiot added a commit that referenced this issue Jun 3, 2023
…erties to configure a game behavior on blur and focus events

- this will allow later to have different behavior based on game instance (see #1091)
- `pauseOnBlur`, `resumeOnFocus` and `stopOnBlur` device properties are now deprecated and replaced by their Application counterpart
obiot added a commit that referenced this issue Nov 20, 2023
…me instance to which a renderable belongs to
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants