I’m working on proof of concept for some turn-based physics game. Imagine if you will the PoC; A large cube sits in space, the cube is a rigidbody. Turn time begins to countdown. When the large cube is clicked a small cube becomes x-ray visible. The large cube is no longer selectable, only the small cube. The small cube is dragged around until Turn time is 0. The large cube moves with force relative to the distance of the small cubes and towards its last position for the duration of play time. When play time ends the scene freezes for more input.
Definitions
Turn Time: A static scene time (in seconds) where the player may decide on the actions they wish to take by manipulating the interaction object (turnTime)
Play Time: An active scene time (in seconds) where the player can not interact and observes the results of their choices (playTime)
Large Cube: Player’s character object (forceObject)
Small Cube: The Player’s interaction object (addForceObject)
OPTION: The force can either presist through turns or it can be reset to 0,0,0. I’m not picky, but doing both would make fore fun game options.
I’m not an experienced coder so I have tried to convey my idea is the best generic form of ‘code like’ I can conceive.
forceObject
addForceObject
playTime
turnTime
force
addForce
update
if (turnTime <= 0) { //do (addForce +- force) for new force of object and run play time
else { //get forceObject.location as local (0,0,0) then get addForceObject.location in forceObject's local space
I think I have been doing things the hard way so I am going to ask for help before I waste time with mucked up code.