Your code do in fact an intersection of two sorted arrays, ie produces an array with the common values.
intersect([1,2,3,4],[2,4,6])=[2,4]
For me, a matrix is a 2D arrays, and I must admit that I don't know what is a "matrix intersection"
EDIT : Oups, vrld is faster than me
Overllaping matrices
- Ranguna259
- Party member
- Posts: 911
- Joined: Tue Jun 18, 2013 10:58 pm
- Location: I'm right next to you
Re: Overllaping matrices
Oh god yes, once the lib is out I'm gonna ask you for some helpRef wrote:Is this where you are heading?Ranguna259 wrote: BTW, rectangle intersection is not an easy thing to do, that's why there's always a code on most programing languages to do that for you but there isn't one in löve.
Re: Overllaping matrices
What he wants is not just a "matrix" intersection, he wants "world" intersection, where each tile region is represented in a matrix. He wants to find the intersection, given the "position" of the matrices, relative to another.
I think.
I think.
"your actions cause me to infer your ego is the size of three houses" -finley
Re: Overllaping matrices
Guys sorry for the late answer, i'm a seafare worker so sometimes i go on ship and when i come back 1 month or more has passed.
Anyway, thats was a very hot topic i fought it could be and i apreciate all answers. VRLD i dont want an intersection of matrix only to know the numbers of the matrix, think about that, if the matrices has intersection they have number in comon and this mean value so that means a "true" statement so i will know that tha matrix can not go on the place it was intended to go, so roll again for a new place until i found a place for the matrix(room) that is not over any of other rooms on the dungeon level.
By the way this is not one kind of dream idea, i alreade implemented that on unity 3d to make my random generator dungeon level, i was looking for some comand helps because on the c# i can handle 2darrays and that make things easy to do. In love2d/lua was a bit trick found a code to make a 2d array from a normal array( in this case table). Thas way i was looking for some guys seniors then me on lua for help .
Of course i still didnt know how to make this intersection function on lua, if any one Know i will apreciate.
P.S.: i think this topic is very interesting on the comunity, that would help ppl to make procedural levels on their games.
Anyway, thats was a very hot topic i fought it could be and i apreciate all answers. VRLD i dont want an intersection of matrix only to know the numbers of the matrix, think about that, if the matrices has intersection they have number in comon and this mean value so that means a "true" statement so i will know that tha matrix can not go on the place it was intended to go, so roll again for a new place until i found a place for the matrix(room) that is not over any of other rooms on the dungeon level.
By the way this is not one kind of dream idea, i alreade implemented that on unity 3d to make my random generator dungeon level, i was looking for some comand helps because on the c# i can handle 2darrays and that make things easy to do. In love2d/lua was a bit trick found a code to make a 2d array from a normal array( in this case table). Thas way i was looking for some guys seniors then me on lua for help .
Of course i still didnt know how to make this intersection function on lua, if any one Know i will apreciate.
P.S.: i think this topic is very interesting on the comunity, that would help ppl to make procedural levels on their games.
Who is online
Users browsing this forum: Bing [Bot], slime and 2 guests