Search found 372 matches
- Wed Feb 01, 2023 7:12 pm
- Forum: Libraries and Tools
- Topic: Finally getting into urutora again (UPDATE)
- Replies: 0
- Views: 8332
Finally getting into urutora again (UPDATE)
EDIT: Link to the lib https://github.com/tavuntu/urutora It's been a while since I worked on my Love2d projects and I think I'll start by updating urutora, probably the most useful one. I did some small refactor and some other stuff changed. A lot of this was thanks to rozenmad and codecat urutora D...
- Sun Nov 27, 2022 12:30 am
- Forum: Support and Development
- Topic: Shader to create transparency? (I need to use JPG)
- Replies: 3
- Views: 1570
Re: Shader to create transparency? (I need to use JPG)
This is for a game I'm creating and I'll need quite a few hi res images, so that's why I need JPG, PNG would make it way too "heavy" (we're talking about digital art). I think I'll stick to no AA then. Thanks!
- Sat Nov 26, 2022 11:50 pm
- Forum: Support and Development
- Topic: Shader to create transparency? (I need to use JPG)
- Replies: 3
- Views: 1570
Shader to create transparency? (I need to use JPG)
I was able to create a shader that returns magenta as transparent, with a small tolerance margin: uniform vec2 imageSize; bool isMagenta(vec4 pixel) { float errorMargin = 0.05; if ( (pixel.r >= (1 - errorMargin) && pixel.r <= 1) && (pixel.g >= 0 && pixel.g <= errorMargin) &am...
- Tue Nov 22, 2022 11:35 pm
- Forum: Support and Development
- Topic: Zoom in camera functionality
- Replies: 4
- Views: 3775
Re: Zoom in camera functionality
Yup, I'm using but you can remove than and play around, if this is still something you're interested in
Code: Select all
love.mouse.setRelativeMode(true)
- Tue Nov 22, 2022 8:47 pm
- Forum: Support and Development
- Topic: Zoom in camera functionality
- Replies: 4
- Views: 3775
Re: Zoom in camera functionality
Way too late but here's a zoom tool I'm working on (to put it in a game). It uses flux just for smoothness but it's not necessary. This doesn't use love.graphics functions (like translate and scale) at all, it's canvas-based. It'll work for any image size and any canvas size. For zoom = 1, it'll mak...
- Tue Nov 08, 2022 4:42 pm
- Forum: Support and Development
- Topic: [SOLVED] Using io.open() inside AppImage-packed game
- Replies: 4
- Views: 2351
Re: Using io.open() inside AppImage-packed game
Alright, this works! I just did:
where path is in the same level as main.lua as
Thanks!
Code: Select all
utils.readAsLuaObj = function (path)
local content = love.filesystem.read(path)
return loadstring(content)()
end
Code: Select all
assets/somefilder.../file
- Tue Nov 08, 2022 4:08 pm
- Forum: Support and Development
- Topic: [SOLVED] Using io.open() inside AppImage-packed game
- Replies: 4
- Views: 2351
Re: Using io.open() inside AppImage-packed game
For some reason I thought love.filesystem was only for those user directories outside of the game code, but it can also be used to read/write inside your own game root directory, right? if so, yeah, maybe I'm just using IO carelessly
- Tue Nov 08, 2022 3:29 pm
- Forum: Support and Development
- Topic: [SOLVED] Using io.open() inside AppImage-packed game
- Replies: 4
- Views: 2351
[SOLVED] Using io.open() inside AppImage-packed game
Hi there, so I'm using this function: utils.readTextFile = function (path) local f = assert(io.open(path, "rb")) local content = f:read("*all") f:close() return content end and this works when I run the game in "dev" mode, but it fails when I try to run the game after I...
- Sun Oct 30, 2022 5:05 pm
- Forum: Support and Development
- Topic: [SOLVED] Help with LCD Shader
- Replies: 2
- Views: 3417
Re: Help with LCD Shader
That did the trick, thanks!
- Sat Oct 29, 2022 5:45 pm
- Forum: Support and Development
- Topic: [SOLVED] Help with LCD Shader
- Replies: 2
- Views: 3417
[SOLVED] Help with LCD Shader
I tried to create a shader that does the same as in the image (this is from OnionOS for the Miyoo mini) https://i.postimg.cc/W4YP1frk/lcd-filter.png Zoomed: https://i.postimg.cc/0yZTVHVB/lcd-filter-zoom.png For what I understand, this shader/filter takes the current pixel, separates R, G and B and p...