playMaker

Author Topic: ArrayMaker Tutorials for All! (5th UP!)  (Read 85308 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #90 on: June 04, 2015, 12:24:49 PM »
Do you have any idea when Playmaker 1.8 will be released? Can't wait. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #91 on: June 15, 2015, 08:03:51 AM »
Hi,

 hopefully soon, but I have no idea myself :)

 Bye,

 Jean

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #92 on: June 15, 2015, 08:12:32 AM »
Woo you heard it here first at the best place for array tutorials!

I will also formally announce one more arraymaker tutorial before moving on to a new series!
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #93 on: June 18, 2015, 12:49:19 PM »
hi, i made a scrolling ugui panel for upgrades in my game.
there will be 100+ upgrades Buttons (i think i will use hashtable with gameobject prefabs) but they will only become visible when certain goals have been reached...

what i am looking for is how can i sort them by price (they have a Float with an amount that will be deducted when clicked and a sold image)
and when sold to set those at the back of the list.

i was thinking to prefill my Prefab by price (so from key 0 Cheapest to key 99 most expencive) and use Hash Table Get Next, But i am gonna have a lot of work to adjust if i want to add some new upgrades later on...

i think arraymaker is the right direction but my knowledge is still small on arraymaker, if you could point me in the right direction.... :)
« Last Edit: June 18, 2015, 05:05:51 PM by djaydino »

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #94 on: June 18, 2015, 05:28:52 PM »
i was thinking to prefill my Prefab by price (so from key 0 Cheapest to key 99 most expencive) and use Hash Table Get Next, But i am gonna have a lot of work to adjust if i want to add some new upgrades later on...

Cool, well, how I would manage this is by using arrays instead of hashtables. I added a package that uses arrays to get a float of an object and store it into an array. It then organizes that array from largest float to smallest, and in a new array organize the objects in the order based on the floats that input in the first array. It keeps looping until there are no more objects to grab the floats from.

This is how I would organize the Inventory. Next we need to determine which are sold so that we may remove it from the list. One way is to divide all objects by two tags - sold, sell. Once the player purchases an object, we change its tag to sell so in the original FSM when it goes through the list to organize we add a step in the beginning to place all the sold objects in a separate array for now, do the process of organizing sell by price and reinsert the new array at the bottom of the list.

For the last action, you can use array list copy to and use the start index as the last index used when inputting the sell-able ones in array list get next (current Index + add 1 int)

I'm sure there are different ways to approach this but with this particular one you just need to place all the objects in one parent and let the FSM do the rest. The tedious part is assigning each object to let the player know what they just purchased based on its name. I'm hoping to use the google fu plugin once I am faced with a project like this.

If you have any questions about this, please, let me know! You've been a great help with all these new actions so I hope this can help you out!
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #95 on: June 19, 2015, 12:17:49 PM »
Hi,

 Thanks SebasLive for your input, very valuable.

 indeed, I have sometimes 4 5 arrays on a single GameObject because I have this kind of sorting to do ( doing a game of chess atm, and I want to know each square, where each pieces are, etc etc, and I need a lot of arrays to support all my various ways to access this data relations).

 so indeed, if you create a unique string id for each of your items, you can have for example:

1: hashtable reference each GameObject in relation with their unique Key.
2: Several arrays, listing keys in orders, one array could list them by price, another by name, etc
3: each GameObject MUST have a fsm which will host its unique Key, so that you can access data from anywhere, the GameObject should be able to find itself inthese various arrays.
4: then everytime you have a new item, you can call routines in various fsm to go trhough the hashtable ( containing ALL), and then parse and populate/sort/add/remove keys in various arrayLists.

The other way is DataXml. if you use Xml and xPath, you can sort right within your xpath query, never tried it, but I think it should work, and would be UTTERLY efficient indeed cause you would simply need to maintain this xml and save it in playerprefs to keep your user game status over time.

http://www.developer.com/xml/article.php/1560361/How-to-use-XPath-and-Sorting-in-XML.htm

 Bye,

 Jean

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #96 on: June 19, 2015, 02:47:14 PM »
Hey Jean, awesome tips!

I was wondering what is XML and do I need to code with it? It sounds powerful and I would like to see how to get started on learning this tool.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #97 on: June 19, 2015, 03:46:38 PM »
hi,
Thanks a lot for the help both of you,
and the demo (tested it quick and looks good)

i will get into this as soon as i can (very busy till monday..)

i have not worked yet with xml, but i think i am gonna have to, for multi language.

just a few questions?

i can use Data Maker for xml right?
does xml work on mobile?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #98 on: June 22, 2015, 11:51:08 AM »
hi,

i think i am getting off topic about xml so i have send a post to the datamaker Topic

i have tested using arramaker and got it to work, but with 100+ upgrades i do think it will be a lot less work with xml.

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: ArrayMaker Tutorials for All! (5th UP!)
« Reply #99 on: July 01, 2015, 03:56:23 PM »
This is may be the last Arraymaker tutorial. Easy save 2 is up and ready for your viewing pleasure! You need the easy save asset to use this. Thanks for watching all!
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

flora

  • Playmaker Newbie
  • *
  • Posts: 47
Re: ArrayMaker Tutorials for All! (5th UP!)
« Reply #100 on: July 05, 2015, 09:07:07 AM »
thanks for the 5th tutorial  :)
your array serie has been very helpfull ... you have offered me a complete new world of possibilities .. many thanks to you seb !!! and to you jean for creating arraymaker !!!

happy summer to all

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: ArrayMaker Tutorials for All! (5th UP!)
« Reply #101 on: July 05, 2015, 09:29:46 PM »
Thanks for watching and glad you enjoyed it!
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: ArrayMaker Tutorials for All! (5th UP!)
« Reply #102 on: July 09, 2015, 11:49:29 AM »
Hi,

 yeah, SebasLive series is great, thanks for that!

 Bye,

 Jean

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: ArrayMaker Tutorials for All! (5th UP!)
« Reply #103 on: July 14, 2015, 09:57:06 AM »
Hi SebasLive,

can i ask you what Screen Capture software did you use?

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: ArrayMaker Tutorials for All! (5th UP!)
« Reply #104 on: July 14, 2015, 10:10:39 AM »
I used nvidia GeForce Experience.

http://www.geforce.com/geforce-experience
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez