Search found 98 matches

by keharriso
Fri Sep 08, 2023 11:48 pm
Forum: Support and Development
Topic: [SOLVED] I tried writing a procedural generation algorithm but it doesn't seem to be working and I'm not sure why
Replies: 3
Views: 1111

Re: I tried writing a procedural generation algorithm but it doesn't seem to be working and I'm not sure why

Look at your getBorderCount function:

Code: Select all

wallCount = wallCount + map[gridX][gridY]
should be:

Code: Select all

wallCount = wallCount + map[a][b]
That way, your smooth function actually works!
by keharriso
Sun Mar 12, 2023 2:14 am
Forum: Support and Development
Topic: [SOLVED] Help with Replacing the alpha value of one texture with another.
Replies: 2
Views: 2072

Re: Help with Replacing the alpha value of one texture with another.

I think you're right about shaders being the way to go. Try this one: local Image = love.graphics.newImage("path/file/texture.png") local Mask = love.graphics.newImage("path/file/mask.png") local MaskShader = love.graphics.newShader[[ uniform Image mask; vec4 effect(vec4 color, I...
by keharriso
Sun Oct 09, 2022 5:54 pm
Forum: Support and Development
Topic: how to draw text in a limited area of the screen
Replies: 8
Views: 3732

Re: how to draw text in a limited area of the screen

can i add parameters for StencilFunction? Maybe try returning a stencil function from a generator? local function generateStencil(x, y, width, height) return function () love.graphics.rectangle("fill", x, y, width, height) end end function love.draw() love.graphics.stencil(generateStencil...
by keharriso
Sat Oct 01, 2022 2:00 pm
Forum: Support and Development
Topic: How to print in to terminal console?
Replies: 9
Views: 4554

Re: How to print in to terminal console?

The project works as expected for me (Windows 10, LOVE 11.4). Have you tried using lovec instead of love? Is that even an option on Mac?
by keharriso
Sat Sep 17, 2022 5:34 pm
Forum: Support and Development
Topic: Moving sprite is jitter.
Replies: 11
Views: 3447

Re: Moving sprite is jitter.

For what it's worth, I don't see any jittering. Very smooth.
by keharriso
Thu Jul 07, 2022 10:11 pm
Forum: Support and Development
Topic: ...
Replies: 7
Views: 3299

Re: I think slid is outdated and I need help saving with it

slib.lua -- line 86

change this:

Code: Select all

local size = love.filesystem.getInfo(filename)
to this:

Code: Select all

local size = love.filesystem.getInfo(filename).size
by keharriso
Mon Jul 04, 2022 4:03 pm
Forum: Libraries and Tools
Topic: lua_switch, a shorthand for creating switch statements in lua
Replies: 5
Views: 5509

Re: lua_switch, a shorthand for creating switch statements in lua

Here's a really simple example with syntax that's more C-like. local function switch(value) return function (cases) cases[value]() end end local value = "hello" switch (value) { hello = function () print "Hello, world!" end, goodbye = function () print "Goodbye, world!"...
by keharriso
Wed Jun 29, 2022 1:29 am
Forum: Libraries and Tools
Topic: LÖVE-MoonScript
Replies: 3
Views: 4495

Re: LÖVE-MoonScript

In case anyone is interested, I modified the default error handler to use MoonScript line numbers when available. This is probably the last update I'll make to this project until either LÖVE or MoonScript are updated.
by keharriso
Sat Jun 18, 2022 2:24 pm
Forum: General
Topic: Need help creating a specific function
Replies: 12
Views: 4873

Re: Need help creating a specific function

That looks great :). Excellent work for a first project in LÖVE. And yes, the lerp function takes a normalized time to 0.0 to 1.0. The duration and elapsed properties of the enemies are in seconds.