Monday, 16 December 2013

Toggling view mode

To enable the player to change his view type during the game, all we need is get a key press:

Getting camera change input

In the node's properties, you can set which key will perform the input by changing its Input Name. On the console command, I used the command 'behindview' to set the third person mode. Then just link a player object to both nodes and voila, when the player press the V key (my chosen input) the camera mode will be change in game.

Friday, 13 December 2013

Life Counter and 3rd Person Camera


To add a number of lives the player will have, all you need is to set an int counter with a decreasing value, then when the player dies X times you announce he ran out of lives and add a command to end the game, which I do not know yet. Don't forget to set the Max Trigger Count in the Player Spawned Node.

Life counter and 3rd person camera view

The third person view is created by using a console command linked to the player. The command is "behind view".

Tuesday, 10 December 2013

Enemy Waves

The next bit of programming I learned in UDK was creating enemy waves. The final code looks something like this:

Enemy waves code

Monday, 9 December 2013

Patrolling AI

Now that I can create an enemy bot, the next level of programming is making it patrol an area.

AI bot moving around in a patrol

This is how the code looks like, now let's break it down:

Ladders and water

Ladders are extremely simple to create, all you need is a volume. Step by step:
  • Create a surface and add a higher ground for the player to go
  • Resize the builder's brush to an adequate size (same height as the higher ground with enough space to fit the player, you can add a robot skeletal mesh to help you with those measures)
  • Add "LadderVolume"
  • Notice that there is an arrow pointing towards a direction, to make the ladder work, you will need to have the arrow pointing to the direction of the wall which will be climbed. To adjust positioning you have to go to its properties(F4) and change Roll, Pitch and Yaw(basically X,Y and Z) values.
  • The ladder is created, to represent it you can use a stair or rope mesh to represent it.

Creating water is a little bit more complicated. Fortunately there is a very well written tutorial which link is:

http://onlinedesignteacher.com/computer_games_design/docs/UDK%20water%20tutorial.pdf

These elements add more inter activeness to the game, making it more interesting to the player.


Water texture

Interactive elements: Water and ladder

Tuesday, 3 December 2013

Fractured Static meshes


Creating a fractured static mesh means that it will be destroyable in-game, adding more details to your game, and it is a very simple process. Start by selecting a static mesh on the content browser. Double clicking on it will open a new tab where you can edit it. On the top you find the Fracture tool, click it to open and start destroying your mesh.

Rigid Bodies.

You may notice that if you add a barrel as a static mesh to your level and shoot it in game mode, nothing will happen. That is because it is static. To add physics to it you need to add it as a Rigid Body. To do that, select the object on the content browser, right click on where you want to place it and add it as a Rigid Body. The new object will react to your shots, giving it more realism.


Rigid body barrels


Grouping into Layers

The more things you add to your level in UDK, the messier things become in the viewports. To minimize that problem, we can add objects, meshes, lights, geometry and etc... to a new layer to keep things organised.

Adding layers to level


To do that, select the things you want to separate, open the content browser, go to the Layers tab and create a new layer. Later you can add/remove any actor you want to that layer. Unticking the box on the left of that layer will hide all the contents of that layer on the viewports, making it easier to place and move things around.