Giter VIP home page Giter VIP logo

love-loader's People

Contributors

flamendless avatar hobbit-lol avatar kikito avatar mondanzo avatar pablomayobre avatar qaisjp avatar tannerrogalsky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

love-loader's Issues

Fallback

Is it possible to implement a fallback with no threads? I want to use it with punchdrunk and don't want to change my code.

The lib should be stateless

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.

Error when loading ttf font

Error: bad argument #1 to '?' (filename, File, or FileData expected)

Due to equal requestKey in both font and BMFont kinds, they got same channel. That leads to situation, when resource is post-processed by wrong kind in getResourceFromThreadIfAvailable()

Issue with finishedCallback

I get different results when the finishedCallback is called..

Sometimes I get this in the console.

first tween finished
image   table: 0x02945188       left-hand-climber-hi
second tween finished

and sometimes this:

first tween finished
image   table: 0x02945188       left-hand-climber-hi
second tween finished
second tween finished

Testprogram:
https://www.love2d.org/forums/download/file.php?id=9951

https://www.love2d.org/forums/viewtopic.php?f=5&t=77904&p=168404#p168318

https://www.love2d.org/forums/viewtopic.php?f=5&t=77904&p=168404#p168404

Detect available modules

Force loading specific modules is not nice, I would expect that disabling the sound module from conf.lua would make love-loader only load images, instead the sound module is loaded anyway because of the requires at the beginning, deleting these of course makes love-loader crash.

For a future version (maybe whenever this becomes stateless) love-loader should check for each needed module before even start loading.

This will useful in a stateless version so that only the needed loaders are loaded in each thread, for example if I want to load sounds in a thread and images in other then I would only require love.sound in one and not in the other. Also helpful when I'm only using love-loader for images, for example.

Error on 11.1

Hi, using this lib for löve 11.1 gives this error

Thread Error
love-loader.lua:100 bad argument #2 to 'constructor' (string expected, got no value) 

Compatibility with SLAM

To be honest, I don't know whether to request it here or there (https://github.com/vrld/slam).
I tried to simply require slam in love-loader.lua but then it fails to load any audio.

Error: lib/love-loader.lua:205: lib/love-loader.lua:103: bad argument #1 to 'push' (boolean, number, string, love type, or flat table expected)
stack traceback:
    lib/hump/gamestate.lua:89: in function <lib/hump/gamestate.lua:88>
    [C]: in function 'assert'
    lib/love-loader.lua:205: in function 'update'
    states/LOAD.lua:10: in function 'update'
    [string "boot.lua"]:461: in function <[string "boot.lua"]:433>
    [C]: in function 'xpcall'

I tried to debug this but don't know how to get details since the error seems to happen within the thread.

Support fonts

Currently font loading (bitmap or otherwise) is not supported by the library. It would be nice if we could load fonts in a separate thread, along with everything else.

Separator error on Windows

https://github.com/kikito/love-loader/blob/master/love-loader.lua#L101

On my system (Windows 7 x86_64) the separator ends up being "" which does not seem to work. When I manually switch it to "/" it works fine.

Error: libs/loader/loader.lua:167: Could not open file libs\loader\loader.lua. Does not exist.
stack traceback:
libs/hump/gamestate.lua:81: in function <libs/hump/gamestate.lua:80>
[C]: in function 'newThread'
libs/loader/loader.lua:167: in function 'start'
gamestates/loading.lua:35: in function 'switch'
main.lua:13: in function 'load'
[string "boot.lua"]:407: in function <[string "boot.lua"]:399>
[C]: in function 'xpcall'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.