kurosio / Teeworlds-MRPG-0.6

Other
6 stars 10 forks source link

Achievement system (including impl variations) #24

Closed kurosio closed 3 months ago

kurosio commented 4 months ago

Introduce a system of achievements, so far the plans are simple achievements but with gradual improvement up to the bonus from their receipt.

Track events in a single function located in Tick.

Disadvantages: Possible delay in processing events and checking conditions for achievements, especially if there are a lot of events in the game. It is difficult to manage achievement status in a complex system.

Track events at the time of origin.

Disadvantages: May lead to code duplication if multiple events trigger achievement status updates. May cause performance problems if multiple events cause achievements to be updated.

Object-observer monitors changes in the subject-object and performs certain actions when events occur.

Disadvantages: Implementing the Object Observer pattern can increase code complexity, especially if it includes a large number of subjects and observers, which can make it difficult to understand and maintain.

Define callback functions that will be called when certain events occur and register these functions in the achievement system.

Disadvantages: Inconvenience requires adherence to orders of functions

Most of the given realizations do not correspond to the concept (mini mrpg xd games). I don't think that powerful tools are needed for a game that has a minimum of external load (elements used by it)

kurosio commented 4 months ago

Position 1: I'm leaning more towards an implementation of the type Tutorial system

Position 2:


pPlayer->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LEVELING, m_Level);```