Search found 1178 matches

by darkfrei
Tue Apr 23, 2024 4:30 pm
Forum: Libraries and Tools
Topic: Voronoi Fortune Additional Events in Lua
Replies: 2
Views: 188

Re: Voronoi Fortune Additional Events in Lua

Another desmos graphic solutions:
https://www.desmos.com/calculator/kzff2hb9d3
https://www.desmos.com/calculator/onvynga3da
Animation (89).gif
Animation (89).gif (951.14 KiB) Viewed 16 times
by darkfrei
Tue Apr 23, 2024 1:52 pm
Forum: Support and Development
Topic: Grid based movement
Replies: 3
Views: 108

Re: Grid based movement

Your code works, but try this code: function love.load() love.window.setTitle ('press WASD to move') gridSize = 64 player = { -- Initial grid position of the player gridPos = {x=1, y=1}, -- Change in grid position (due to movement) deltaGrid = {x=0, y=0}, -- Movement speed of the player (cells per s...
by darkfrei
Sun Apr 21, 2024 6:58 pm
Forum: Libraries and Tools
Topic: Voronoi Fortune Additional Events in Lua
Replies: 2
Views: 188

Re: Voronoi Fortune Events

Event 6: Parabola vertex event. 1) Subdivide arc (u10, u8) to left arc (u10, u11), flat (u11, u12) and arc (u12, u8). (Left arc has event to be collapsed at point v16) 2)Subdivide arc (u8, u9) to arc (u8, u13), flat (u13, u14) and right arc (u14, u9). (Right arc has event to be collapsed at point v...
by darkfrei
Sun Apr 21, 2024 6:50 pm
Forum: Libraries and Tools
Topic: Voronoi Fortune Additional Events in Lua
Replies: 2
Views: 188

Voronoi Fortune Additional Events in Lua

I've tried to make the Fortune's algorithm in Lua, but within limited frame, so it needs flat beach line and several new events: Event 1: First site event. Creating frame with x, y, w, h and finding any highest site (point with x, y). Adding first site to the diagram. Creating the beach line, first ...
by darkfrei
Fri Apr 19, 2024 5:16 pm
Forum: Libraries and Tools
Topic: Rasterizing polygons into images
Replies: 5
Views: 1168

Re: Rasterizing polygons into images

RNavega wrote: Fri Apr 19, 2024 12:30 am for every pixel of the image, it loops through every segment of the polygon to see which has the nearest distance.
I've made this exactly same way! But for not closed polyline:
viewtopic.php?p=243686#p243686

Image
by darkfrei
Wed Apr 17, 2024 7:15 am
Forum: Libraries and Tools
Topic: Rasterizing polygons into images
Replies: 5
Views: 1168

Re: Rasterizing polygons into images

Wow! Very nice!
I've tried to make the d-string parser, but it was always bad, there are too much variations how you can write the same vectors.
by darkfrei
Fri Apr 12, 2024 12:54 pm
Forum: Libraries and Tools
Topic: Global environment browser
Replies: 3
Views: 795

Re: Global environment browser

Nice!
by darkfrei
Fri Mar 29, 2024 7:14 pm
Forum: General
Topic: How can I learn Lua and Love2D?
Replies: 4
Views: 584

Re: How can I learn Lua and Love2D?

skullmangor wrote: Thu Mar 28, 2024 12:34 am Tho I have some difficulties guessing where to start, should I start by learning and mastering Lua first?
Lua in 15 minutes:
https://tylerneylon.com/a/learn-lua/
by darkfrei
Fri Mar 29, 2024 6:53 pm
Forum: Games and Creations
Topic: Particle collisions (with cache)
Replies: 4
Views: 5747

Re: Particle collisions (with cache)

麻猫和黄猫 wrote: Thu Mar 28, 2024 4:54 pm hi,i am from china , your game its the only one i can understand in this fourm, its very helpul ,i must say thanks to you
Thanks! I am learning how to code and I've made alot of small programs: https://github.com/darkfrei/love2d-lua-tests
by darkfrei
Sun Mar 24, 2024 11:09 am
Forum: Libraries and Tools
Topic: Parabola functions in Lua
Replies: 10
Views: 88167

Re: Parabola functions in Lua

The parabola is given by focus and directrix. Finding the roots of parabola for given high y: function getFocusParabolaRoots (fx, fy, y) -- focus, horizontal line -- (directrix dirY is global) local h = fx -- x shift local p = -(dirY-fy)/2 -- always negative for voronoi local k = (fy - p) - y -- (fy...