Search found 872 matches

by vrld
Sat Nov 04, 2017 11:36 am
Forum: Support and Development
Topic: Shader questions
Replies: 2
Views: 201

Re: Shader questions

-> How can I get the color of a given pixel in a texture sent to the shader? Suppose I send a drawn canvas to the shader. How can I get the color of a certain pixel on this canvas? As grump wrote, the Texel() function does what you want, but keep in mind that shaders work "inside out": They are lit...
by vrld
Sat Nov 04, 2017 11:26 am
Forum: Support and Development
Topic: Delete an object
Replies: 3
Views: 133

Re: Delete an object

From the PIL, chapter 17 : Lua does automatic memory management. A program only creates objects (tables, functions, etc.); there is no function to delete objects . Lua automatically deletes objects that become garbage, using garbage collection. You need to remove all references to the object, that m...
by vrld
Sat Nov 04, 2017 10:42 am
Forum: Support and Development
Topic: TextBox in LOVE2d?
Replies: 3
Views: 202

Re: TextBox in LOVE2d?

Shameless plug: Here is how to do it with SUIT . The important part is in the validate function, which uses string.gsub() to remove unwanted characters. You can do anything you like here. local suit = require 'suit' local utf8 = require 'utf8' local function validate(input) local len = utf8.len(inpu...
by vrld
Tue Oct 31, 2017 5:55 pm
Forum: Libraries and Tools
Topic: [library] moonshine – Chainable post-processing shaders for LÖVE.
Replies: 6
Views: 429

Re: [library] moonshine – Chainable post-processing shaders for LÖVE.

Fuzzlix wrote:
Tue Oct 31, 2017 5:46 pm
Is it possible to use your library with fonts too?
I am unsure what you mean by that, but the shaders apply to everything drawn inside the effect.draw(...) call.
by vrld
Tue Oct 31, 2017 5:50 pm
Forum: Games and Creations
Topic: Genetic neural network plays FlappyBird
Replies: 3
Views: 353

Re: Genetic neural network plays FlappyBird

Fun project that leaves room for so much experimentation. Here are a few suggestions: For the neural net: Use different activation function, for example ReLU, leaky ReLU, sinc, etc. ( here is a list ). How do the different activation functions affect how fast the computer learns to play the game? Us...
by vrld
Tue Oct 31, 2017 3:41 pm
Forum: Libraries and Tools
Topic: [library] moonshine – Chainable post-processing shaders for LÖVE.
Replies: 6
Views: 429

[library] moonshine – Chainable post-processing shaders for LÖVE.

TL;DR: shine version 2.0: Better API, better performance, better name. Less than 10 lines of code to transform this: noonshine.jpg into this: moonshine.jpg Lövers, ever since shaders were first added to LÖVE , I had this idea of a vast repository of common post-processing shaders that you could jus...
by vrld
Sat Oct 28, 2017 8:56 am
Forum: Support and Development
Topic: math.random > love.math.random
Replies: 10
Views: 391

Re: math.random > love.math.random

I was curious, so I did my own test. I also computed the variation in run time to get a sense if the difference is (statistically) significant. This is the code I used: -- compute mean and standard deviation from sample local function mean_std(t) assert(#t >= 2) local mean, scatter = 0, 0 for n,x in...
by vrld
Thu Jul 14, 2016 11:38 am
Forum: General
Topic: Need some help with learning Lua
Replies: 6
Views: 925

Re: Need some help with learning Lua

The PIL teaches you everything there is to know about Lua and is (in my opinion) one of the best books about programming languages in general. It's a bit dense, but given that you already know other programming languages that should be no problem.
by vrld
Thu Jul 14, 2016 11:34 am
Forum: General
Topic: Finding neighbours on an arbitrary polygon grid
Replies: 6
Views: 864

Re: Finding neighbours on an arbitrary polygon grid

I'm afraid you will have to check every polygon. However, you can speed up the intersection tests by computing the outcircle of each polygon (has to be done only once) and test whether the outcircles intersect (centroid-distance < sum-of-radii). If they don't, you know the polygons will not share a ...
by vrld
Thu Jul 14, 2016 11:18 am
Forum: Support and Development
Topic: The Better GUI framework for Love
Replies: 7
Views: 1108

Re: The Better GUI framework for Love

Let's see how SUIT fits your requirements: - Easy to Pick Up I'd argue SUIT is easier to use than other libraries, but because it's an immediate mode gui (imgui) you might need to unlearn some stuff first. - Themeable It's not (yet) fully documented, but you can change the look of every widget. The ...