Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Nov 2013
Offline Last Active Yesterday, 02:01 PM

Posts I've Made

In Topic: WPF Jerky Initial Draw

20 November 2015 - 01:18 PM

Well, you're never going to get great perf from WPF, but that said, have you thought about using an atlas or sprite sheet instead?

In Topic: Increase Unity Movement When Holding Shift

14 November 2015 - 10:31 PM

Your code doesn't look all that wrong outright, other than it's a little strange that you're setting the speed variable after you've already used it.  But that should be fine, since its' a member variable, and it just means you'll always have a one frame lag from when the key is pressed to when the movement happens.  And you also can sprint when in the air, which is a little weird.  I would move that 'if(shift) else' speed modifying code to inside the if(grounded) and before using the speed variable.  (Though like said, the code should still work)


I a couple of things to try:

Debug.Log() your code, check that the  if Sprint block is being reached.

Set some breakpoints to ensure the code is executing as you think.

Try it without a character controller.


EDIT: Also, don't forget to check for compiler errors elsewhere in your code, unity wont' update until everything compiles (I know, it's kind of a noob thing, but I still do it myself from time to time.)

In Topic: dealing with a multiplicity of AI states

13 November 2015 - 03:48 PM

This doesn't really help your overall problem, but you could have a generic Fleeing from X state, as it seems like fleeing from fire would be the same as fleeing from a rampaging woolly mammoth.  If you have unique bark strings / shouts for fleeing from fire over fleeing from a woolly mammoth, you could reflect that based upon what the AI is fleeing from.

In Topic: 2D Grid Pathfinding and 3D Environment

13 November 2015 - 12:47 PM

Yeah, like I said, that doesn't work well, unless you have a very grid like world (And by that I mean your Bridge is as exactly as thick as your pathfinding tiles).  You can move towards one or two different models, one is like this:

struct Node
   vector<int> Links;

then you have Node[yourcubesize] nodes, and that node can only travel to the nodes whose indices are inside that nodes Links field.  The other way I have seen it done, is by having a Link be a structure itself, something like:

struct Link
  int DestTileIdx;
  LinkType (If you have different movement types, you could have things like Infantry, Any, Amphibious, Flying, etc)

(Someone can pipe in with how to optimize that for better perf, probably by moving out to a array of links that's outside the node, with the index into the array being the node you're interested in.)

In Topic: Gameplay advice for turn-based, top-down, strategy game

13 November 2015 - 12:13 PM

4) Something else?...

Have you tried Wargame European Escalation or any of it's many sequels?  It has you basically selecting units beforehand, but you don't actually start with them all on the board.  Sort of a hybrid of 1 & 2.  Units have both a cost to have in the deck / army, and a cost to deploy.  It's a wargame, but to put it in fantasy game terms, you could take 30 footmen, 3 knights, 1 dragon pre-game, and then that's all that you could build during the game, and if your one dragon dies, you cannot deploy another.


Oh and players gained more resources by capturing territory on the board.  I like that mechanic over harvesting from one's homebase or preset amounts, as it forces players to not turtle.