Search found 1186 matches

by darkfrei
Sun Jan 21, 2024 3:45 pm
Forum: Support and Development
Topic: Z-sections with T-crossings
Replies: 4
Views: 1526

Z-sections with T-crossings

Hi all! I was very impressed by the code doodle of Trystan https://love2d.org/forums/viewtopic.php?p=257660#p257660 But I think that it will be nice to insert not straight lines, but Z-shaped lines as: z-sections.jpg Can you please help me to start? Now I don't see any way to solve it. This examples...
by darkfrei
Sat Jan 20, 2024 3:48 pm
Forum: Libraries and Tools
Topic: Tiled Polygons - how to make tiled world smooth
Replies: 8
Views: 10051

Re: Tiled Polygons - how to make tiled world smooth

Only after seeing a testlevel ingame did I actually read what this doodle was about. (The editing with this thing was so fun that I had not bothered with reading.) It is about tiles. So the created polygons are sadly very inefficient. Often multiple polygons could be combined into one. (For example...
by darkfrei
Tue Jan 16, 2024 9:06 pm
Forum: Support and Development
Topic: remove file
Replies: 5
Views: 6611

Re: remove file

soytak111 wrote: Tue Jan 16, 2024 5:21 pm I made a file and want to remove it in löve2d. when I use the love.filesystem.remove("wow.lua") it doesn't delete the file
https://love2d.org/wiki/love.filesystem.remove

Be sure that the file was closed.
by darkfrei
Sun Jan 14, 2024 8:35 am
Forum: Games and Creations
Topic: [WIP] N-Ring, 2D racing or cars
Replies: 4
Views: 45217

Re: [WIP] N-Ring, 2D racing or cars

Not far, I have other projects that are much more interesting. But I will to do this project too.

https://youtu.be/KkMZI5Jbf18
by darkfrei
Wed Jan 03, 2024 11:23 am
Forum: Support and Development
Topic: How to path around blocked tiles with jumper?
Replies: 12
Views: 98730

Re: How to path around blocked tiles with jumper?

Check this: https://github.com/Yonaba/Jumper/tree/master/jumper/search and maybe update your code to this version. I tried using that version of Jumper and it causes my games to crash. I think I have an older version of jumper because I don't have THETASTAR and my getPath coordinates are X,Y... Do ...
by darkfrei
Wed Jan 03, 2024 8:18 am
Forum: Support and Development
Topic: How to path around blocked tiles with jumper?
Replies: 12
Views: 98730

Re: How to path around blocked tiles with jumper?

Brah wrote: Wed Jan 03, 2024 8:02 am I think I have an older version of jumper because I don't have THETASTAR and my getPath coordinates are X,Y...
Do you have any stuff on weighted grids and movement costs?
Dijkstra?
by darkfrei
Tue Dec 19, 2023 8:01 pm
Forum: Libraries and Tools
Topic: Parabola functions in Lua
Replies: 11
Views: 95125

Re: Parabola functions in Lua

Small example to calculate p h k form of parabola to a b c form with example local p = -2 -- vertical distance to focus (negative as direction) local h = 2 -- horizontal shift local k = 8 -- vertical shift print ('h:'..h, 'p:'..p, 'k:'..k) local a = 1/(4*p) local b = -2*a*h local c = a*h^2+k print (...
by darkfrei
Sun Dec 17, 2023 7:47 pm
Forum: Support and Development
Topic: Justified text displaying one character at a time
Replies: 13
Views: 71188

Re: Justified text displaying one character at a time

Thanks RNavega! It's awesome! Now I need to understand it and get how to do the DIY-justification.
by darkfrei
Sun Dec 17, 2023 9:21 am
Forum: Support and Development
Topic: Justified text displaying one character at a time
Replies: 13
Views: 71188

Re: Justified text displaying one character at a time

Just for academic interest, instead of using black rectangles, you can totally mask with transparency using a shader: you have 2 float uniforms, both in screen-space, which represent 2 "rays" that divide the screen: one being a horizontal ray that moves from top to bottom and above which ...
by darkfrei
Thu Dec 14, 2023 7:49 pm
Forum: Support and Development
Topic: Displaying (or Drawing) Coordinates
Replies: 3
Views: 19526

Re: Displaying (or Drawing) Coordinates

cords.coordinates not defined;
Also

Code: Select all

local k = shiftPressed and 2 or 1
player.x = player.x + dx*k*player.speed
player.y = player.y + dy*k*player.speed