Skip to content

hoanganh1029/AVH.QuestEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

The project builds an API service that will be called by the game to progress a player's quest.

It is developed using ASP.NET Core Web API and Entity Framework Core, following the Clean Architecture approach.

Run Project

This sample uses .NET 8. Make sure you have the SDK 8.0 installed. You can download it here.

Use Visual Studio

  • Open file solution AVH.QuestEngine.sln
  • Set AVH.QuestEngine.WebAPI in folder Presentation as Startup project
  • Press F5

Use command line

  • Open folder AVH.QuestEngine/src/AVH.QuestEngine.WebAPI
  • Open PowerShell window in this folder
  • Run command dotnet run
  • Open url https://localhost:5200

When starting the project, the migration runs automatically to create SQLite database (if not existing) and seed default data.

Alt text

Sequence Diagram

POST: api/progress Alt text

GET: api/state Alt text

Quest Configuration

The file configuration located in here

Quest-Level Properties

  • Id (string) - A unique identifier for the Quest.
  • Code (string) - A short code representing the quest.
  • Name (string) - The full name of the quest.
  • TotalQuestPointsRequired (int) - The total number of points required to complete the quest.
  • RateFromBet (double) - The multiplier applied to a player's bet amount to calculate quest points.
  • LevelBonusRate (double) - The multiplier applied to a player's level to calculate quest points.
  • IsActive (boolean) - Indicates whether the quest is currently active.

Milestone Properties

Each quest consists of multiple milestones, which define progress checkpoints.

  • Index (int) - The sequential order of the milestone.
  • RequiredPoints (int) - The number of quest points required to reach this milestone.
  • ChipsAwarded (int) - The number of chips a player earns upon reaching this milestone.

Player Quest Schema

The player quest progress is saved to table PlayerQuestTurn

Properties

  • PlayerId (Guid) - A unique identifier for the player participating in the quest.
  • QuestId (Guid) - A unique identifier for the quest in which the player is participating.
  • PlayerLevel (int) - The player’s current level which will be passed into your API
  • ChipAmountBet (int) - The amount of chips the player bet during this turn.
  • EarnedPoints (double) - The number of quest points earned by the player in this turn, calculated based on the bet and level.
  • CreatedDate (DateTime) - The timestamp indicating when this turn was recorded

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages