10/11/2016
In my code:
if (toggleChasingPlayer) { direction = player.transform.position - transform.position;
// this levels out the bear and prevents it from sinking in the ground.
direction = new Vector3 (direction.x, 0f, direction.z); direction.Normalize (); transform.Translate (direction * bearMoveRate * Time.deltaTime);
//moving towards the player at a certain rate
if (Vector3.Distance (transform.position, player.transform.position) < 1f) { Application.LoadLevel (Application.loadedLevel); }
// if the bear touches player, the player will respawn/ restart the game
} else { direction = targetPosition - transform.position; direction.Normalize ();
Here’s what my bears look like with the current glitch:
Here you see that my bears are now successfully walking to a point, but after that they don’t have another anchor point to move towards, so that’s why they’re vibrating and moving erratically.
This recording was when I changed my code to the ‘MoveTowards’ function:
transform.position = Vector3.MoveTowards (transform.position, direction, bearMoveRate * Time.deltaTime);
before, my code was:
transform.Translate (direction * bearMoveRate * Time.deltaTime);
I don’t have a solution yet for this glitch, but I was encouraged to look past my glitchy bears and develop the rest of the game.
So moving onward… what is the scope of the game?
- One sentence game design concept pitch
- Hot Pockets is a survival game where you have hotdogs to throw at bears while you try and survive the night
- Core design mechanics? Core feature?
- You shoot hotdogs at bears try to survive the night
- Core feature: Implement VR; will be running on cardboard SDK
- Gameplay: get bears to walk idly before it detects the player, throw hotdogs to make bear go away
- ‘safe zone’ of getting to a point in the forest to advance to next level
3. Content progression ‘story arc description’:
- Current content:
- Bears now disappear when hit by hotdog
- Hot dog shooter works
2. Planned expansions/ overview of game:
- Implement VR aspect to the game
<cue intro scene; player gets kicked out into the forest>
I click play. It plays an intro scene. My friends suck! I get kicked out into the forest. I spot the hot dogs in the kitchen and grab them!
(consider knockable over hot dog surfaces)
after you grab the hotdogs, your friends chase you out.
- Level 0- Countdown timer begins, setting: kitchen. Player grabs hotdogs in 15 seconds before transitioning to animation scene where your friends kick you out to the forest.
(transitions to Level 1 after animation scene) - Level 1 – 12AM -2AM
- (bears are idly walking around, sees player then chases)
- scene: dark skies
- Level 2 – 2AM -4 AM
- More bears, differentiate enemyBear type:
- fat bears are slow and jiggly and can roll towards player, introduce tall skinny bear that walks like QWOP towards player;
- scene: still somewhat dark, somewhat like twilight zone
- Level 3 – 4AM -6 AM
- Introduce other types of enemyBear to increase difficulty: Aerial bear
- scene: dawn, brighter sunrise lighting
If you finish Level 3, you win the game because you survived the night
<cue win scene// gets back into house>
I have a long ways to go; just trying to make Level 1 playable before going into any of the other levels and complexity/ enemyBear behavior.
Feel free to reach out to me on twitter, I’m always happy to chat.