Monday 25 April 2016

UE4_Pong Notes

  1. Import reference texture, drag from finder into content box.
  2. Create material ( right click content box) and place reference texture onto material. (Left click and t)
  3. Drag material onto one side of the box, make the box size of the image (900 x 1290)
  4. Go into the material editor screen and create a bounding box based 0-1 UV W, then a component mask, then a custom rotator, hold down 1 and create a node and name it 0.75, plug it into the rotation angle, then plug the rotator into the texture sample (UV)
  5. Create BSP Cube
  6. Re-scale material reference to the size of the cube (Ball) (3.75,3.75,3.75)
  7. Create static mesh from BSP cube.
  8. Create another BSP Cube and scale it to the size of the paddle using the reference image (350, 100, 100)
  9. Then create a static mesh for the paddle.
  10. Create a new BSP cube for the boundary (150, 5100, 100)
  11. Line it up to the edge of the image, and create static mesh for the boundary.
  12. Create text render and scale the 0 to the 0 in the image.
  13. Hold alt to copy the score across and rename both p1 score and p2 score.
  14. Create folders to group everything together and stay organised. (In the content section of the screen)
  15. Create a new blueprint class (Pawn) name this paddle right or left.
  16. Double click on the blueprint to bring up the editor.
  17. Add component > Static Mesh > Rename paddle mesh
  18. Go to the static mesh tab in the editor (Right side) and click where it says none and change it to the paddle you made earlier, so now it should look like a paddle.
  19. Go to collisions in the editor and click it at the top of the screen so it is highlighted, then go to the top of the screen and click mesh > simplified box collision and hit save then go back to the editor.
  20. Turn off gravity and set the linear damping to 10.
  21. Go project settings > Input > Axis mappings and create a key mapping called “P1_MoveUp” and bind up key to a positive value and down to a negative value.
  22. Then go into the editor, and set it up like this:Screen Shot 2016-04-20 at 12.39.12.png
  23. Then we have to get a camera in, so go to search classes and find the camera and drag it into the scene.
  24. Then position it above the image so it looks above the level like so:
Screen Shot 2016-04-21 at 14.49.28.png
  25. Then go to blueprints > level blueprints and setup the editor like this:Screen Shot 2016-04-21 at 14.50.49.png
26.Then create a new material called unlit_white and double click on it to bring up the editor and then set it up so it looks like this: (Make sure the shading model is unlit)
Screen Shot 2016-04-21 at 15.13.44.png
27. Next apply this material to all of your static meshes in the game to make them white.
28. Next we must make the text white as we cannot see it very well in game. So click on the current material and go into the engine folders by clicking on the arrow next to the material.
29. Then make a copy of material and call it M_Pongtext.
30. Drag the duplicate into your materials folder and double click to get onto the editor and make sure it is setup as below.
Screen Shot 2016-04-21 at 15.29.32.png
31. Then apply this material to both of your letters by simply dragging it from the content folder into the material box of the text.
32. Create blueprints for the boundaries by going to the static mesh boundary right clicking > assets > create blueprint using this object.
33. Make sure collisions are enabled on the BP, then align it with the top and bottom of the level.
34. Make separate blueprints for goal left and goal right then align these too.

Thursday 14 April 2016

Unreal Engine


This is a screenshot from inside Unreal Engine 4. The box in the middle are the "blueprints" for my character in the game, essentially its code to make it do things.


This is an example of a node which is like a little block of code, this red node means that whatever is inside triggers an event in the game. In this case it means when the "T" key is pressed and released during my game an event will happen.

This blue node is an example of a function. It will make it so that event is attached to it using the pins, it will print out a string which says "Say Hello To My Little Friend". 

This is what the nodes look like when they are linked up by the pins. These nodes make it so that when the "T" key is pressed in my game it will print a string onto the screen, and when the key is released it will print another. 


All nodes are connected by exec pins which look like this.



Monday 11 April 2016

One Tap Game Proof Of Concept

Aim of the game is to keep running for as long as possible while tapping the screen to jump over oncoming obstacles such as cars and traffic cones.
The further on in the level you get the more obstacles that will start to come and at a faster pace.
You will die if you land/hit an obstacle