Prep Time Trial system structure. Release Build 8492.

mac-build
sigonasr2 8 months ago
parent d5d54b250e
commit 64a52d6910
  1. 44
      Adventures in Lestoria/Adventures in Lestoria.tiled-project
  2. 21
      Adventures in Lestoria/Class.h
  3. 10
      Adventures in Lestoria/ClassInfo.h
  4. 11
      Adventures in Lestoria/TMXParser.h
  5. 12
      Adventures in Lestoria/TODO.txt
  6. 2
      Adventures in Lestoria/Version.h
  7. 6
      Adventures in Lestoria/assets/Campaigns/1_1_v2.tmx
  8. 3
      Adventures in Lestoria/assets/Campaigns/1_4.tmx
  9. 3
      Adventures in Lestoria/assets/Campaigns/1_5.tmx
  10. 3
      Adventures in Lestoria/assets/Campaigns/1_6.tmx
  11. 3
      Adventures in Lestoria/assets/Campaigns/1_7.tmx
  12. 3
      Adventures in Lestoria/assets/Campaigns/1_8.tmx
  13. 3
      Adventures in Lestoria/assets/Campaigns/1_B1.tmx
  14. 2
      Adventures in Lestoria/assets/Campaigns/Boss_1_v2.tmx
  15. 5
      Adventures in Lestoria/assets/config/items/ItemDatabase.txt
  16. BIN
      Adventures in Lestoria/assets/gamepack.pak
  17. BIN
      Adventures in Lestoria/assets/items/Time Medal.png
  18. BIN
      x64/Release/Adventures in Lestoria.exe

