MichaelSinsbeck / platformer

A ninja platformer written in LÖVE
7 stars 0 forks source link

Game does not run without canvas-support #89

Closed michalove closed 7 years ago

michalove commented 10 years ago

I got this from sheepolution:

http://i.imgur.com/uXF9TsL.png

It seems like monocle is not completely deactivated, when there is no canvas-support.

Germanunkol commented 10 years ago

This is really weird. On my system, when there's no canvas support (which I can only emulate), then it never gets into that function, because shaders are disabled:

    if love.graphics.isSupported("canvas") then
        print("\t\t...supported!")
    else
        print("\t\t...not supported!")
        print("Disabling shaders")
        USE_SHADERS = false
        return
    end

Later on, the function to initialize the shadows is called like this: shadows:init( USE_SHADERS, 0,0,0,200 )

I just tried it again, it works fine for me.

Can you ask him to do the following: First, I'd need the full output of what the game prints into the console when started (note that the shadow functions are only called if he starts a level, so he needs to do that) Secondly, have him try starting the game with the -n command line argument:

    love BandanaDemo1.love -n

... and see if that works.

Sheepolution commented 10 years ago

http://i.imgur.com/kvx68Cv.png

It says that it's supported. I'm having trouble with running it by console, since I have LÖVE 0.9.0 installed.

Germanunkol commented 10 years ago

Thanks for the quick feedback! I'm confused, though: if you can't run it from the console, how can you show the console output? Love doesn't need to be installed in order to run it, right? You can prepend the love (or Love.exe) command witht he path to it on the console, so you can run Love from anywhere:

/home/me/stuff/love /home/downloads/BandanaDemo1.love
#or
C:\Downloads\LOVE\Love.exe C:\Downloads\BandanaDemo1.love

... and to either of these you can add the -n switch, no?

I made a test script: Could you tell me what the output of this file is? http://www.germanunkol.de/dump/test.love If it displays "supported", then Love thinks your PC supports canvases even though it doesn't, in which case the only way to ever run the game will be to force the canvases to be off using the -n switch...

michalove commented 10 years ago

Looks like the internal check for canvas support is incorrect here. I hope that with 0.9.0 this is resolved. Otherwise we'd have to find a more robust way to check for canvas support.

Sheepolution: If you cannot run it using the -n switch, or if it is too much effort, then I can prepare a .love file for you where canvas is disabled by default.

Sheepolution commented 10 years ago

If you'd do that, I'll happily play your game.

michalove commented 10 years ago

Germanunkol, could you please do it? I just prepared a .love file, but I cannot upload and do not have a server. It is enough to comment out the lines 24,26,27 in main.lua.

Germanunkol commented 10 years ago

Here you go: http://germanunkol.de/bandana/BandanaDemo1_NoShaders.love @DaanHaaz, could you just drop us a line if it's working?

Sheepolution commented 10 years ago

http://i.imgur.com/7aHOXtP.png :(

Germanunkol commented 10 years ago

Uh, my bad. I tested in the game directory, so the files were found even though I forgot to put them into the .love.

Can you try the above link again? It should work now.

michalove commented 10 years ago

Nixola reported a similar error. It seems, the canvas is too big. So probably the isSupported returns true, because it is supported, but the size of the canvas exceeds the graphics cards maximum texture size and then the game returns an error.

Germanunkol commented 10 years ago

Ah, that would make sense!

In that case, I'll replace the .love file with one where the canvases are disable, but the shaders are not. Otherwise people won't see the greyscale-effect, either.

Germanunkol commented 10 years ago

I uploaded a new version to the website. (Follow the links on the website). It should now run without using canvases for the shadows, even when canvases are supported.