Quantcast
Channel: General - Epic Developer Community Forums
Viewing all articles
Browse latest Browse all 7390

Persistent Player Statistics: Questions and Thoughtful Feedback

$
0
0

Just wanted to start out saying that all the additional effort into the documentation is much appreciated, and the recent live stream was a great way to connect w/ developers/creators. Although this is critical in nature, I offer this feedback in good faith, and believe in the potential of the team. :pray:

Player Statistics Tutorial: Questions & Feedback:

Summary: I have found the documentation for the Player Statistics tutorial to be convoluted and potentially misguided for a couple of reasons which I will go over in detail below.

Key Areas of Confusion: Justification of why code its being written in this manner doesn’t check out for me, even after multiple reviews.

Format: I have some general feedback in areas I feel more certain on, and questions in others. Ill be weaving between them and keeping things sequential:

Starting from the top, we a few key term and a very general explanation making an arguably fair assumption, but an assumption none the less:

I think some areas to be included up to this point would be:

  • There are other pages that cover ways to use persistent data (with links), and this is an expansions on base knowledge that you will benefit from starting with in order to understand the contents of this tutorial

  • Wrapping the data together in a class isn’t required to associate it in verse inherently. Since the constructor isn’t actually persistent and we have to use unique names with persistence that we reference (and who’s namespace is retained between sessions) whenever reconstructing (aka updating) the class.

  • An example of a real world scenario you’d use this in. (BR Victories in FN, Goals in RL/Races in RR, etc. There’s not a single thing more relatable in UEFN, than Fortnite. This carries across to code examples currently containing dogs and cats… wherever there’s an opportunity to use direct Fortnite examples, take that route. :white_check_mark:)

  • What I’d suggest as an alternative:
    • I’d begin with an example of a normal int value update, and lead into handling intrinsically tied values before jumping straight into a nested constructor. I’d also highlight it isn’t required, but can be an effective way to encapsulate the association in the persistent data itself.
    • Immediately wrapping the class and nesting the constructor for partial updates, before writing a partial update and understanding why had me lose my bearing almost immediately.

Key Takeaway: A clear understanding surrounding the ‘why’ would go a long way.

Argument:
You don’t necessarily have to change the way that the tutorials currently organized and presented, however without linking to the other documentation or providing more insight into the decision making process, it seems to lack essential context.

Reasoning:
It includes advanced concepts in tandem with a novel/unique data storage type that up until this point was rarely (if ever) used. This can create confusion as to what is being done out of necessity and what’s simply “one of many” ways to approach things.

In the exercise, what is the purpose of creating the StatType module and the score_stats w/ Debug Strings?

I noticed these classes aren’t ever referenced in persistence data, nor is the module included in a session based weakmap:

An the only perceivable way to me that these classes are associated is only through the partial constructor function:

If a lesson isn’t directly optimizing or solving a problem, it lacks a practical application. This approach left me feeling unsure about how things worked, leading to a lot of extra time spent refining the information into a more straightforward process.

Introducing concepts purely for their own sake starts to clash with the higher levels of tutorials, as the way we approach coding, logic, and problem-solving becomes more complex and rooted in reason.

I’m uncertain about whether or not I have an inaccurate understanding of what happens when adding persistence to my map, and would like some clarification on the following:

Quote from code comments:

?: Are all enums final from that point on, even outside of permissible classes?

Others I’ve consulted weren’t aware of this as an issue, which has been a major source of confusion for me. Clarity here is requests, and unless new light is shined upon the justification for the Debug String to make it relevant here, I would consider removing it to simplify the already complex process.

Suggested Solutions:

Assumptions:

  • StatType module isn’t part of the persistent data
  • Enum is an acceptable data format as long as its only referenced outside of persistent classes

A more effective strategy may be to define stat_type as an enum within the same module, which would simplify the implementation and allow for more dynamic applications. Additionally, creating a single enum along with a “ToString” function could potentially be less memory-intensive, eliminating the need for an abstract parent class or any class implementation. Even though any memory savings might be negligible at this scale, it’s still worth considering for overall efficiency.

  • For the purpose of comparison in partial updates you can use case instead of if’s, and for the multifunctional desire to have a string ToString adds the addition of auto resolving.

  • In the case that we really need to avoid enum, I would also address the potential of simply including a string within the wrapper itself. While this is likely not an adequate solution, and would result in a debug identifier exceeding the memory cost of the class it exists to identify, addressing that when presenting an alternative would be a healthy pairing.

I’m very open to the possibility that I’ve missed something fundamental here, and am merely suggesting these points in hopes of receiving clarification. I hope this provides insightful and useful feedback.
Cheers.
-Lion

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 7390

Trending Articles