@ -295,6 +295,36 @@
"type": "string",
"value": "None"
},
{
"name": "Dev Completion Time - Ranger (s)",
"type": "float",
"value": 0
},
{
"name": "Dev Completion Time - Thief (s)",
"type": "float",
"value": 0
},
{
"name": "Dev Completion Time - Trapper (s)",
"type": "float",
"value": 0
},
{
"name": "Dev Completion Time - Warrior (s)",
"type": "float",
"value": 0
},
{
"name": "Dev Completion Time - Witch (s)",
"type": "float",
"value": 0
},
{
"name": "Dev Completion Time - Wizard (s)",
"type": "float",
"value": 0
},
{
"name": "Level Type",
"propertyType": "LevelType",
@ -618,6 +648,20 @@
"tileset"
]
},
{
"color": "#fff7ff5d",
"drawFill": true,
"id": 40,
"members": [
],
"name": "TrialClock",
"type": "class",
"useAs": [
"property",
"object",
"project"
]
},
{
"color": "#ffa40aa4",
"drawFill": true,

@ -36,12 +36,15 @@ All rights reserved.
*/
#pragma endregion
#pragma once
#include "Ability.h"
#include "Animation.h"
#include <vector>
#include <string>
#include "DEFINES.h"
#include "olcUTIL_DataFile.h"
#undef GetClassInfo
//Classes have bit-wise operator capabilities.
INCLUDE_DATA
enum Class{
ANY=0,
WARRIOR=1,
@ -49,5 +52,15 @@ enum Class{
RANGER=4,
TRAPPER=8,
WIZARD=16,
WITCH=32
WITCH=32,
};
namespace classutils{//Classes have bit-wise operator capabilities.
static inline Class StringToClass(std::string className){
const std::vector<std::string>&classList=DATA["class_list"].GetValues();
auto it=std::find(classList.begin(),classList.end(),className);
if(it==classList.end())ERR(std::format("WARNING! Class {} does not exist!",className));
int element=int(std::distance(classList.begin(),it));
return Class(1<<element); //Yes...It's bitwise flags, who in god's name knows why I did this.
};
};

@ -54,15 +54,7 @@ struct ClassInfo{
Ability*rightClickAbility;
};
class classutils{
public:
static inline Class StringToClass(std::string className){
const std::vector<std::string>&classList=DATA["class_list"].GetValues();
auto it=std::find(classList.begin(),classList.end(),className);
if(it==classList.end())ERR(std::format("WARNING! Class {} does not exist!",className));
int element=int(std::distance(classList.begin(),it));
return Class(1<<element); //Yes...It's bitwise flags, who in god's name knows why I did this.
};
namespace classutils{
static inline ClassInfo GetClassInfo(std::string className){
ClassInfo data{
DATA.GetProperty(className+".ClassName").GetString(),

@ -44,6 +44,8 @@ All rights reserved.
#include "DEFINES.h"
#include "safemap.h"
#include "ItemMapData.h"
#include "Class.h"
using MapName=std::string;
using namespace olc;
@ -126,6 +128,7 @@ private:
std::vector<NPCData>npcs;
std::string mapType="";
std::string bgmSongName="";
std::unordered_map<Class,float>devCompletionTrialTime;
BackdropName backdrop="";
std::set<std::string>spawns;
std::map<int,SpawnerTag> SpawnerData; //Spawn groups have IDs, mobs associate which spawner they are tied to via this ID.
@ -138,6 +141,7 @@ public:
const std::vector<ItemMapData>&GetStageLoot()const;
const std::vector<LayerTag>&GetLayers()const;
const std::vector<EnvironmentalAudio>&GetEnvironmentalAudio()const;
const float GetDevCompletionTime(Class cl)const;
const MapName&GetMapName()const;
const std::string_view GetMapDisplayName()const;
std::string FormatLayerData(std::ostream& os, std::vector<LayerTag>tiles);
@ -464,6 +468,13 @@ class TMXParser{
parsedMapInfo.bgmSongName=newTag.data["value"];
}
} else
if (newTag.tag=="property"&&newTag.data["name"].starts_with("Dev Completion Time")) {
if(newTag.data.count("value")){ //None is a default value that we ignore.
size_t classStartPos="Dev Completion Time - "s.length();
std::string className=newTag.data["name"].substr(classStartPos,newTag.data["name"].find(' ',classStartPos)-classStartPos);
parsedMapInfo.devCompletionTrialTime[classutils::StringToClass(className)]=newTag.GetFloat("value");
}
} else
if (newTag.tag=="property"&&newTag.data["name"]=="Backdrop") {
if(newTag.data["value"]!="None"){ //None is a default value that we ignore.
parsedMapInfo.backdrop=newTag.data["value"];

@ -1,3 +1,15 @@
Time Trial Idea
Upon completing a stage for the first time, the player is shown the completion time and a record time.
On first clears, the player will always obtain a new record. Make it apparent to the player they obtained a new record.
The overworld map will show a new section that says "Completion Time" for any previous completed stages.
Upon the second time entering a stage, the game will spawn a timer that the player can run into to begin a time trial-like mode.
During the Time Trial mode the player can defeat monsters to freeze the timer by 1 second per mob killed.
Upon completion of a stage in time trial mode if the player beat their previous time (which they likely will) the record will update.
For each class and stage combination there will be a "dev time"
============================================
Make another actions config file for the main build (The app # is different)

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 0
#define VERSION_PATCH 0
#define VERSION_BUILD 8476
#define VERSION_BUILD 8492
#define stringify(a) stringify_(a)
#define stringify_(a) #a

@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="205" height="205" tilewidth="24" tileheight="24" infinite="0" backgroundcolor="#475500" nextlayerid="11" nextobjectid="179">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="205" height="205" tilewidth="24" tileheight="24" infinite="0" backgroundcolor="#475500" nextlayerid="11" nextobjectid="181">
<properties>
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
<property name="Dev Completion Time - Ranger (s)" type="float" value="120"/>
<property name="Dev Completion Time - Warrior (s)" type="float" value="120"/>
<property name="Dev Completion Time - Wizard (s)" type="float" value="120"/>
<property name="Level Type" propertytype="LevelType" value="Dungeon"/>
</properties>
<tileset firstgid="1" source="../maps/Tilesheet_No_Shadow24x24.tsx"/>
@ -2009,5 +2012,6 @@
</properties>
<point/>
</object>
<object id="180" name="Time Trial Clock" type="TrialClock" x="624" y="4224" width="24" height="24"/>
</objectgroup>
</map>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" class="Map" orientation="orthogonal" renderorder="right-down" width="200" height="122" tilewidth="24" tileheight="24" infinite="0" nextlayerid="9" nextobjectid="82">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="200" height="122" tilewidth="24" tileheight="24" infinite="0" nextlayerid="9" nextobjectid="83">
<properties>
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
@ -845,5 +845,6 @@
</properties>
<point/>
</object>
<object id="82" name="Time Trial Clock" type="TrialClock" x="3648" y="648" width="24" height="24"/>
</objectgroup>
</map>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="205" height="250" tilewidth="24" tileheight="24" infinite="0" nextlayerid="8" nextobjectid="97">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="205" height="250" tilewidth="24" tileheight="24" infinite="0" nextlayerid="8" nextobjectid="98">
<properties>
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
@ -1551,6 +1551,7 @@
<point/>
</object>
<object id="95" name="End Zone" type="EndZone" x="1726" y="1681" width="72" height="72"/>
<object id="97" name="Time Trial Clock" type="TrialClock" x="1656" y="5448" width="24" height="24"/>
</objectgroup>
<objectgroup id="7" name="Environmental Sounds">
<object id="30" name="Waterfall Sound" type="AudioEnvironmentalSound" x="4313" y="2678">

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" class="Map" orientation="orthogonal" renderorder="right-down" width="250" height="175" tilewidth="24" tileheight="24" infinite="0" nextlayerid="6" nextobjectid="107">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="250" height="175" tilewidth="24" tileheight="24" infinite="0" nextlayerid="6" nextobjectid="108">
<properties>
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
@ -1154,5 +1154,6 @@
</properties>
<point/>
</object>
<object id="107" name="Time Trial Clock" type="TrialClock" x="720" y="3456" width="24" height="24"/>
</objectgroup>
</map>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" class="Map" orientation="orthogonal" renderorder="right-down" width="229" height="155" tilewidth="24" tileheight="24" infinite="0" nextlayerid="8" nextobjectid="84">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="229" height="155" tilewidth="24" tileheight="24" infinite="0" nextlayerid="8" nextobjectid="85">
<properties>
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
@ -1118,6 +1118,7 @@
</properties>
<point/>
</object>
<object id="84" name="Time Trial Clock" type="TrialClock" x="1824" y="408" width="24" height="24"/>
</objectgroup>
<objectgroup id="7" name="Environmental Sounds">
<object id="24" name="Waterfall Sound" type="AudioEnvironmentalSound" x="3425" y="264">

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" class="Map" orientation="orthogonal" renderorder="right-down" width="250" height="127" tilewidth="24" tileheight="24" infinite="0" nextlayerid="6" nextobjectid="87">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="250" height="127" tilewidth="24" tileheight="24" infinite="0" nextlayerid="6" nextobjectid="88">
<properties>
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
@ -893,5 +893,6 @@
</properties>
<point/>
</object>
<object id="87" name="Time Trial Clock" type="TrialClock" x="360" y="1488" width="24" height="24"/>
</objectgroup>
</map>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" class="Map" orientation="orthogonal" renderorder="right-down" width="148" height="131" tilewidth="24" tileheight="24" infinite="0" nextlayerid="6" nextobjectid="68">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="148" height="131" tilewidth="24" tileheight="24" infinite="0" nextlayerid="6" nextobjectid="69">
<properties>
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
@ -796,5 +796,6 @@
</properties>
<point/>
</object>
<object id="68" name="Time Trial Clock" type="TrialClock" x="96" y="312" width="24" height="24"/>
</objectgroup>
</map>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" class="Map" orientation="orthogonal" renderorder="right-down" width="72" height="80" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="9">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="72" height="80" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="9">
<properties>
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
<property name="Background Music" propertytype="BGM" value="foresty_boss"/>

@ -192,4 +192,9 @@ ItemDatabase
ItemCategory = Materials
SellValue = 180
}
Time Medal
{
Description = A medal provided to top athletes in Lestoria commemorating a huge victory.
ItemCategory = Materials
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 949 B

Loading…
Cancel
Save