Search found 14 matches

by Trystan
Mon Mar 25, 2024 1:02 pm
Forum: Libraries and Tools
Topic: Dithering with matrix
Replies: 9
Views: 9649

Re: Dithering with matrix

I was thinking about dithing the other day and played around with the idea of error being pushed to the right and downwards through a maze (where the mazes passability allows it). CurveDither.png The attached uses this for a few different wall layouts, "t" toggles showing the layout on the...
by Trystan
Fri Mar 15, 2024 7:48 am
Forum: General
Topic: Code Doodles!
Replies: 197
Views: 276789

Re: Code Doodles!

This next one is some anemones trying to grab some balls (plankton maybe) using inverse kinematics. IK.png -- Disable output buffer so debug messages print in real time io.stdout:setvbuf("no") function love.load() bodies = {} balls = {} -- spawn some balls (targets) for i = 1, 20 do table....
by Trystan
Sun Mar 10, 2024 2:21 pm
Forum: General
Topic: Need help with tiled
Replies: 1
Views: 1886

Re: Need help with tiled

I've not used tiled but it looks like you're only seeing the very top left of your tilemap. It might be there's some function in tiled that lets you set the desired size of your tiles. Another way you can see more is by calling "love.graphics.scale(scale_value)" at the start of your draw f...
by Trystan
Sun Mar 10, 2024 12:54 pm
Forum: Support and Development
Topic: Finding which object in the table is closest
Replies: 5
Views: 2290

Re: Finding which object in the table is closest

Just to add a little bit more. If you want to do a lot of checks per frame and need it to be a little bit faster you don't need to take the square root for each object, since closer things will have a smaller distance squared than farther things. You can then take the square root of the winner at th...
by Trystan
Wed Mar 06, 2024 7:00 am
Forum: General
Topic: Code Doodles!
Replies: 197
Views: 276789

Re: Code Doodles!

Another quick doodle. This time soft-body physics with Verlet Integration. The gif didn't come out great but it's quite fun to play with. You can grab and drag any particle with the mouse. F1 resets the cloth, F2 toggles a fan that blows from the side and F3 toggles colour. I'm pretty sure I could h...
by Trystan
Mon Mar 04, 2024 11:25 am
Forum: General
Topic: Code Doodles!
Replies: 197
Views: 276789

Re: Code Doodles!

There's been L-systems earlier in the thread ( https://love2d.org/forums/viewtopic.php?p=166023#p166023 ) but I thought I'd add these anyway because they're kind of nice to look at. Triforce.gif To increase the generation press F2, to reset to 0 press F1. To try a different L-system change the setup...
by Trystan
Tue Feb 27, 2024 9:59 am
Forum: Libraries and Tools
Topic: Dithering with matrix
Replies: 9
Views: 9649

Re: Dithering with matrix

I was playing around with Dithering the other day and thought I'd add my script here. It's nothing that hasn't been done (better) above but it was fun to create. There are a few different dithers and colour reduction methods you can do by changing the arguments of the dither function. My dither matr...
by Trystan
Thu Feb 15, 2024 11:51 am
Forum: Libraries and Tools
Topic: Maze Thread
Replies: 50
Views: 44651

Re: Maze Thread

Thanks pgimeno for pointing out this thread. I'd put a recursive backtracker in the code doodles thread (https://love2d.org/forums/viewtopic.php?p=258691#p258691) The algorithm itself is really simple, though much of my implementation could probably be improved. I was toying around with it this morn...
by Trystan
Mon Feb 12, 2024 2:58 pm
Forum: General
Topic: Code Doodles!
Replies: 197
Views: 276789

Re: Code Doodles!

I was toying around with mazes the other day and found the recursive backtracker to be pretty easy to implement and generally nice to look at. It guarantees a maze where every spot is filled in and all spots are on a single network. f1 to generates a new maze. RecursiveBacktracker.png function love....
by Trystan
Fri Jan 26, 2024 1:24 pm
Forum: Support and Development
Topic: Z-sections with T-crossings
Replies: 4
Views: 1507

Re: Z-sections with T-crossings

I don't really have anything to add to the topic but wanted to say that these look amazing.