Isometric camera including pathfinding from the ground up

This tutorial will help you from the very beginning to set up the solution and nFringe. It will help you create a new Isometric camera by extending the UDK base camera. We will add player movement with mouse clicks and mouse hold (like the Diablo game types). At the very end we will add artificial intelligence and pathfinding based on AIController. Tested against March BETA 2010. There are other tutorials on the blog as well.

Update me when site is updated
Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Slashdot
  • PDF
  • Twitter
  1. CaRteR
    December 29th, 2009 at 20:46 | #1

    I’m trying to do an RTS-/RPG-style game using UDK and Kismet.

    What I would like to see is a framework for that kind of game that I could just buy or license from you, to plug into UDK, that lets me just plug in that functionality and use Kismet to fine-tune what I want for my game. I really REALLY don’t feel like learning UnrealScript on top of Kismet and everything else in UDK.

    Can you make that framework available somewhere, somehow?

    • Hotdot
      January 2nd, 2010 at 21:14 | #2

      This kind of endeavor is beyond my intentions for the moment, I am not shutting down the door to type of thing. I was thinking of developing a dialog system if time permits it. Register to the feed, you will know if something comes out in that sense.

  2. helpme
    January 31st, 2010 at 03:47 | #3

    hi after i followed the tutorial. The playerpawn no longer indicate the damaged effect when it is being hit. How can i implement it back?

  3. TyR
    February 17th, 2010 at 16:39 | #4

    Hi there,

    First, I’d like to thank you for these great tutorials. I’m using them to do simple things, but I still have a problem.

    I have a terrain that goes up and down, and I’ve managed to use a pawn and a thirdperson camera. When launching the game, I can move the pawn without any problem, it follows the terrain, but it’s like floating above the ground.

    Do you have any ideas what it can come from ? I’ve tried to look for collision’s tweaks, but can’t find out why it’s not on the floor instead of above.

    Thanks in advance,
    TyR

  4. Hotdot
    February 18th, 2010 at 02:04 | #5

    helpme : this is because you replaced the UTGame default HUD, check the class to copy/paste information. You should know that is is from the ground up, so no UT stuff is going to go in there.

    TyR : this issue has been mentionned before and I suggest you look at the dungeon defense source code for that kind of fix, you can also check its developper diary, i am pretty sure he fixes that. It must be related to the way Unreal tournament was made and a tweak to camera because it was in first person.

  5. honglong99
    March 18th, 2010 at 00:16 | #6

    sorry, I have some question. I had read chapter One: Creating Isometric camera,but I dont know why u know in src/engine/classes/camera.uc has struct TViewTarget, I think UDK has about thousand Function and Variable. How do u do to know what function u need to use ??

  6. Hotdot
    March 21st, 2010 at 18:30 | #7

    honlong, there is a book that will eventually be out, but the date has been pushed like 5 times : http://www.amazon.ca/Mastering-Unreal-Technology-III-Introduction/dp/0672330822/ref=sr_1_1?ie=UTF8&s=books&qid=1269210494&sr=8-1

    You need to learn from the unreal mod that comes with UDK to actually do something worthwhile. Now there is also dungeon defense available to analyze.

  7. SQL Injected
    March 25th, 2010 at 22:47 | #8

    First: great tutorial! just what i needed

    I am half way through it but what i really want to do is to create a simple RTS. How to i get the camera to not follow the “main pawn” and allow the mouse to go to the edge of the map to scroll??

    I have tried some things but im still a newbie in UDK

    Thanks!!!

  8. SQL Injected
    March 25th, 2010 at 23:37 | #9

    another question: lets say if i want to publish the game as an exe now, how would I do that? also, when running the scripts, the mouse lags behind and is slow, will this be resolved later?

  9. Hotdot
    March 26th, 2010 at 02:36 | #10

    First question about the RTS question : Try to simply put the camera on Free mode. Look in Camera.cs and check in the pawn class what happens when you are in free cam, like when you are waiting in a UT game. You could also add an invisible pawn that you follow around. Lots of games have clever hacks like these when working with a foreign engine and also want to cut corners.

    The last question involves reading the UDK documentation. You need to use the frontend to do a game release to a folder. This will create an installer if I remember correctly.

  10. honglong99
    April 1st, 2010 at 00:02 | #11

    Excuse me ! In the chapter 2: setting up for movement . Why can I only put those variables into IsometricGamePlayerController which isn’t IsoGameInfo or Declare at the top of MyHud class ? When I try to declare at the top of MyHud or IsoGameInfo, it doesn’t work ? Why. Thanks a lot !!!

  11. Hotdot
    April 1st, 2010 at 02:49 | #12

    honglong, Each classes such as IsometricGameInfo and IsometricPlayerController serve a specific code purpose. The game info class is considered the equivalent of the main in C. Think of it as the general place to put code relevant to the whole game. If you would create multiple modes of play, they would be coded in the GameInfo class. For the PlayerController, the purpose of the class is to manage the player inputs like keyboard, mouse, or other and translate them into gameplay element like jumping. If you are asking about something other than that, could you be more precise about the problem with the variable declaration ?

  12. honglong99
    April 1st, 2010 at 21:35 | #13

    thanks your explain. My mean is simply: example:
    class Test()
    { var int i;
    public int add ( int a, int b)
    { …
    for(i;i>> yes >>> not run. But when I do as you guide, define those variables in IsometricGamePlayerController >>> script out of date >>> yes >> Run.
    What my wrong ?? Thanks a lot !!!

  13. honglong99
    April 1st, 2010 at 21:39 | #14

    sorry, maybe I write alot word.thanks your explain. My mean is simply: example:
    class Test()
    {
    var int i;
    public int add ( int a, int b)
    {

    for(i;i<0;i++)
    ….
    }
    }
    OK, with variable i , I can define inside or outside function ADD in Test class.

  14. honglong99
    April 1st, 2010 at 21:40 | #15

    Same,in the chapter 2, function event PostRender()in MyHud class had used: Playmouse, MouseHitWorldLocation, MouseHitWorldNormal….. but they hadn’t been defined in MyHud class that only had been defined in IsometricGamePlayerController
    var Vector2D PlayerMouse; var Vector MouseHitWorldLocation;
    As I said, if I try to define those variables in GameInfo or Myhud class, My program won’t run. =.= It always ” script out of date ” >>> yes >>> not run. But when I do as you guide, define those variables in IsometricGamePlayerController >>> script out of date >>> yes >> Run.
    What my wrong ?? Thanks a lot !!!

  15. Roychr
    April 2nd, 2010 at 00:33 | #16

    Because the hud class reference the IsometricGamePlayerController in PostRender like this :

    event PostRender()
    {
    local IsometricCamera PlayerCam;
    local IsometricGamePlayerController IsoPlayerController;

    super.PostRender();

    //Get a type casted reference to our custom player controller.
    IsoPlayerController = IsometricGamePlayerController(PlayerOwner);

    //Get the mouse coordinates from the GameUISceneClient
    IsoPlayerController.PlayerMouse = GetMouseCoordinates();

    We have a local variable that is declared in the IsoPlayerController (PlayerMouse) and we transtype the variable IsoPlayerController from the playerowner variable.

    The fact that it says scripts are out of date is because your scripts have changed since last build, when it does not work a pretty self explanatory build error should show up, look it up in the forum or you probably coded something wrong.

    I suggest you read the UDK documentation on variables.

  16. May 5th, 2010 at 20:51 | #17

    Thank you very much for the tutorials !
    They are very well structured, and I’ve already started to modify things to my needs :)

  1. December 18th, 2009 at 15:40 | #1
  2. March 21st, 2010 at 17:30 | #2
  3. March 21st, 2010 at 17:31 | #3
  4. May 16th, 2010 at 05:19 | #4