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

The lib should be stateless #6

Open
kikito opened this issue Jan 13, 2014 · 4 comments
Open

The lib should be stateless #6

kikito opened this issue Jan 13, 2014 · 4 comments

Comments

@kikito
Copy link
Owner

kikito commented Jan 13, 2014

Right now the library holds a lot of state in vars. I don't like that.

local loader = require 'love-loader'

local loader1 = loader.newLoader(finishedCallback, loadedCallback)

loader1:newImage(  images, 'rabbit', 'path/to/rabbit.png')
loader1:newSource( sounds, 'iiiik',  'path/to/iiik.ogg')
loader1:newSource( sounds, 'music',  'path/to/music.ogg', 'stream')

This fixes two things:

  • State is moved outside of the library and into the user's env (where it should be INMHO)
  • You can have several loaders (for example one loader per level)
  • It's possible that we even don't need 'start' if we do it right.

We can probably use a single resource-loading thread for all the extra loaders (as opposed to one per loader); but we shall see.

@kikito
Copy link
Owner Author

kikito commented Mar 11, 2018

I have no time to dedicate to this project so I have decided to declare it unmaintained and close all open issues.

@ghost
Copy link

ghost commented May 11, 2022

reopened and never talked in again

@ghost
Copy link

ghost commented May 11, 2022

it worked!?!!?!?!!1!1!?

@TannerRogalsky
Copy link
Collaborator

I think my reopening of this was more aspirational than anything. Otherwise there would be a corresponding PR. But it's been many years so your guess is as good as mine at this point.

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

2 participants