User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 17 of 17

Thread: Test for more than one object overlapping other object

  1. #11
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Think of an Array as a spreadsheet. In MMF2, Arrays can be 2 or 3 dimensional and number or texted based. You want to use a 2D number Based Array. Another thing, they can have either a base 1 or base 0 index. In base 1, the first X and Y values are regarded as 0, when in base 1 they are regarded as 1. In my example, I used a base 1 array. This is important because loop indexes are base 0, so if you run a loop and compare, you will have to add or subtract 1 somewhere in your expression. This may be confusing you so I'll wait till you actually come across these problems before I go on any further.

    Which of the code are you a little lost with?

  2. #12
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    paobrasil's Avatar
    Join Date
    Apr 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    1,146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello again....well, as I never worked with array before....I don't know whats the way use to detect about showing the same number in line, column or group, then mark they with a hover animation that you already created....I just don't know the way to start to do it...I need this because it's a logical part of the sudoku....detect if have the same number in column, line or group, then mark the cell that are showing these same numbers....

  3. #13
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    To efficiently test for duplicate numbers in the same row or column is not that difficult, but it does require a sound understanding in fast loops and the array object.

    May I ask why you are working on a Sudoku game? If you wish to understand arrays and fastlooping, I would recommend an easier project.

  4. #14
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    paobrasil's Avatar
    Join Date
    Apr 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    1,146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, because I'm developing a serious project that will have some little games inside and sudoku game is one of they....so I think I can learn array and fastloops in same time of making a sudoku game....I know that I will need help like you are doing a lot for me....but it's a way to learn, you know. And in same time I'm downloading a lot of tutorials of arrays to study....

    About fastloops I know a little...and array I knew nothing and now seeing several times mfa you sent me, I'm beginning to understand arrays....

    So I think that if I learn how to test for duplicate numbers in the same row then I will know how to do the same in column and group...and so on...

    You are helping me a lot so you can ask whatever you want...

    Thanks you very much again.....

  5. #15
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    paobrasil's Avatar
    Join Date
    Apr 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    1,146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, I just bought MMF2+iOS now! I'm so happy and I will continue estudy arrays and fastloops to make this sudoku in my iOS app project.....thank you again ChrisBurrows...I'm trying to learn how to test for duplicate numbers in the same row, column and group..

  6. #16
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You need to compare the value of each array cell against the value of every other array cell in that row/column/group. You can either do this "always", or only when the user modifies a particular cell, which is much less CPU intensive, but either way you will be running hundreds of loops every frame. There are probably much better ways to check for duplicates, I've never tried to make Sudoku so I'm not sure...

    For instance, adding the numbers in a row/column/group (1+2+3+4+5+6+7+8+9+10), if correct, will always equal 45. But other number combinations can also add up to 45 so this could be a problem, plus you won't know which individual cells contain the duplicates.

    I'm quite busy at the moment, but if I get some time, I'll get something a little more useful to you.

  7. #17
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    paobrasil's Avatar
    Join Date
    Apr 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    1,146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I understood....well....I'm studying now about how to do these compares....thank you very much again!

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Spec Object overlapping Object - do something
    By Tiles in forum File Archive
    Replies: 2
    Last Post: 6th November 2010, 09:10 AM
  2. Object within a qualifier overlapping another?
    By Skeets in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 23rd July 2010, 07:36 PM
  3. Object Overlapping Issue
    By LarkSS in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 13th February 2010, 08:43 PM
  4. [BUG] Overlapping test when player press fire 4
    By Sphax in forum File Archive
    Replies: 11
    Last Post: 18th June 2007, 06:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •