This is a personal project undertaken over the last week at time of writing. Due to the Coronavirus pandemic and doing my best to remain responsible, I have been unable to meet up with a local friend of mine that I frequently play the 1999 Games Workshop table top game 'Mordheim' with. What better opportunity to learn something new than to try to create an online multiplayer version, complete with all rules considered!
This one was (is) a great challenge, and I've learnt a great many things in a very short time. This includes but is not limited to:
⦾ Pathfinding, and how to display an efficient path
⦾ Multiplayer implementation on the network end (Both Unity UNET and Photon 2)
⦾ Multiplayer implementation in game, making sure UI and in game elements can only be interacted with by their respective owners except for targeting etc.
⦾ Stop-locking or efficient turn tracking
⦾ Multiplayer implementation on the network end (Both Unity UNET and Photon 2)
⦾ Multiplayer implementation in game, making sure UI and in game elements can only be interacted with by their respective owners except for targeting etc.
⦾ Stop-locking or efficient turn tracking
Mordheim turns have 4 steps: Recovery, Movement, Shooting and Melee. I have currently implemented the movement phase in full, using the option to sprint (and forgo shooting on that turn) for double movement, or move for regular movement (or not move at all, needed to fire certain weapons). I have defined an equipment list, and made the shooting round check if any units are carrying ranged weapons within their equipment or not, and to skip the turn if none are able. I have also set the UI to correctly reflect the stats of the highlighted unit, and to show a green selection ring around it.
The green ruler showing movement is done by selecting a unit, selecting if you wish to move or sprint and clicking where in the world you wish to go to. This gets a raycast hit of the mouse to world space, plotting a navmesh path from the selected unit to the hit, incrementing through each corner in that path (held in array), and checking how far we've gone plus the current segment length. If the length of this segment puts us over the maximum unit distance (defined by move/sprint stat), draw a straight line from the unit center to the end point. Later, I intend to have the line draw each segment, to better communicate the movement around obstacles.
I will be continuing to work on this in the coming weeks, and will update the page once I get to a testable state.
Also, please enjoy my renowned MSPaint UI skills (function > form till it works!)
⦾ Tools used: Unity, Visual Studio, Photoshop, MSPaint