Apr 21

Web playable version

I’m still doing basic stuff such as player control and camera control. I hope I can start going forward with the game logic next week and add another level. I’m rearranging internal scripts atm, so FPS mode is not working in this version.

  • Fixed a bug with player graphics direction when switching between different modes.
  • Mecanim: Followed the tutorial at http://video.unity3d.com/video/7362044/unity-40-mecanim-animation-tutorial. It’s quite nice, the way you can blend animations. Notice how if you wave and run (shift) or run+jump simultaneously it will still wave.
  • Added a little animation when picking up objects. Can’t seem to get the arms animation to stop though. Could be a pro feature.
  • Wave on key R.
  • Lerping the camera zoom in third person mode, to have a smoother movement.

 

So my TODO list is currently looking like this, but the bottom one will have a low priority and probably some new higher ones will be added next week.

  1. Raycast: Shoot it straight down from head and 1m out.
  2. Raycast: When in FPS mode, it should shoot from camera/head and in the looking direction. Cross in the middle?
  3. Show Inventory.
  4. Level clear: When reaching the goal, show some congratulations and move on to next level.
  5. Carry objects: Carry the object above the head? Carry it straight out like now, but with physics so it blocks (harder to fix).
  6. Skyboxes: Different skyboxes for different worlds to set the mood.
  7. Third person camera: Needs to handle objects in the way in between player and camera. Either move camera closer to player or make objects in between transparent.
  8. Virtual Joystick: For touch devices, a virtual joystick should be used in fps mode.
  9. Splitscreen touch device: 2-player split screen should have a 180 degrees rotation for second player for ultimate play on touch pad.

 


Apr 14

Playable Web version
Changes:

  • Changed usage of UsableObjects to always have trigger area the player must stand in, and then player must look at the object to use it. Look to use is done with a Raycast on Usable layer.
  • Added a Pickable layer for picking up objects. This raycast is done every frame. If it is too expensive, I’ll set the raycast at 5fps.
  • New key for using objects and picking up/dropping objects: E
  • Added a shadow on the player using a Projector in orthographic mode. Or should the shadow get larger when jumping (perspective mode)? Also added fake projector shadows on platforms.
  • Sound played when picking up key and opening door.

The carrying of objects is not the best at the moment. Just lift up the object in the air and parent it to the player with physics off. This has some unwanted (?) sideeffects of moving that object through the wall. Also it will get stuck on the movable platform. Also… it is visually in the way. Perhaps it could be semi-transparent.

The raycast is casting its ray from the head diagonally down. This might miss small objects, so not sure if I should cast it from the head and 1m out to straight down to the ground instead. I think it might work better. The raycast for picking objects has same problem, casting it from the feet and straight out 1m. Will miss stuff that is not on the ground. Will experiment with this next week.

 

This is the TODO list:

  1. Carry objects: Carry the object above the head? Carry it straight out like now, but with physics so it blocks (harder to fix?).
  2. Raycast: Shoot it straight down from head and 1m out.
  3. Raycast: When in FPS mode, it should shoot from camera/head and in the looking direction. Cross in the middle?
  4. Level clear: When reaching the goal, show some congratulations and move on to next level.
  5. Skyboxes: I want different skyboxes for different worlds to set the mood.
  6. Third person camera: Needs to handle objects in the way in between player and camera. Either move camera closer to player or make objects in between transparent.
  7. Mecanim: The Mecanim system will be used for animating instead, as it is much more versatile. One mecanim animation should be usable on all models. Speed should match player speed, so it won’t look like the player is floating.
  8. Virtual Joystick: For touch devices, a virtual joystick should be used in fps mode.
  9. Splitscreen touch device: 2-player split screen should have a 180 degrees rotation for second player for ultimate play on touch pad.

Apr 6

Controls are still the same as in week 2, but also the 4 key will do topdown camera mode and free control mode.

Changes from week 2:

  • Switched back to default model, so the jump animation is visible.
  • Added support for multiplayer splitscreen.
  • NGUI ui for usable objects. Try the door.
  • Changed skybox to something with a ground.
  • Switched terrain for a simpler level.
  • Start menu with settings (multiplayer splitscreen)
  • Dying takes you back to your spawn point.
  • Running with shift-key.

I do not have a second level yet, so clearing this level won’t take you to the next one. This will be implemented next week.

Currently my UsableObjects must have a box trigger collider for getting player to know if it is usable. I’ve been thinking that maybe I should use RayCast from the player and a small distance forward to get the usable objects instead. This would simplify creating usable objects, but might be unnecessary CPU work. I will try this out when I get my OUYA.

Playable web version (Requires Unity3D Web Player)

Screen Shot 2013-04-06 at 17.42.09


Mar 31

* Got the jump animation to work for default character. But I switched model just for fun. I could not use old animations on new model, so I’ll have to check out the mecanim system some more.
* Point/Click control mode now works.
* Updated the WaypointsMover. Now can pause at each waypoint.
* Added a UsableObject class, which I use on the door. Go near the door and items missing to use the door will show at the top. Will you be able to open the door? :)

u,i,o,p: Changes camera mode.
j,k,l: Changed control mode.
1,2,3: A mix of control+camera mode, like it will be in the final game.

Next weeks focus will be on adding a gui with ngui. Also I will probably not use a terrain, but simpler objects and perhaps use a toon shader.

Web version of the project. (Requires Unity3D Web Player)


Mar 19

Player controller.
1,2,3 switches control mode.
1: FPS style. asdw/arrows for movement and mouse for looking.
2: Third person view. asdw/arrows for movement and looking.
3: Top down view. Same as above.
2,3: Raisable camera with mouse scroll wheel.

Switch pad with button. Walk on it to trigger the movable platform. Alternatively push the box onto it, so you can jump up on the platform. The movement script for the platform is … bad. Too be continued.

Web version of the project. (Requires Unity3D Web Player)