Search found 85 matches

by notcl4y
Mon Aug 28, 2023 10:40 am
Forum: General
Topic: Collision library that take rotation in to account
Replies: 14
Views: 5577

Re: Collision library that take rotation in to account

tl;dr

If you mean are there any collision libraries that support rotation, AFAIK there's windfield and the better and updated version of it breezefield.

windfield: https://github.com/a327ex/windfield
breezefield: https://github.com/HDictus/breezefield
by notcl4y
Tue Aug 15, 2023 6:14 am
Forum: General
Topic: How to load a lua file as a function (OLD: Adding variables to a table return nil)
Replies: 3
Views: 1426

Re: How to load a lua file as a function (OLD: Adding variables to a table return nil)

dusoft wrote: Sat Aug 12, 2023 12:49 pm Also: your questions belong under Support forum.
Either do others I think?
by notcl4y
Fri Aug 11, 2023 11:23 am
Forum: General
Topic: How to load a lua file as a function (OLD: Adding variables to a table return nil)
Replies: 3
Views: 1426

Re: Adding variables to a table return nil

Ok, I fixed it but now my code doesn't detect the "self" keyword. Although I called the function via a colon sign. That's because I used a load function, I also tried using loadstring and dostring (ok, looks like this function doesn't exist meanwhile dofile does), but none of them worked. ...
by notcl4y
Thu Aug 10, 2023 5:48 pm
Forum: General
Topic: How to load a lua file as a function (OLD: Adding variables to a table return nil)
Replies: 3
Views: 1426

How to load a lua file as a function (OLD: Adding variables to a table return nil)

For some reason, a value doesn't get added into a table, and when I try to output or call it, it just returns nil or an error. I tried using the unpack() function, load() but neither of them didn't work. function create_object(name, options, events) local obj = { type = name, x = 0, y = 0, width = 0...
by notcl4y
Sun Jul 02, 2023 8:49 am
Forum: Support and Development
Topic: Whats Love 2d exactly ?
Replies: 3
Views: 1406

Re: Whats Love 2d exactly ?

Lua is a simple programming language. And Love2D is a game framework, that uses Lua to code.
by notcl4y
Sun Jul 02, 2023 8:45 am
Forum: Libraries and Tools
Topic: lovepatch - A 9-patch library for LÖVE
Replies: 4
Views: 2077

Re: lovepatch - A 9-patch library for LÖVE

pauljessup wrote: Sat Jul 01, 2023 4:25 pm Well that is really cool! Huh. I think I might update my simpleWindows thing to use that, since it already does edges/etc, it just doesn't scale with them/etc.
Thanks! It's nice to see when someone uses your library!

Sorry if I broke the logic in the sentence!
by notcl4y
Fri Jun 30, 2023 6:22 pm
Forum: Libraries and Tools
Topic: lovepatch - A 9-patch library for LÖVE
Replies: 4
Views: 2077

Re: lovepatch - A 9-patch library for LÖVE

darkfrei wrote: Fri Jun 30, 2023 6:21 pm Nice lib! Actually I've never heard about the 9patch, it was nice to learn something new.
Thanks!
by notcl4y
Fri Jun 30, 2023 12:02 pm
Forum: Libraries and Tools
Topic: lovepatch - A 9-patch library for LÖVE
Replies: 4
Views: 2077

lovepatch - A 9-patch library for LÖVE

There are already, of course, the 9-patch libraries for LÖVE. But they work different . :o: You had to place in the borders of the image the black pixels and, if I recall correctly, use .9.png file extension. I did not really like this. :P So I decided to make my own 9-patch library that would just ...
by notcl4y
Fri Jun 30, 2023 11:01 am
Forum: General
Topic: 9Patch
Replies: 13
Views: 2581

Re: 9Patch

Removed code, fixed W and H values: -- drawPatch function lib.draw(patch, x, y, width, height) local imageW, imageH = patch.image:getDimensions() -- edited: local imageMiddleW = imageW-2*patch.edgeW -- actually you can store this values in the patch local imageMiddleH = imageH-2*patch.edgeH local p...
by notcl4y
Fri Jun 30, 2023 9:57 am
Forum: General
Topic: 9Patch
Replies: 13
Views: 2581

Re: 9Patch

Just use the update function with new width and height of patched area. I put some of the update() function contents into the draw() function and it worked, except for when you want the width and height not to be the same. What I'm trying to make is a 9patch that can be drawn and its width and heig...