RandomDood's Recent Forum Activity

  • I actually got a little off topic from this post title. How would I go about getting an array to reading a bunch of different patterns? Would I have multiple .txt files each with a pattern in it?

    IE.

    file 1

    -111-

    --1--

    -111-

    file 2

    11111

    1----

    111--

    etc.

    Also I am assuming it is possible to offset the pattern check right?

    IE.

    Pattern

    1---1

    11-11

    -111-

    Array with the pattern.

    -------

    -------

    --1---1

    --11-11

    ---111-

  • Awesome. Works perfectly now.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I am not sure if this is a bug or I am doing something wrong, but for some reason copies of objects are being ignored by other objects. Except for the original.

    I whipped up another file to test if it was just my one game file or not Link:

    dropbox.com/s/0lp0mkimov8nn9w/MultiObjTest.cap

    The far left red block is the original while the middle and right ones are copies. Green block is also an original.

  • Cool It works. Now all i need to do is figure out a way to group the objects if they are matching and I'll be done.(mostly) Kind of like:

    scirra.com/forum/picking_topic62950.html

    but updating each block to a group in real time.

    Edit: This is possible right? It would make me feel better knowing I have just be doing something and not something impossible.

    Update: Finally figured out something that works. Its not perfect but at least its something.

    Thanks again for your help.

  • Both of you helped me out a lot. I am actually going to see if I can use both of these. I'm an artist and not very good with programming so R0J0hound's example is a bit easier to understand. But I do have some basic programming knowledge and experience with arrays so I have an idea how I can use arrays to add in a bonus feature I have been thinking about.

    I may have more array questions down the road though.

    Just out of curiosity, does it make a difference when using either an object focused "coding" or an array/programmer focused "coding" in construct 2 and or classic? Is one faster than the other, less errors, less processor heavy, or more optimized?

    Thanks again

  • Thanks to both of you for the help. (And I forgot to thank Bartosh for helping me with a post a long while back so thanks again.)

    Assuming that either of you guys come back. I had questions for you both:

    R0J0hound: I understood your flood fill example up until action #5. I don't understand why the detector doesn't check other sprite separated by the gaps while having a pick all sprite action. Also didn't get how changing the size to 32x16 for horizontal and 16x32 for vertical makes a difference for an overlapping check when the sprite is 32x32.

    Edit: Tried in CC. Unless I did something wrong it wont work. There is no system pick all objects so I tried substituting it with pick by comparison "animationframe" = #

    Bartosh: If I understand your A* example correctly you use a 3d array to store multiple variables for objects in the same space am I correct? So going with the Puyo Puyo example, I am guessing that I would:

    1) Check to see if a color block/blob is moving and if not, search for the array coordinates that correspond to the block's position. Maybe set some PV for the block to stores which array it is representing.

    2) Set array (x,y,Z1) to represent the color of the block,

    3) Run an array loop and check to see if the colors next to it match.

    4) Set array (x,y,Z2) to represent a pseudo var "match"

    And probably a lot of other things I can't think of right now.

    I would say my biggest issue is figuring out how to match individual blocks, group them together without their values bleeding into other groups, and mark specific groups for destruction. The grouping is important because in most games like this, the score bonus is dependent on how many matches of a group of colors you get. So if I get groups of (6 red, 4 blue, 3 red) the score bonus would be something like (x6, x4, x3). -> calculate bonus then destroy each group.

    Thanks again for the help and I think I'll take your advise and post in the C2 forums and transfer my issue back to CC from now on.

  • I am trying to do something like the Puyo Puyo game yes. I originally thought the two where pretty much the same. But Puyo Puyo has a more appealing and dynamic realtime matching system.

  • I found this old thread while looking for a solution to my problem. I'm interested in it but a lot of these old threads are dead and links don't work.

    I curious if anyone has succeeded in doing this. I interested in the matching and linking of multiple colors/slim things more than chain combos, but I assume that goes hand in hand.

  • I am using an Array to create a play field. I want to see if objects on the field are arranged next one another in different patterns that I make. Can I make a .txt file or something like that and have the array read it to see if objects are arranged in that pattern? Is there a better way to do this with or without using an array?

    Bonus question, but not really my focus.(yet) How would I go about being able to check and see if the objects in question are matching either by animation frame or multiple instances of an object?

  • Wow. Thank you for that. I honestly did think that it was a simple problem. I'll give this a shot.

  • Is there a simple way to check to see if any spaces around an object are empty and move to that space; and if they aren't have the two objects swap positions.

    I'm trying to do this on a grid system using an Array and the object themselves have a grid behavior to make movement easier.

  • Is there a way to check to see if all the values in an array are the same in classic?

    Or check to see how many have the same value?

RandomDood's avatar

RandomDood

Member since 29 Jun, 2012

None one is following RandomDood yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies