This is a changelog, as well as a future goal list. Started June 05 (2020).
This is a roguelite deckbuilder with a twist! It's played on a gameboard with the extra dimension of movement.
World Generation System
Card System
Combat System
Currency and Shop System
Player System
Random Event System
Inventory System
Main changes - Partially implemented random event consequence behaviour
Combat System
Random Event System
Next:
Implementation of Item Effects
Difficulty Escalation subsystem
More cards
The Madness Subsystem
Main changes - Bugfix, Movement/attack confinement ,visual effects for action/turns
Combat System
Changed all attack and movement to cross based, or circular (radius R) drawing tiles with altered algorithm for drawing a circular area. This is applied equally to players and enemies.
public void DrawCircleOverlay(int type, int range){
...
if(new Vector2(i,j).magnitude <= range){ //circle drawing, range = radius
overlayTileMap[i + (int)overlayOrigin.position.x, j + (int)overlayOrigin.position.y].SetStatus(type);
}
...
}
Added Turn Effect Renderer - Flexible backend for drawing sprite swappable effects on top of gameplay pieces:
public void Draw...Effect(Transform parent){ //-extend to EffectType for spriteswap
Instantiate(effect, parent);
}
Random Event System
-Graphical Improvements'
Next:
Complete card sprite refitting -> New paradigm: Set the rarity in the SO as a character, and then when drawing, refer to the Adamant.CardManager sprite arrays using a switch statement found in the CardInstance.CardDisplay
Card system
WorldGen System
Added difficulty scaling and enemy queuing via resource random paradigm:
float resources = 3.5f*Mathf.Log(level+1)+1;
print("resources = " + resources);
Queue<Enemy> enemyQueue = new Queue<Enemy>();
while(resources>=1){ //greater than the cost of the cheapest enemy
Enemy testEnemy = enemies[Random.Range(0,enemies.Length)];
if(testEnemy.resCost <= resources){
enemyQueue.Enqueue(testEnemy);
resources-=testEnemy.resCost;
numEnemies++;
}
}
Content
Next:
Trap System [New!]
Next
Trap System
Spiketrap fully implemented with appropriate damage and animation cycling from idle -> warn (with warning UI icon) -> activate using animation triggers:
if (turnCount%chargeFreq == 0){
transform.GetChild(0).gameObject.SetActive(false);
a.SetTrigger("triggerTrap");
//trap triggered - Detect Collision
Collider2D [] hitObjects = Physics2D.OverlapCircleAll(transform.position, 0.5f);
foreach (Collider2D c in hitObjects){
if(c.tag == "Enemy"){
c.GetComponent<EnemyInstanceManager>().TakeDamage(trapDamage);
}
else if (c.tag == "Player"){
GameManager.g.gameObject.GetComponent<PlayerStats>().TakeDamage(trapDamage);
}
}
Combat System
Bug
Many more cards than usual spawn with a loamwalker and slughoul on the board, both stacking on the bomb causing bombcontroller to malfunction ; not sure how to reproduce
Next
Combat System
Added variable hitmarker effects and new parameter (char type) to spawn specific effects, by spawning a generic hiteffect gO and setting the animation, similar to enemy:
Modified turn processing order to Coroutine based and sequential
public IEnumerator TurnParseSequence(){
yield return StartCoroutine(enemyManager.EnemyMove());
yield return StartCoroutine(TriggerProps());
InitializeTurn();
}
Card System
Worldgen System
d36 Dungeon Display
----- KEY -----
. = empty B = bomb
E = enemy P = player
R = rock T = trap
X = exit
----- Turn #0 -----
. . . . . .
. . . . . R
R X . E R .
R . . . . R
. P R . R .
. T . . R .
Other
Added Cheats:
Card System
Added Card Art:
Combat System
hpFill.localPosition = Vector3.Lerp(new Vector3(-0.4402f, 0.03f, 0),Vector3.zero+0.03f*Vector3.up,hp/mhp);
hpFill.transform.localScale = Vector3.Lerp(new Vector3(0,1,1),Vector3.one,hp/mhp);
Worldgen System
Card System
Next
Graphics
Combat System
Other
New CustomParticleSystem component → Architecture to generate custom particles with a simpler system
Thought → How to generate enemy differentiation? More vectors than Health, AttackRange, Damage, MoveRange
Next
Player System
Enemy System
Graphics
Combat System
Azorites have new attack - Firecross - Spikes of fire instantiated in a squared cross around the enemy with custom range
Instantiate(azorFireSpike, new Vector3(pos.x+i, pos.y+j,0), Quaternion.identity);
azorFireSpike.GetComponent<CustomAttackEffector>().setDamage(dmg);
Other
Ctrl+Shift+I
- to VSCode ExtensionsMajor Change
Setup two transformation utility functions of ISOtoXY and XYtoISO in the boardmanager script:
public Vector3 IsoToXY(Vector3 v){
return new Vector3(0.5f*v.x - v.y, 0.5f*v.x + v.y, 0);
}
public Vector3 XYToIso(Vector3 v){
return new Vector3(v.x + v.y, 0.5f*(v.y-v.x), 0);
}
Bugfixes
Sorted out several problems with Isometric system overhaul
Graphics
Graphics
Next:
Enemy code architecture should be restructured to use inheritance and OOP principles
PUSHED TO REPO
Enemies
BFS pathfinding is implemented for enemy movement:
For now - move to a random adjacent unoccupied position
try //throws keynotfound exception if the path is blocked/impossible
{
while (currentStep != initialPos)
{
path.Add(currentStep);
currentStep = cameFrom[currentStep];
}
path.Remove(boardManager.IsoToXY(target.position));//to prevent going on the player
path.Reverse();
}
catch
{
// if the path is impossible, go in a random valid direction
print("no valid path");
Vector3[] adjacents = { initialPos + Vector3.left, initialPos + Vector3.up, initialPos + Vector3.right, initialPos + Vector3.down };
List<Vector3> validAdjacents = new List<Vector3>();
foreach (Vector3 v in adjacents)
{
if (boardManager.isValidAndEmptyPosition(v))
{
validAdjacents.Add(v);
}
}
//if there are no valid adjacent paths
if (validAdjacents.Count == 0)
{
path.Add(Vector3.zero);
}
//if there are valid adjacent paths, add a random position to one.
else{
path.Add(validAdjacents[Random.Range(0, validAdjacents.Count)]);
}
}
Refactored status effect parsing, now uses strings rather than an array of switches - This way, multiple instances of "bleed" can be passed, one is thrown out and processed each round.
private int ParseStatus()
{
// List<string> tempStatusEffects = statusEffects;
if (statusEffects.Count > 0)
{
statusImage.SetActive(true);
}
else
{
statusImage.SetActive(false);
}
//could nest this
if (statusEffects.Contains("bleed"))
{
statusEffects.Remove("bleed");
TakeStatusDamage(1, 'k');
}
return 0;
}
Added Engineer Enemy
Bugs
Cards
Cards
Scene reloading issue is resolved
Enemy
Other
Cards
Player System
Cheats
Altered cardspawning + key indicator for input reception + array of inputs
if (Input.GetKeyDown(KeyCode.Keypad7)){
GameManager.g.gameObject.GetComponent<CardManager>().AppendCardToHand(cardsToAdd[0]);
}
if (Input.GetKeyDown(KeyCode.Keypad8)){
GameManager.g.gameObject.GetComponent<CardManager>().AppendCardToHand(cardsToAdd[1]);
}
if (Input.GetKeyDown(KeyCode.Keypad9)){
GameManager.g.gameObject.GetComponent<CardManager>().AppendCardToHand(cardsToAdd[2]);
}
Other
World Generation
Setup new TileInstance.cs script for all map tiles - handles tile swapping with the SwapTile method, which exchanges gameobjects from normal - trap - blight tiles, initializes them (sets parent and inserts in tilemap array BMgr) and sets correct positioning
public void SwapTile(string swaptype)
{
GameObject instance = gameObject;
switch (swaptype)
{
case "blight":
instance = Instantiate(boardManager.customTileEffectPrefabs[0], transform.position, Quaternion.identity);
// boardManager.InitializeTileExternal(instance , boardManager.IsoToXY(transform.position)); //perhaps a more complex function to add to the tilearray?
break;
case "normal":
instance = Instantiate(boardManager.floorTiles[0], transform.position, Quaternion.identity);
break;
}
boardManager.InitializeTileExternal(instance, boardManager.IsoToXY(transform.position));
Destroy(gameObject);//purge itself from the scene
}
Bugs
Cheats