Search found 12 matches

by nordbjerg
Sun Jun 16, 2013 10:00 pm
Forum: Support and Development
Topic: Hardon Collider - Identifying objects
Replies: 3
Views: 632

Re: Hardon Collider - Identifying objects

Well, a bit, but I still don't know e.g. what enemy collided with the player, how can I do that?
by nordbjerg
Sat Jun 15, 2013 7:03 pm
Forum: Support and Development
Topic: Hardon Collider - Identifying objects
Replies: 3
Views: 632

Hardon Collider - Identifying objects

Hey! Are there any neat ways to wrap the different collision scenarios into maintanable and extendable code? In C++, for instance, I would probably add a virtual method to a class. How can I achieve this using HC? Basically what I want to do is identify e.g. what enemy is colliding with e.g. the wal...
by nordbjerg
Sat Jun 15, 2013 5:16 pm
Forum: Support and Development
Topic: Changing the brightness of a graphics.draw object?
Replies: 5
Views: 969

Re: Changing the brightness of a graphics.draw object?

Well, you could make a function that convert HSL into RGB.

https://love2d.org/wiki/HSL_color
by nordbjerg
Sat Jun 15, 2013 5:02 pm
Forum: General
Topic: Avatars: OBEY!
Replies: 727
Views: 263844

Re: Avatars: OBEY!

Jasoco wrote:
nordbjerg wrote:Dear Illuminati,

What is this about?

Sincerely,
concerned customer #125914 :roll:
Actually you're number 123330. Not 125914.
Oh, yes. I apologize.
by nordbjerg
Fri Jun 14, 2013 6:11 pm
Forum: General
Topic: Avatars: OBEY!
Replies: 727
Views: 263844

Re: Avatars: OBEY!

Dear Illuminati,

What is this about?

Sincerely,
concerned customer #125914 :roll:
by nordbjerg
Fri Jun 14, 2013 6:09 pm
Forum: Support and Development
Topic: [SOLVED] Check if two arcs occupy the same space
Replies: 5
Views: 921

Re: Check if two arcs occupy the same space

... If this still does not work (rounding errors, maybe) then you can introduce an angular tolerance, which is a maximum overlap that is allowed: function arccollision (mid1, width1, mid2, width2) delta = math.abs( (mid1-mid2+math.pi)%(2*math.pi)-math.pi) if delta <= (width1+width2)/2 - tolerance t...
by nordbjerg
Fri Jun 14, 2013 1:16 pm
Forum: Support and Development
Topic: [SOLVED] Check if two arcs occupy the same space
Replies: 5
Views: 921

Re: Check if two arcs occupy the same space

I added your code and it worked great in any other case than this: p:addSegment(math.pi * 2.5, math.pi / 2, 255, 0, 0) p:addSegment(math.pi * 2, math.pi / 2, 0, 0, 255) p:addSegment(math.pi, math.pi, 0, 255, 0) If I do math.pi / 2.05 it works, otherwise it will not fit. The syntax is pie:addSegment(...
by nordbjerg
Fri Jun 14, 2013 12:53 pm
Forum: Support and Development
Topic: [SOLVED] Check if two arcs occupy the same space
Replies: 5
Views: 921

Re: Check if two arcs occupy the same space

You are dealing with angles here, but it works the same way as with intervals (lines). Let's say you have two intervals (a,b) and (c,d). How do you check if they overlap? It is easier to check if the do not overlap: There are only two cases possible: Either it is b < c or it is a > d. So, if you ha...
by nordbjerg
Thu Jun 13, 2013 11:24 pm
Forum: Support and Development
Topic: [SOLVED] Check if two arcs occupy the same space
Replies: 5
Views: 921

[SOLVED] Check if two arcs occupy the same space

Hey LÖVErs! :neko: I need a way to check if two arcs occupy the same space in a given circle, but I am unsure of how to go about it. The idea is that I can create nodes off of other nodes in my game, with each node having a specific arc / cirlce segment size. Of course, these segments must not occup...
by nordbjerg
Thu Jun 13, 2013 10:13 pm
Forum: Support and Development
Topic: [SOLVED] Pie wedges / Pie slices / Pie segments
Replies: 5
Views: 744

Re: Pie wedges / Pie slices

davisdude wrote:love.graphics.arc.()
They have an example of how to draw pacman! :)
Yes! This is what I was looking for :awesome:

Thank you kindly, sir! :ultrahappy: