For my game Legions at War, checking moves of each piece was to slow so I cached all the tiles in an array on start. When a piece is moved I update the tiles that, that piece is threatening, then it's as easy as looping through the cache to see if the king was in danger.
legionsatwar
Creator of
Recent community posts
Legions at war is the ultimate sandbox turn-based strategy engine.
You have full control over all settings, the most important one, Board size (current max grid size 26 x 26)
When creating a board setup you can also control the moves per turn(instead of 1 turn as normal chess you can choose up-to 26. Also edit turns each unit has, special abilities, health and damage per unit. Legions at war literally allows you to create millions of chess variations. Do you want to play with pawns that has 2 X health or how about a rook that can move twice per turn? All is possible with the engine.
THE PAWN
Already equipped with the double movement special ability and the en-passant the pawn has been upgraded. The pawn can use it's double movement ability anytime and the en-passant has been upgraded to target all foot soldiers in the LAW engine includes : pawns, soldiers, snipers & grenadors.
THE KNIGHT
In legions at war all the chess units have special abilities. The knight has been upgraded. and is able to transport foot soldiers at a range of 1 as well as stunning nearby opponents for 1 turn.
THE ROOK, BISHOP, QUEEN
The legions at war engine currently has 30 playable units, with modern air units moving at a range of 6. Incorporating chess units that can move at a range of 8 allowed us to upgrade these units with a vacuum loop attachment. Entering the vacuum these units are able to move even further than before. With a tactical weapon load-out the queen can move at a range of 13, but sacrifices the ability to attack. As part of their special abilities they are also able to place vacuum loops across the board allowing other units to teleport or they can use their skills to sabotage a part of the board disabling the tiles for a set number of turns.
These chess units are just the start of the fun as Legions at war also has nuclear weapons, stealth bombers, sam sites any many more. No luck, no dice rolls the only way to win is to outwit your opponent.
Our team is busy with the single player campaign, that will offer extremely challenging turn based challenges and we are planning to release on steam Q4 2018.