S2ENGINE HD 2023
User guide
×
Menu
Index

GameScore

GameScore is a new object class introduced in 2023.
It computes the overall score of the game basing on some given parameters and then manages the display of a score screen on the UI when receiving the message "EGP_SHOW_SCORE_RESULTS".
Following are the gameScore specific parameters:
6.3.8. GameScore
1

kill score multiplier

1. kill score multiplier
<TODO>: Insert description text here...
2

mission score multiplier

2. mission score multiplier
<TODO>: Insert description text here...
3

num total kills

3. num total kills
<TODO>: Insert description text here...
4

num total missions

4. num total missions
<TODO>: Insert description text here...
5

medal cons

5. medal cons
<TODO>: Insert description text here...
6

Medal score tresholds

6. Medal score tresholds
<TODO>: Insert description text here...
 
 

ADDING GAMESCORE
To add a gameScore object in your game level simply choose GameScore class from the Create panel and follow the create from scratch procedure.
The GameScore class object is located into the "Other Objects" page of the Create tool panel
 
 

HOW IT WORKS
The GameScore object accumulates the player score during the game. For now the score is computed basing on 2 parameters:
 
 
To make its computations the GameScore needs to be notified when an enemy is killed or when a mission is completed.
 This can be done sending two messages to the GameScore:
 
These messages can be sent in the usual way:
 
To calculate the total score the GameScore computes the percentage of the number of kills over the total number of enemies and the number of completed missions over the total number of missions.
The total number of enemies and the total number od mission must be specified by hand.
A mission can be completed itself with a percentage (in case it is composed by goals, see missions).
So the mission total score takes into account also the percentage of completion of every single mission.
Once the total kills score and the total missions score is computed the gameScore computes the final score to assign to the player a medal.
The kind of medal is computed basing on 6 tresholds to be defined by hand and it is represented by 6 different icons. See parameters.
 
The GameScore also manages the UI screen showing the score results.
It shows the score screen result sequence when it is notified with the message "EGP_SHOW_SCORE_RESULTS".
As for the inventory, this score screen is composed by active elements that are managed by the gameScore object basing on their names.
6.3.8. GameScore
1

kills_score_progress

1. kills_score_progress
<TODO>: Insert description text here...
2

mission_score_progress

2. mission_score_progress
<TODO>: Insert description text here...
3

kills_score_text

3. kills_score_text
<TODO>: Insert description text here...
4

mission_score_text

4. mission_score_text
<TODO>: Insert description text here...
5

kills_score_total

5. kills_score_total
<TODO>: Insert description text here...
6

mission_score_total

6. mission_score_total
<TODO>: Insert description text here...
7

total_score_text

7. total_score_text
<TODO>: Insert description text here...
8

score_medal_icon

8. score_medal_icon
<TODO>: Insert description text here...