0 Favourites

Better support for logic flow?

  • Are there any plans for better supporting logic flow in Construct 2?

    I am practicing using the IDE by making a simple tic-tac-toe game, but the lack of first-class support of logic flow makes the event sheet look significantly uglier than necessary.

    When I made a simple tic-tac-toe game in XNA and C#, I created a function to check and see if the current player has won:

            private void CheckForWin(TicTacToePlayer player)

            {

                bool[] row = { true, true, true };

                bool[] col = { true, true, true };

                bool[] diag = { true, true };

                for (int loop1 = 0; loop1 < 3; loop1++)

                   for (int loop2 = 0; loop2 < 3; loop2++)

                        if (grid[loop1,loop2] != player)

                        {

                            row[loop1] = false;

                            col[loop2] = false;

                            if (loop1 == loop2)

                                diag[0] = false;

                            if (loop1 + loop2 == 2)

                                diag[1] = false;

                        }

                if (row.Any(x => x) || col.Any(x => x) || diag.Any(x => x))

                   winner = player;

            }

    Duplicating this kind of logic in the event sheet is painful to look at, and that's just for putting together one of the simplest games known to mankind.

    Yes, this IDE is marketed to non-coders, but having support for basic logic flow in the "action" section of the event sheet would go a long way to making it more useful for puzzle games.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Programs like these tend to make complicated things easy and easy things complicated. In this case you might look into finding or writing a plugin. iirc there are already some "match-3" plugins that should make this pretty straightforward.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
107 11,511
tgraupmann's avatar
tgraupmann
Unread hot topic
82 7,349
Ashley's avatar
Ashley Construct Team Founder
Unread hot topic
78 10,778
Josek5494's avatar
Josek5494