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.
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.
The file configuration located in here
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.
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.
The player quest progress is saved to table PlayerQuestTurn
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 APIChipAmountBet(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


