"Questions that don't deserve their own thread" thread

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Locked
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: "Questions that don't deserve their own thread" thread

Post by s-ol »

Ranguna259 wrote:Is there a way to add luacrypto to LÖVE ?
I belive I need to compile LÖVE with this but how would I go about doing that ?
You need to compile it and ship the resulting .dll/.so/.dylib on every platformy then just load it via 'require'. You could in theory re-compile a patched LÖVE version that includes it but that would actually be more complicated.

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: "Questions that don't deserve their own thread" thread

Post by Ranguna259 »

I've managed to compile it on linux by installing through luarocks but I have no idea on how to do this on windows.
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: "Questions that don't deserve their own thread" thread

Post by bobbyjones »

Ranguna259 just find binaries from the interwebs
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: "Questions that don't deserve their own thread" thread

Post by Ranguna259 »

bobbyjones wrote:Ranguna259 just find binaries from the interwebs
I can't find them anywhere.

I give up, LOVE should have some form of cryptography methods. I want to communicate with a server and to make a secure connection I need to setup a Public key cryptograchy scheme, to do this I need cryptography functions which luacrypto has and LOVE doesn't..

Maybe I should add this to Post-0.10.0 feature wishlist.
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: "Questions that don't deserve their own thread" thread

Post by rmcode »

I could need help with making my shaders work on Raspi. Problem is, I don't have a raspi myself so I can't test it.

Image

Shader code is here:
https://github.com/rm-code/bomb-dodgers ... palette.fs
https://github.com/rm-code/bomb-dodgers ... er/blur.fs
https://github.com/rm-code/bomb-dodgers ... er/wave.fs

Any pointers would help :P
User avatar
slime
Solid Snayke
Posts: 3161
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: "Questions that don't deserve their own thread" thread

Post by slime »

GLSL ES 1.0 (the shading language used by OpenGL ES 2.0) doesn't allow custom default values for uniform/extern variables.
User avatar
pgimeno
Party member
Posts: 3655
Joined: Sun Oct 18, 2015 2:58 pm

Re: "Questions that don't deserve their own thread" thread

Post by pgimeno »

unixfreak wrote:I hope this makes sense as i have a hard time searching for a method on this. Is there a simple approach to getting a 'negative' colour depending on what is drawn behind? For instance, if i have a canvas with colours that clash with another transparent canvas drawn in front, is there a way to make the top canvas have inverted colours?

An example would be white text scrolling across a black background which might contain white squares -- when the white square is behind, that part of the texts colour becomes negative, so it's black instead.

I imagine it could be done with shaders, but that's ahead of my current knowledge. Are there any build in functions or 'hacks' to get this behavior?
The closest built-in is blend mode "subtract" but that won't do what you want in most circumstances. A suitable blend mode for your purposes is one called "difference" which, to my knowledge, is not implemented in OpenGL and thus neither in LÖVE. It is the absolute value of the difference between what is already painted and what you're painting. You can check it as a layer blending mode in e.g. Gimp.

You need a shader, and even then, you need to use a canvas with a copy of the background that you can pass to the shader, because there's no way to do that otherwise.

At least to the extent of my knowledge. I hope someone proves me wrong.
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: "Questions that don't deserve their own thread" thread

Post by Ranguna259 »

Can I add luacrypto to LÖVE through FFI ?
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: "Questions that don't deserve their own thread" thread

Post by bobbyjones »

Ranguna259 wrote:Can I add luacrypto to LÖVE through FFI ?
You don't need to. Just ship the binaries and load them up. You don't have to recompile love for them.
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: "Questions that don't deserve their own thread" thread

Post by Ranguna259 »

bobbyjones wrote:You don't need to. Just ship the binaries and load them up. You don't have to recompile love for them.
The problem is I can't find the binaries anywhere, I can't compile the code on windows and I wasn't talking about recompiling love, I wanted to compile the code through luaJIT's FFI, which would load the c code inside Lua.
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
Locked

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 2 guests