Jump to content

  • Log In with Google      Sign In   
  • Create Account

Angus Hollands

Member Since 06 Apr 2012
Offline Last Active Mar 29 2016 05:55 PM

Posts I've Made

In Topic: "Weapon Fired" Event -- Reliable, Unreliable, or In-Between?

29 March 2016 - 05:55 PM

Whatever solution you use will depend on a few things, including whether your client simulation runs in the past or not. If you're already interpolating entities, that will give you some additional time to receive information about projectiles.


When it comes to entity replication, I will send a reliable un-ordered packet that contains the information required to instantiate the entity client-side. From there, I would send state updates as unreliable, discarding out-of-date packets. You could even reduce bandwidth for predictable projectiles and just send the initial state, with the network tick and velocity, and allow the client to simulate it.


I'm generally uncomfortable with the notion of reliable ordered. The reason most use UDP for fast-paced games is to avoid the latency that is fundamental to the operation of a reliable stream over unreliable network conditions. At least with reliable unordered you can proceed other state whilst the packet is redelivered when dropped.

In Topic: Car transmission model

16 September 2015 - 06:38 PM

Indeed, the torque curve is defined as follows (see the BoxsterS2004 class)

maxTorqueArray = [220, 220, 310, 220]
rpmAtMaxTorque = [0, 1000, 4500, 6600]

Where maxTorqueArray are the Y values for the rpmAtMaxTorque X values.


I can see that the descending gear ratios will shift the engine back into the max torque region, but the applied force is reduced because the transmission factor (gear * differential * loss factor) is reduced by the gear reduction. 

From this, I am led to believe that the model is fine, but good data is required.

In Topic: Glitches in Navigating my NavMesh

28 June 2015 - 06:56 AM

Hi Angus, thanks for addressing those points for me; with your help I was able to get my basic system up and running and it seems pretty robust (so far.) Do you do any kind of agent-agent collision avoidance ? I was thinking about how best to handle that and some pointers will be helpful.


Waterlimon, thanks man, I wasn't sure how to undershoot, that info will come in very handy.

My experience with a range of techniques in this field is limited at the moment. I'm actually revisiting some pathfinding-systems I wrote in the past, which is why it's topical :)

NB, Mikko Mononen, the author or Recast & Detour, wrote some articles on his blog about general pathfinding & following concepts.

At the moment, I've left this in my own works, because I'm trying to get more performance out of the general navigation code (it seems that the funnel algorithm is running slowly for me, time to dig out the profiler!). However, local steering behaviours are the basis for collision avoidance, and there are a few great articles on digestingduck (the aforementioned blog) that describe how he does this. There are certainly other methods, though I will note that I like his approach to problem solving, which doesn't settle for cornercases. 

In Topic: Glitches in Navigating my NavMesh

23 June 2015 - 06:17 PM

The way that Recast & Detour handles this is to include the agent's radius in the navmesh (to avoid having to post-process paths). In my game, I just apply velocity in the bearing of the waypoint until within a specific margin (0.01 m or so (> than 1 frame velocity error)) and then switch to the next waypoint. You could also check if the dot of the vector from the current waypoint to the npc position is greater than the distance between the current and next waypoint.

I avoid recalculating paths by only doing so if the target moves. You could extend this further by keeping track of entites within the same node and checking if they're in the path or not. To handle the case where the player leaves the navmesh, I keep track of the last node the player was within, then find the nearest neighbour according to the edge distance (assuming that I'm not currently in a node).

In Topic: Simplify A* path

11 June 2015 - 09:50 AM



I'm trying to implement pathfinding in my game, I'm using navmesh with triangles.

I'm able to find a path but I want to simplify the path. This is what I have right now :


Green quad is start position and blue quad is the destination, the path taken by my character is in white.





Node 1 and Node 2 are in differents triangles, I want to delete Node2 and go from Node1 to final destination.


How can I simplify this path ?


I know about Funnel algorithm, but honestly, I don't understand anything and I can't see how it's going to work in my case.


Thank you.

The funnel algorithm essentially traces the view of the agent as it attempts to follow the A* path. I have an example implementation here if you care to look at it. 
The example on Mikko Mononen's blog may also be useful.