Search found 873 matches
- Sun Apr 18, 2010 2:31 pm
- Forum: Games and Creations
- Topic: p0ng - yet another one
- Replies: 5
- Views: 2679
p0ng - yet another one
What is different in mine? Not much, except: [*] Retro-Look [*] Everything is computer generated, there are no files except lua-source in the .love [*] You can watch the computer play with itself (no, no... you've got a dirty mind) [*] On 'Hard', the computer is impossible to beat. [*] You will get ...
- Thu Apr 15, 2010 8:53 pm
- Forum: Libraries and Tools
- Topic: Splines!
- Replies: 15
- Views: 19252
Re: Splines!
This happens when you set the smoothness (=subdivision depth) too high. This is also why you shouldn't use Bezier:draw(k).
- Thu Apr 15, 2010 7:56 pm
- Forum: Libraries and Tools
- Topic: Splines!
- Replies: 15
- Views: 19252
Splines!
I was really really bored today, so I implemented Bézier curves for LÖVE. If you want to use them in your own projects, you need both bezier.lua and vector.lua. The "api": Bezier.new(points) Creates a new Bézier curve. Points is a table of x,y pairs defining the control polygon of the curv...
- Thu Apr 15, 2010 11:25 am
- Forum: Libraries and Tools
- Topic: Double Origin Graphing
- Replies: 10
- Views: 6026
Re: Double Origin Graphing
That looks really cool!
Never heard of double origin graphs before and a quick google search wasn't very helpful. What are they normally used for? Did you talk about triple origin graphs (then in 3d i think) or even n-origin graphs? Interesting stuff.
Never heard of double origin graphs before and a quick google search wasn't very helpful. What are they normally used for? Did you talk about triple origin graphs (then in 3d i think) or even n-origin graphs? Interesting stuff.
- Mon Apr 12, 2010 10:42 am
- Forum: General
- Topic: Checking for mouse over irregular shapes
- Replies: 17
- Views: 12416
Re: Checking for mouse over irregular shapes
I did not want to step on your toe, but as my religion forbids to think there is a great difference in the two types of fast (I do not believe in cache effects and other such blasphemous notions of actual physical machines): A O(logn) solution is measurably faster than a O(n) solution. Additionally,...
- Sun Apr 11, 2010 10:54 pm
- Forum: General
- Topic: Checking for mouse over irregular shapes
- Replies: 17
- Views: 12416
Re: Checking for mouse over irregular shapes
3.5th solution: Create the grid, but postprocess it using a Quadtree: Start with the whole area as the root node of the tree. Create the nodes recursively: [*] If the depth of recursion is > N (say 6, experiment on that), stop [*] If the node covers only one shapre, stop [*] if the node covers more...
- Sun Apr 11, 2010 9:26 pm
- Forum: General
- Topic: Checking for mouse over irregular shapes
- Replies: 17
- Views: 12416
Re: Checking for mouse over irregular shapes
I think Shape:testPoint will do exactly the same: Test if the point is right of every edge in the polygon. Anyway, for understanding the right-of-test: The cross product of two vectors will return a vector that is orthogonal to the vectors. As this is not possible for two 2D-vectors, you have to &qu...
- Sun Apr 11, 2010 5:30 pm
- Forum: General
- Topic: Checking for mouse over irregular shapes
- Replies: 17
- Views: 12416
Re: Checking for mouse over irregular shapes
This is actually a rather hard problem known as point location . Luckily, there are well known solutions to it. One of them uses trapezoidal maps (look here: http://cgm.cs.mcgill.ca/~athens/cs507/Projects/2002/JukkaKaartinen/ ), which is a rather fast algorithm: With n being the number of edges, you...
- Tue Apr 06, 2010 10:27 am
- Forum: Support and Development
- Topic: Saving Images?
- Replies: 7
- Views: 2971
Re: Saving Images?
or this:
Code: Select all
pixels = ImageData:getString( )
- Tue Apr 06, 2010 10:22 am
- Forum: General
- Topic: LOVE Critical Development Suggestions and Comparision.
- Replies: 7
- Views: 6525
Re: LOVE Critical Development Suggestions and Comparision.
2D Scene Manager - I recommend something dynamic like a loose quadtree implementation What now: Scene Manager (Tool to model logical relationships between objects of a scene) or a QuadTree (Tree where a node can have 0 or 4 children which [usually] divides the space in squares for a number of purpo...