Search found 79 matches
- Wed Sep 11, 2013 7:49 am
- Forum: Libraries and Tools
- Topic: Monocle: Monaco-style line of sight engine
- Replies: 33
- Views: 18466
Re: Monocle: Monaco-style line of sight engine
I haven't fixed the bugs, but I pushed a new version with a check on the line that was crashing, so it just stops drawing triangles instead of crashing. I also added a random value between -0.005 and 0.005 to the x and y at every frame. This way, even when there is dropout, it only lasts for a singl...
- Wed Sep 11, 2013 5:37 am
- Forum: Libraries and Tools
- Topic: Monocle: Monaco-style line of sight engine
- Replies: 33
- Views: 18466
Re: Monocle: Monaco-style line of sight engine
Looks great! I'm working hard to figure out where the bugs are, but it's pretty tough at this point. There is still some strange behavior that happens when a projection edge hits an endpoint. As a last resort, I could pre-check for co-linearity among the player, the hanging edges, and all other edge...
- Wed Sep 11, 2013 5:31 am
- Forum: Support and Development
- Topic: pairs() not going throught a table in order ?
- Replies: 6
- Views: 6043
Re: pairs() not going throught a table in order ?
Here is some code from the Lua wiki that shows how to traverse a table in some specified order.
- Tue Sep 10, 2013 4:18 pm
- Forum: Libraries and Tools
- Topic: Monocle: Monaco-style line of sight engine
- Replies: 33
- Views: 18466
Re: Monocle: Monaco-style line of sight engine
Added repo.
How come you don't like canvases? For multiple light sources, I could make it so you can pass which canvas to use. This would allow you to use the same canvas for multiple light sources.
How come you don't like canvases? For multiple light sources, I could make it so you can pass which canvas to use. This would allow you to use the same canvas for multiple light sources.
- Tue Sep 10, 2013 5:43 am
- Forum: Libraries and Tools
- Topic: Monocle: Monaco-style line of sight engine
- Replies: 33
- Views: 18466
Re: Monocle: Monaco-style line of sight engine
I tried implementing my fix for the integer-valued coordinates, but it ended up being more trouble than it's worth, so I just put the rounding logic into the Monocle module. However, I'm still getting random crashes once in a while and am having trouble reproducing it. Attached is the latest version...
- Sat Sep 07, 2013 7:16 pm
- Forum: Libraries and Tools
- Topic: Monocle: Monaco-style line of sight engine
- Replies: 33
- Views: 18466
Re: Monocle: Monaco-style line of sight engine
I think I figured out how to fix this without needing to change the x and y values manually. Basically, the projected ray should ignore edges it hits when the intersection point is the clockwise edge, and when it hits the counterclockwise edge, it should just set that edge as the next instead of spl...
- Fri Sep 06, 2013 4:08 pm
- Forum: Libraries and Tools
- Topic: Monocle: Monaco-style line of sight engine
- Replies: 33
- Views: 18466
Re: Monocle: Monaco-style line of sight engine
I think the crash you're getting is the issue with integer-valued player coordinates. Basically, when the cast rays hit another edge, that edge is split into two. When the point it hits on the edge is an endpoint, it messes up. This is something I can (and will) fix with some additional logic, but a...
- Fri Sep 06, 2013 6:01 am
- Forum: Libraries and Tools
- Topic: Monocle: Monaco-style line of sight engine
- Replies: 33
- Views: 18466
Monocle: Monaco-style line of sight engine
Hi all, Attached is my implementation of Monaco's vector line of sight algorithm, as described here: https://www.facebook.com/notes/monaco/line-of-sight-in-a-tile-based-world/411301481995 The demo doesn't work perfectly, as there is still a bug or two. Specifically, the line of sight will mess up or...
- Tue Jul 23, 2013 7:38 am
- Forum: Support and Development
- Topic: Best practices for organizing inheritance with MiddleClass
- Replies: 5
- Views: 3722
Best practices for organizing inheritance with MiddleClass
Hi all, I'm working on a game that has a bunch of different enemy types. Right now, I have a base class, 'Enemy', and several subclasses, some of which have their own subclasses. Some of the subclasses almost completely overwrite their inherited class functions, and I've started to find myself havin...
- Wed Jul 17, 2013 7:06 am
- Forum: Support and Development
- Topic: Moving objects along complex curves
- Replies: 2
- Views: 1921
Re: Moving objects along complex curves
This will work great. Thanks!