-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Resource Subsystem #147
Comments
I currently see resource management as a foundational library used by explicit systems like graphics and sound. Under the current ppb flavor, I'm not sure there's a lot of need for developers to interact with the resource subsystem. (Except maybe declarative resource usage hints.) |
Realizing today I never actually commented. I think the most important bit of any resource system is
Being able to have scene prep a preload list and letting the subsystems load those things early one would be awesome so we get the right behavior for minimal effort. |
Ok, so my most current design involves redoing how resource usage is done. Resources are started to be loaded as soon as their usage is first declared, in the background. Resources are used like: The resource system can also produce signals about loading, so we can produce template load screens. |
I'm also thinking that instead of the current resource path system, we extend |
I definitely want to see what the virtual file system one looks like in use. So we should definitely make a stab at that. |
It's pretty much what pyglet does if you prefix the resource with |
Ok, here's what I'm thinking:
The second of the two is by far the more dramatic change (from an end-user's perspective). So, here's what's happening:
So, in summary, we'll start seeing this: class MySprite(BaseSprite):
image = Image('mygame/sprites/MySprite.png')
def on_click(self, event, signal):
signal(PlaySound(sound=Sound('mygame/sounds/clicked.ogg'), at=self)) In addition to the above, the Resource subsystem:
|
Question regarding the Python VFS system: how would that affect a local resource folder that doesn't live in the same module space as the game the end user is writing? |
The requirements for this are:
So, if you have a project folder with the (In this example, I believe only If these prove insufficient, we can add something like |
Oh, and I think I'm going to use the |
Ok, here's the list
|
Closing this, as it's complete! |
Add system to load and cache resources, including zip safe.
The text was updated successfully, but these errors were encountered: