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.
- Chapter zero – setting up the solution
- Chapter zero – NFringe Project configuration
- Chapter zero – Getting the Isometric test map
- Chapter One – Creating the base game
- Chapter One – Creating the Player Controller
- Chapter One – Creating the Isometric camera
- Chapter One – source code
- Chapter 2 – Getting the mouse into the fray
- Chapter 2 – Setting up for movement
- Chapter 2 – Getting a real mouse cursor
- Chapter 2 – source code
- Chapter 3 – Making the pawn move to our will
- Chapter 3 – source code
- Chapter 4 – Making it follow the mouse
- Chapter 4 – source code
- Chapter 5 – Pathfinding for the champions
- Chapter 5 – source code
- Chapter 6 – Navigation meshes implementation
- Chapter 7 – Creating the follower
- Chapter 7 – Spawning the followers
- Chapter 7 – Assign commands to followers
- Chapter 6 and 7 source code and Navmesh test map
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?
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.
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?
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
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.
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 ??
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.
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!!!
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?
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.
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 !!!
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 ?
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 !!!
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.
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 !!!
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.
Thank you very much for the tutorials !
They are very well structured, and I’ve already started to modify things to my needs