Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

Dr. Mario

Archive: 5 posts


In my Dr. Mario (tetris like level) I need to check after every pill drops to see if there are 4 pieces or more in a row and then destroy them.

Right now I'm using a grid and after every turn (after a pill drops) I use the scanner I created to check for 4 or 5 pieces in a row and if there are to destroy them. It technically works but there were 2 things I was hoping to improve.

1) It takes about 5-6 seconds right now to check for horizontal and vertical pieces in a row. I have seen some levels which appear to use a similar feature (checks for a certain amount of pieces in a row) and it happens instantaneously (or at least very fast). Does anyone know how to do that without using a ton of logic since my level already includes a lot.

2) I would like to be able to destroy pieces at the same time. Right now if I have 4 in a row horizontally and a vertical 4 in a row that uses the same pill, I destroy only one four in a row instead of both.

Any help would be appreciated.

If you want to see what I have so far the name of the level is Dr. Mario (Beta) by SirTrenton
2012-12-19 20:21:00

Author:
Unknown User


Sounds like you need a method to constantly monitor touching pieces, keeping track of how many others of the same color are touching it. This logic would have to be included on every piece. When a piece detects that it is part of a 4+ in a row, it destroys. I'd have to experiment with logic to work out a solution, but this is a basic description of how I think it needs to be done.

EDIT: I have the logic worked out for you; I can post it here, or if you want, you can join me online.
2012-12-20 04:41:00

Author:
Brannayen
Posts: 438


I'll go ahead and post it here, in case our paths don't cross. You can still join me online if you need further help.

Here is an overview of the logic. It would be placed on each block, or in case of Dr. Mario-type level, on each half.
43358

I'll explain each part of the logic, in sequence.

This first section is simply a tag labeled "green block". Nothing fancy.
43359


This second bit of logic detects if there is a block next to it that is same color. Each tag sensor is set to 45 degrees, and only large enough radius to reach the next block. All 4 tags are labeled "connected".
43360


This logic looks for 4 in a row. Each tag sensor is labeled "connected", and the min and max radius for each is localized for 1, 2 and 3 blocks away, either up or down. If it detects that the 3 blocks above or below are the same, it activates the tag, labeled "4plus vertical".
43361


This does the same as the previous group, but looks left and right. It activates a tag labeled "4plus horizontal".
43362


This logic determines if this block detected 4plus vertical, or if the block above or below it did. The 3rd port on the OR gate is fed by the logic from group 3. The Tag sensors are labeled "4plus vertical", and extend only to the next blocks above or below, respectively.
43363


This group does the same as the previous group, but for the horizontal. The sensors are labeled "4plus horizontal"
43364


The OR gates from 5 and 6 feed the OR gate in this logic. This is where you decide what to do with the block. What I have here is a one shot counter, which conditions the block to be destroyed. The orange tag sensor is labeled "destroy". A very short time after a block finished dropping (say, a .5 timer or such), you can flash an orange "destroy" tag, and it will affect all blocks in that line at once. Sounds, score givers and destroyers would go here.
43365


Here's a close up of all the logic.
43366

Obviously, for multiple colors, you would simply change the colors and names of the tags and sensors.

Let me know if you have any questions.
2012-12-21 02:24:00

Author:
Brannayen
Posts: 438


Hey, thanks for taking the time to help. I understand most of the logic but it seems complex enough I would prefer to work with you in level to make sure it's done right. I'm actually getting jaw surgery tomorrow so i won't be able to do anything for a few days but if you can work after that I would love the help. I'll send you a friend request tonight and will try to message later to see when we both can work.2012-12-21 05:31:00

Author:
Unknown User


Thanks to Brannayen a complete version of Dr. Mario is complete for all of you who were wondering. For those of you who try my level I will gladly try out one of your levels when I get a chance. Just leave a message for me when you review the level.2013-01-25 20:50:00

Author:
Unknown User


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.