GATE
MAGE
MATE
PASBAP
BONONO
-- Simon
MAGE
MATE
PASBAP
BONONO
-- Simon
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuoteThe exploder would be assigned to the plain walker, because it is usually better to keep the powerful athlete.
Quoteoffer 1 sec and 1 frame backwards skips, and 1 frame and 10 sec forwards skips.
QuoteQuoteTiming the bombers is a skill lemmings players should have.Alright rant mode activatedNo option!
Quote from: geoo on May 08, 2016, 09:17:38 PM
Input: An ordered list of terrain pieces, optionally with black terrain or no-overwrite flag.
Output: Definitions of composite terrain pieces, and an ordered list of (composite) terrain pieces (free from black or no-overwrite pieces) to be drawn from back to front.
We read the input list in order. At any given time, the current output O is an ordered list of (composite) terrain pieces. Three cases, depending on the next piece T in the input list:
- T is normal terrain: append T to O.
- T is no-overwrite terrain: prepend T to O. (Note: This works because O contains no black/no-overwrite pieces.)
- T is black terrain: Initially, define S as the set of tiles in O that T overlaps.
While there exists a tile T' in O\S such that there are tiles F and B in S with F overlapping T' and T' overlapping B, add T' to S.While there exists a sequence of tiles T1 -> T2 -> ... -> Tn in O\S such that there are tiles F and B in S with F -> T1 and Tn -> B, add T1, ..., Tn to S. Here -> denotes the overlapping relation. Group the tiles in S into a new tile N,and remove S and T from O. Let F be the tile with the lowest index overlapping N, and let B the tile with the highest index that is overlapped by N. Add N to O somewhere between B and F.(The following is Nepster's idea, with a slight fix:) Define a set S+ of all terrain pieces of O\S that are reachable via -> from S (i.e. via a sequence for forward edges). Then reindex them starting from max(S), while keeping their order. Put N in the list right before S+, and delete T and S from O.
Implementation notes:
- If we want to allow composing steel and normal tiles, you'll have to remember the mask of each composite tile with bits for solidity and steel.
- If a level does not contain no-overwrite pieces, no conversion is necessary.
- Multiple consecutive black pieces can be processed in step, resulting in only one grouping. Black pieces that are not overlapped by anything else can just be added to the end of the list without grouping.
- While processing terrain pieces, you could maintain a directed graph modeling the overlap relation within O. As a new piece is added to O, the graph needs to be updated. When a grouped tile is added (and thus some pieces deleted from O), I think the edges pointing to the new tile can be inferred from the edges belonging to the deleted vertices.
Quote from: Minim on May 10, 2016, 05:35:29 AM
my number of posts is almost equal to that to Simon's, I'm thinking of doing a comparison of activity over the years between the two.