-
Notifications
You must be signed in to change notification settings - Fork 477
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
Add easy way to add plugins (game wrappers) to Plugin Manager #230
Comments
Absolutely! But the problem is, that Cython is very strict on what you can do in runtime vs. compile time. It is definitely possible to make all of this more dynamic, but I initially postponed doing it, because it requires us to dynamically load external compiled modules.
This is related to Cython. Again, it's difficult to do tricks in runtime while keeping the Cython performance. But it would be awesome to see it become more dynamic without losing significant performance (slight performance hit is acceptable). Have a look at |
Long-term goal would be to install plugins from other PyPi packages -- say |
Do you mean installing the package makes it automatically available, or you have to add it? Regardless, I think this could be a step in the right direction for the time being. If I made these changes would you accept the PR? |
If you can refactor the plugin code to dynamically locate and load plugins at run-time while using Cython -- while not sacrificing any meaningful amount performance -- then I'll definitely accept the PR. You can start by dynamically loading the plugins in the And in a third iteration, we can possibly look at locating plugins installed from PyPi packages. As inspiration, in
|
sounds good |
Hello, what is |
It's to access ROMs used for tests, but only I have the key as to not distribute the ROMs illegally |
You should be able to run the other tests without problems |
is there a way I can make it skip the tests that require it? a lot of tests are failing with that being the error. |
Check out the newest commit on |
cool 😁 |
Hello! I've been attempted to add the WIP Pokemon Red Plugin to my local project, but I'm finding it's quite difficult due to the way the
PyBoy
andPluginManager
classes are structured. Would you be willing to accept a PR that makes the design more modular, and allows the user to something like the following?Additionally, inside the plugin manager, there is a lot of
.enabled()
calls from plugins, but it appears as though that function will return the same result everytime. This can be seen by the fact that thePluginManager
class has extra attributes to cache the result for all of them.I personally think this would be structured better if the
enabled
function in each plugin was changed into a_enabled
helper function that is called in the initializer and set to anenabled
attribute, so the attribute.enabled
would be available and these extra(plugin name)_enabled
attributes wouldn't be needed.If there's conflicts with evaluating
enabled
state before hand, that's okay as that doesn't impact the user at the end of the day. What does though, is the ability to add custom plugins, so let me know what you think about these suggestions! :)The text was updated successfully, but these errors were encountered: