Search found 612 matches

by ReFreezed
Wed Apr 27, 2022 9:42 am
Forum: General
Topic: Simple vbscript-and-folder trick to package Love
Replies: 4
Views: 2608

Re: Simple vbscript-and-folder trick to package Love

This is silly. You never had to re-archive a LÖVE game to apply a mod to it. Since LÖVE tries to load files from the save folder before the .love/.exe file (by default) users just have to put the modded files there (with no risk of accidentally breaking the original game files). You're just adding a...
by ReFreezed
Sun Apr 24, 2022 5:02 pm
Forum: Libraries and Tools
Topic: SloppyQOI - QOI image format encoder/decoder
Replies: 1
Views: 3104

SloppyQOI - QOI image format encoder/decoder

So, I mostly just made this library for fun, but it seems using QOI could actually be beneficial in some cases. First of all, what is QOI (or The Quite OK Image Format )? It's a new, very simple, lossless image format, kind of comparable to PNG, but encodes and decodes faster at the cost of some spa...
by ReFreezed
Sat Apr 23, 2022 10:36 pm
Forum: Support and Development
Topic: [Solved] Shader question: Getting current pixel x/y color from passed reference image
Replies: 6
Views: 2340

Re: Shader question: Getting current pixel x/y color from passed reference image

pixcoord is in pixels, unlike texcoord which is normalized. So, the value is way too large for the Texel function. You can use love_ScreenSize to normalize those coords.
by ReFreezed
Sat Apr 23, 2022 2:52 am
Forum: Support and Development
Topic: Issues with .setColor
Replies: 6
Views: 2273

Re: Issues with .setColor

number = love.math.random(0, 5) if number == 5 then Note that both arguments for love.math.random() are inclusive, which means it returns one of 012345 here, i.e. the condition has a 1/6 chance of succeeding - not 1/5. (And don't worry about optimization at this point - that's a more advanced topic...
by ReFreezed
Sat Apr 23, 2022 2:34 am
Forum: Support and Development
Topic: Getting local IP address using UDP?
Replies: 12
Views: 4806

Re: Getting local IP address using UDP?

yal2du wrote: Fri Apr 22, 2022 7:29 pm

Code: Select all

      local s_dg = " Default Gateway . . . . . . . . . :"
      local s_ip = " IPv4 Address. . . . . . . . . . . : "
Note that this will only work on an English installation of Windows as these texts are translated.
by ReFreezed
Thu Apr 21, 2022 9:07 am
Forum: General
Topic: May I Please Have HELP on Cursor Customization
Replies: 8
Views: 3327

Re: May I Please Have HELP on Cursor Customization

function love.load() cursor = love.graphics.newImage("cursor.png") love.mouse.setVisible(false) end function love.draw() love.graphics.draw(cursor, love.mouse.getX() - cursor:getWidth() / 2, love.mouse.getY() - cursor:getHeight() / 2) end While this does work, it's not a hardware cursor a...
by ReFreezed
Tue Apr 19, 2022 6:55 pm
Forum: Games and Creations
Topic: Project StreetzRPG - A top-down(ish) urban RPG
Replies: 3
Views: 2781

Re: Project StreetzRPG - A top-down(ish) urban RPG

That is quite a lengthy post indeed. Thanks for sharing your story and thoughts and such.

About the save files: you could just have them bundled in the .love file as LÖVE tries to read files both from the save folder and the .love file.
by ReFreezed
Sat Apr 16, 2022 9:13 pm
Forum: Support and Development
Topic: I need a very simple sprite copying system.
Replies: 2
Views: 1546

Re: I need a very simple sprite copying system.

I think you need to be more specific with your question.

In your code it looks like a "sprite" is just an image. So, just call love.graphics.newImage() with the same filename?
by ReFreezed
Sat Apr 16, 2022 9:05 pm
Forum: Support and Development
Topic: How to detect a click on an image
Replies: 6
Views: 2706

Re: How to detect a click on an image

You can use love.mousepressed to detect mouse clicks, together with mouse position range checking like BrotSagtMist said, for example like this: local image = love.graphics.newImage("coolButton.png") local button = { image = image, x = 150, y = 100, width = image:getWidth(), height = image...