Prep Time Trial system structure. Release Build 8492.
This commit is contained in:
parent
d5d54b250e
commit
64a52d6910
@ -295,6 +295,36 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"value": "None"
|
"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",
|
"name": "Level Type",
|
||||||
"propertyType": "LevelType",
|
"propertyType": "LevelType",
|
||||||
@ -618,6 +648,20 @@
|
|||||||
"tileset"
|
"tileset"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"color": "#fff7ff5d",
|
||||||
|
"drawFill": true,
|
||||||
|
"id": 40,
|
||||||
|
"members": [
|
||||||
|
],
|
||||||
|
"name": "TrialClock",
|
||||||
|
"type": "class",
|
||||||
|
"useAs": [
|
||||||
|
"property",
|
||||||
|
"object",
|
||||||
|
"project"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"color": "#ffa40aa4",
|
"color": "#ffa40aa4",
|
||||||
"drawFill": true,
|
"drawFill": true,
|
||||||
|
|||||||
@ -36,12 +36,15 @@ All rights reserved.
|
|||||||
*/
|
*/
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "Ability.h"
|
#include <vector>
|
||||||
#include "Animation.h"
|
#include <string>
|
||||||
|
#include "DEFINES.h"
|
||||||
|
#include "olcUTIL_DataFile.h"
|
||||||
|
|
||||||
#undef GetClassInfo
|
#undef GetClassInfo
|
||||||
|
|
||||||
//Classes have bit-wise operator capabilities.
|
INCLUDE_DATA
|
||||||
|
|
||||||
enum Class{
|
enum Class{
|
||||||
ANY=0,
|
ANY=0,
|
||||||
WARRIOR=1,
|
WARRIOR=1,
|
||||||
@ -49,5 +52,15 @@ enum Class{
|
|||||||
RANGER=4,
|
RANGER=4,
|
||||||
TRAPPER=8,
|
TRAPPER=8,
|
||||||
WIZARD=16,
|
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;
|
Ability*rightClickAbility;
|
||||||
};
|
};
|
||||||
|
|
||||||
class classutils{
|
namespace 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.
|
|
||||||
};
|
|
||||||
static inline ClassInfo GetClassInfo(std::string className){
|
static inline ClassInfo GetClassInfo(std::string className){
|
||||||
ClassInfo data{
|
ClassInfo data{
|
||||||
DATA.GetProperty(className+".ClassName").GetString(),
|
DATA.GetProperty(className+".ClassName").GetString(),
|
||||||
|
|||||||
@ -44,6 +44,8 @@ All rights reserved.
|
|||||||
#include "DEFINES.h"
|
#include "DEFINES.h"
|
||||||
#include "safemap.h"
|
#include "safemap.h"
|
||||||
#include "ItemMapData.h"
|
#include "ItemMapData.h"
|
||||||
|
#include "Class.h"
|
||||||
|
|
||||||
|
|
||||||
using MapName=std::string;
|
using MapName=std::string;
|
||||||
using namespace olc;
|
using namespace olc;
|
||||||
@ -126,6 +128,7 @@ private:
|
|||||||
std::vector<NPCData>npcs;
|
std::vector<NPCData>npcs;
|
||||||
std::string mapType="";
|
std::string mapType="";
|
||||||
std::string bgmSongName="";
|
std::string bgmSongName="";
|
||||||
|
std::unordered_map<Class,float>devCompletionTrialTime;
|
||||||
BackdropName backdrop="";
|
BackdropName backdrop="";
|
||||||
std::set<std::string>spawns;
|
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.
|
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<ItemMapData>&GetStageLoot()const;
|
||||||
const std::vector<LayerTag>&GetLayers()const;
|
const std::vector<LayerTag>&GetLayers()const;
|
||||||
const std::vector<EnvironmentalAudio>&GetEnvironmentalAudio()const;
|
const std::vector<EnvironmentalAudio>&GetEnvironmentalAudio()const;
|
||||||
|
const float GetDevCompletionTime(Class cl)const;
|
||||||
const MapName&GetMapName()const;
|
const MapName&GetMapName()const;
|
||||||
const std::string_view GetMapDisplayName()const;
|
const std::string_view GetMapDisplayName()const;
|
||||||
std::string FormatLayerData(std::ostream& os, std::vector<LayerTag>tiles);
|
std::string FormatLayerData(std::ostream& os, std::vector<LayerTag>tiles);
|
||||||
@ -464,6 +468,13 @@ class TMXParser{
|
|||||||
parsedMapInfo.bgmSongName=newTag.data["value"];
|
parsedMapInfo.bgmSongName=newTag.data["value"];
|
||||||
}
|
}
|
||||||
} else
|
} 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.tag=="property"&&newTag.data["name"]=="Backdrop") {
|
||||||
if(newTag.data["value"]!="None"){ //None is a default value that we ignore.
|
if(newTag.data["value"]!="None"){ //None is a default value that we ignore.
|
||||||
parsedMapInfo.backdrop=newTag.data["value"];
|
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)
|
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_MAJOR 1
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_PATCH 0
|
#define VERSION_PATCH 0
|
||||||
#define VERSION_BUILD 8476
|
#define VERSION_BUILD 8492
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
|||||||
@ -1,8 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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>
|
<properties>
|
||||||
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
|
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
|
||||||
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
|
<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"/>
|
<property name="Level Type" propertytype="LevelType" value="Dungeon"/>
|
||||||
</properties>
|
</properties>
|
||||||
<tileset firstgid="1" source="../maps/Tilesheet_No_Shadow24x24.tsx"/>
|
<tileset firstgid="1" source="../maps/Tilesheet_No_Shadow24x24.tsx"/>
|
||||||
@ -2009,5 +2012,6 @@
|
|||||||
</properties>
|
</properties>
|
||||||
<point/>
|
<point/>
|
||||||
</object>
|
</object>
|
||||||
|
<object id="180" name="Time Trial Clock" type="TrialClock" x="624" y="4224" width="24" height="24"/>
|
||||||
</objectgroup>
|
</objectgroup>
|
||||||
</map>
|
</map>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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>
|
<properties>
|
||||||
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
|
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
|
||||||
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
|
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
|
||||||
@ -845,5 +845,6 @@
|
|||||||
</properties>
|
</properties>
|
||||||
<point/>
|
<point/>
|
||||||
</object>
|
</object>
|
||||||
|
<object id="82" name="Time Trial Clock" type="TrialClock" x="3648" y="648" width="24" height="24"/>
|
||||||
</objectgroup>
|
</objectgroup>
|
||||||
</map>
|
</map>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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>
|
<properties>
|
||||||
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
|
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
|
||||||
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
|
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
|
||||||
@ -1551,6 +1551,7 @@
|
|||||||
<point/>
|
<point/>
|
||||||
</object>
|
</object>
|
||||||
<object id="95" name="End Zone" type="EndZone" x="1726" y="1681" width="72" height="72"/>
|
<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>
|
||||||
<objectgroup id="7" name="Environmental Sounds">
|
<objectgroup id="7" name="Environmental Sounds">
|
||||||
<object id="30" name="Waterfall Sound" type="AudioEnvironmentalSound" x="4313" y="2678">
|
<object id="30" name="Waterfall Sound" type="AudioEnvironmentalSound" x="4313" y="2678">
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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>
|
<properties>
|
||||||
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
|
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
|
||||||
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
|
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
|
||||||
@ -1154,5 +1154,6 @@
|
|||||||
</properties>
|
</properties>
|
||||||
<point/>
|
<point/>
|
||||||
</object>
|
</object>
|
||||||
|
<object id="107" name="Time Trial Clock" type="TrialClock" x="720" y="3456" width="24" height="24"/>
|
||||||
</objectgroup>
|
</objectgroup>
|
||||||
</map>
|
</map>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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>
|
<properties>
|
||||||
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
|
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
|
||||||
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
|
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
|
||||||
@ -1118,6 +1118,7 @@
|
|||||||
</properties>
|
</properties>
|
||||||
<point/>
|
<point/>
|
||||||
</object>
|
</object>
|
||||||
|
<object id="84" name="Time Trial Clock" type="TrialClock" x="1824" y="408" width="24" height="24"/>
|
||||||
</objectgroup>
|
</objectgroup>
|
||||||
<objectgroup id="7" name="Environmental Sounds">
|
<objectgroup id="7" name="Environmental Sounds">
|
||||||
<object id="24" name="Waterfall Sound" type="AudioEnvironmentalSound" x="3425" y="264">
|
<object id="24" name="Waterfall Sound" type="AudioEnvironmentalSound" x="3425" y="264">
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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>
|
<properties>
|
||||||
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
|
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
|
||||||
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
|
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
|
||||||
@ -893,5 +893,6 @@
|
|||||||
</properties>
|
</properties>
|
||||||
<point/>
|
<point/>
|
||||||
</object>
|
</object>
|
||||||
|
<object id="87" name="Time Trial Clock" type="TrialClock" x="360" y="1488" width="24" height="24"/>
|
||||||
</objectgroup>
|
</objectgroup>
|
||||||
</map>
|
</map>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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>
|
<properties>
|
||||||
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
|
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
|
||||||
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
|
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
|
||||||
@ -796,5 +796,6 @@
|
|||||||
</properties>
|
</properties>
|
||||||
<point/>
|
<point/>
|
||||||
</object>
|
</object>
|
||||||
|
<object id="68" name="Time Trial Clock" type="TrialClock" x="96" y="312" width="24" height="24"/>
|
||||||
</objectgroup>
|
</objectgroup>
|
||||||
</map>
|
</map>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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>
|
<properties>
|
||||||
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
|
<property name="Backdrop" propertytype="Backdrop" value="forest"/>
|
||||||
<property name="Background Music" propertytype="BGM" value="foresty_boss"/>
|
<property name="Background Music" propertytype="BGM" value="foresty_boss"/>
|
||||||
|
|||||||
@ -192,4 +192,9 @@ ItemDatabase
|
|||||||
ItemCategory = Materials
|
ItemCategory = Materials
|
||||||
SellValue = 180
|
SellValue = 180
|
||||||
}
|
}
|
||||||
|
Time Medal
|
||||||
|
{
|
||||||
|
Description = A medal provided to top athletes in Lestoria commemorating a huge victory.
|
||||||
|
ItemCategory = Materials
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
BIN
Adventures in Lestoria/assets/items/Time Medal.png
Normal file
BIN
Adventures in Lestoria/assets/items/Time Medal.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 949 B |
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user