playMaker

Author Topic: An in depth approach on stats.  (Read 2789 times)

Karin

  • Playmaker Newbie
  • *
  • Posts: 18
An in depth approach on stats.
« on: August 13, 2020, 10:37:55 AM »
Hello Everyone

I'm curious if the topic of stats and levelling has actually been discussed on this forum. The construct seems simple enough to me, my approach would be to set an array proxy list of set integers an assign them to additional checks linked to the global variable. Levelling the character is the part I'm unsure of.

I would be very interested how others would approach this system.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: An in depth approach on stats.
« Reply #1 on: August 14, 2020, 06:48:57 PM »
Hi.
Maybe this video can help.
(the video is not public yet as the sample is not yet on the asset store package, and the update got declined and i need to make some new images for the store page)


Karin

  • Playmaker Newbie
  • *
  • Posts: 18
Re: An in depth approach on stats.
« Reply #2 on: August 14, 2020, 08:32:39 PM »
I see you're using XML combined with hash table. I'm not familiar with XML but from what I know it's some kind of external stored cache data? The source when you look at it is like HTML. Your approach is very impressive. I think it's best I get a better handle of XML assuming it's essential. This was a lot to take in.

Thanks for the showcase.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: An in depth approach on stats.
« Reply #3 on: August 15, 2020, 03:01:59 AM »
Hi.
I Mainly use xml to make a list as it is a lot easier to manage than doing this directly in arrays/hashtables.

You could actually load/save changes directly in the xml.
But doing that is slow, and depending on your game you might not want the have delay on this.

I use Xml on our current project for weapon/item data as well.

Karin

  • Playmaker Newbie
  • *
  • Posts: 18
Re: An in depth approach on stats.
« Reply #4 on: August 16, 2020, 06:51:32 AM »
Hi.
I Mainly use xml to make a list as it is a lot easier to manage than doing this directly in arrays/hashtables.

You could actually load/save changes directly in the xml.
But doing that is slow, and depending on your game you might not want the have delay on this.

I use Xml on our current project for weapon/item data as well.

What's your opinion on the base playmaker Arrays and the Proxy array maker. Is there even any use for the Playmaker array types?

Also lets say I wanted combine the use of Array proxy and hash tables. Would there be a conflict in the index?

From what I've seen, hash tables appear to be way more flexible than a fixed array type.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: An in depth approach on stats.
« Reply #5 on: August 17, 2020, 05:55:13 AM »
Hi.
For Hash tables you can not rely on index.
It can be different every time.
For hash tables you need to use the keys (name)

Both have Array and Hash Table has it use cases.

Also Something good to know is that you can have multiple variable types in the array/hash tables

Also the build in i still use for simple things

Karin

  • Playmaker Newbie
  • *
  • Posts: 18
Re: An in depth approach on stats.
« Reply #6 on: August 18, 2020, 06:37:55 AM »
Hello

Let me give you an example of a scenario.

I have two array proxies assigned each to different game objects, one of them is empty and another holds a variable. Is it possible to move one variable to another array proxy?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: An in depth approach on stats.
« Reply #7 on: August 18, 2020, 10:32:32 AM »
hi.
you can just remove from 1 array and add to the other.

There is also a Concat to 'merge'

Karin

  • Playmaker Newbie
  • *
  • Posts: 18
Re: An in depth approach on stats.
« Reply #8 on: August 18, 2020, 11:25:27 AM »
hi.
you can just remove from 1 array and add to the other.

There is also a Concat to 'merge'

That's the method I'm familiar with. However, the Concat is something I will look into. So I take it there's no specific way to move the existing Variable to a new proxy. Personally I think there is but it's complicated.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: An in depth approach on stats.
« Reply #9 on: August 18, 2020, 05:12:55 PM »
Quote
So I take it there's no specific way to move the existing Variable to a new proxy. Personally I think there is but it's complicated.

I am not sure what you mean.

Karin

  • Playmaker Newbie
  • *
  • Posts: 18
Re: An in depth approach on stats.
« Reply #10 on: August 19, 2020, 08:28:31 AM »
Hello

If you have 2 different proxy arrays that are put on 2 different game objects, you can't move the variable from one proxy to another. There's probably a reason why its done this way.