playMaker

Author Topic: How build a matrix type game with Playmaker  (Read 1985 times)

Fabrice

  • Playmaker Newbie
  • *
  • Posts: 2
How build a matrix type game with Playmaker
« on: March 22, 2017, 04:37:42 AM »
Hi,

I'm a newbie with playmaker, i have some questions about this.
I'm a developer and now a Unity developer but i'm very interesting on playmaker productivity.

My question is simple.
I want to generate a matrix which contains x by y object where each object contains different information. The player can change information by clicking the object.
I must check all matrix object to check if the result agree the main goal.
The information to be checked can be horizontally or vertically.
I have already done a prototype with C# Unity, but i'd like to make it with playmaker, arraymaker ...

My C# program uses multiple dimension array and array list.

How make an 2D array ?
I have some difficulties to translate my need in playmaker environment.

Thansk for you help

Fab

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How build a matrix type game with Playmaker
« Reply #1 on: March 23, 2017, 02:28:50 AM »
Hi,

 2D array is not supported as is within ArrayMaker, so yes that concept will need to be adjusted within PlayMaker, OR you write your own proxy for 2d arrays.

 with just ArrayMaker, you'll have to construct your 2d array manually using individual arrays properly referenced.

 so a 3*4 2d array would have 3 GameObject, each with an ArrayList proxy

and then to get to index [x,y] you navigate the gameobject  and pull the data from the array of on the child, x is about getting a GameObject, y gets the index inside the arrayList.

 Does that make sense?

Bye,

 Jean

Fabrice

  • Playmaker Newbie
  • *
  • Posts: 2
Re: How build a matrix type game with Playmaker
« Reply #2 on: March 23, 2017, 05:19:10 AM »
Hi Jean,

Thanks for you response.
I understand the method and why i did'nt find a solution myself :)
I think i'll mix native C# existing code and playmaker for the rest of my need.

Fab

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How build a matrix type game with Playmaker
« Reply #3 on: March 24, 2017, 02:43:49 AM »
Hi,

 yes, this is what's going to give you the most powerful and flexible result for sure. I always use PlayMaker as the brain, making decisions and wiring everything, and I create components that bridges features and assets together, with the appropriate actions so that the control remains fully inside PlayMaker Fsm Logic.

Unbeatable combo if you ask me. I have delivered projects in a fraction of the production time then if I had to do it in pur c#, so much better overview of the whole logic then pur c#, both during dev and at runtime.

 Bye,

 Jean