In brief: Does somebody out there have advice on how to work out the piece movement of, let’s say, chess? Not bothering with click-detection and the like, but simply “on Keypress, move piece to the square next to it”.
Longer version: For an assignment, I’m trying to reproduce a boardgame in the style of Hitman GO (Btw., highly recommend that one ). These are tasks that I defined as being necessary:
A. Find Engine
B. Create 3D Models in Blender
C. Give the piece (I start with one controllable piece) the ability to “hop” a chess-board-like area.
D. Get “enemies” to wait for their turn, “walk” while detecting wether they can hop forward or have to adjust course (again, like in Hitman GO). During their turn, the player is “blocked”.
E. Get enemies to “watch out”, detecting wether the player is standing somewhere straigt in front of them. (View is blocked if there are obstacles in the way…)
A. Thought Playcanvas would be suitable. 3D, relatively simple (!?) and mobile export looked promising.
B. That’s running on the side, also troubles there, but I will work stuff out.
C. THAT is my current trouble… I first worked with arrays of coordinates, and moving the piece using translate(X,Y,Z) to some “goal”-coordinate. That worked, but it looked pretty unnatural, plus I couldn’t use the physics, if two pieces “met” for example. Felt somewhat overly complicated…
Tried with applyImpulse(). But that would leave me not being able to exactly say where the piece will go, pieces falling over (sometimes, due to friction etc.) and the pieces not knowing their position…
D. I didn’t find a way for the player piece to tell the others “Your turn”. Tried events (That didn’t work), script communication as in the tutorials seems to be restricted to the own entity.
E. Didn’t even bother looking into that yet…
Now, any help (almost…) to any of the points mentioned would be highly appreciated, although C. definitely is my biggest trouble at the moment. Would love to discuss ways with the community, or even team up or the like.
Have a nice day!