• Home
  • About us
  • Articles and Tips
  • Contact us

Articles

Home / Articles / Upcoming changes to UnitySteer

Upcoming changes to UnitySteer

Posted on: 08-18-2010 Posted in: AI, Unity, UnitySteer

I’ve continued updating UnitySteer as we work on our game (eating our own dogfood, as they say), and I wanted to poll the community a bit in case anyone has objections to some upcoming changes.

1) Remove CharacterMotorVehicle and CharacterMotorVehicleEditor.

These classes depend on Unity’s CharacterMotor, which is included on the Standard Assets as a Unity script class. We’ve translated it to C# and are iterating over it to do some changes here and there, but part of this is that the naming conventions no longer match those used by Unity on the original. I’d rather remove it from the main repository than have in it something that will introduce noise for the majority of users (who may not even care about that particular behaviour).

2) Change the radar collections to C5.

The C5 collections are still better designed than the .Net ones, even on 3.5. For instance, List(T) has a Find method, but IList(T) doesn’t. List(T).AsReadOnly returns an IList, which means you can’t do .Find on it. So if you’d like to have that, you have to forget about the safety net of AsReadOnly, and end up writing to the implementation.

C5 allows us to return a GuardedList that behaves consistent with what you would expect from List, and on top of that the collection gets us other features.

I already have these changes implemented in a local branch, but haven’t merged them to development yet.

About the Author

Ricardo J. Méndez

  • Popular Posts
  • Related Posts
  • Quick SteerToFollow example
    Quick SteerToFollow example
  • Screenshot Saturday 20110813
    Screenshot Saturday 20110813
  • Screenshot Saturday 20110806
    Screenshot Saturday 20110806
  • UnitySteer - AutonomousVehicles and Bipeds
    UnitySteer - AutonomousVehicles and Bipeds
  • UnitySteer - AutonomousVehicles and Bipeds
    UnitySteer – AutonomousVehicles and Bipeds
  • UnitySteer: Experimental vehicle and radar changes
    UnitySteer: Experimental vehicle and radar changes
  • Updates for March 7-14, 2011
    Updates for March 7-14, 2011
  • UnitySteer: the next few months
    UnitySteer: the next few months
  • (2) Comments
  • (1) Trackbacks
  1. Richard Fine05-01-12

    Hey Ricardo,

    For what it’s worth, I’ve actually just ported my copy of UnitySteer back from C5 to System.Collections.Generic. As much as the API design of C5 may be nicer, it seems to be much worse in terms of allocations (and thus runtime speed). For example, ArrayList doesn’t have a distinct concept of capacity; ArrayList.Clear() doesn’t just remove all items, but actually reallocates the internal array at the smallest size again. By switching back to the BCL and simplifying the code a bit (at the cost of some enforced correctness – no more GuardedList, for example) I’ve reduced steering allocations from 5KB/frame down to just 90 bytes.

    (reply)
    • Ricardo J. Méndez05-01-12

      Hi Richard,

      Thanks for the comments about C5, it’s good to know that it behaves that way. I removed all C5 dependencies about a year ago on the experimental branch while working on what ended up becoming 2.5, but those changes didn’t make it into master until recently.

      Cheers!

      (reply)

Leave a Reply

Click here to cancel reply.

  1. UnitySteer updated « Arges Systems01-11-11

Recent posts

  • Hairy Tales Previews
  • Quick SteerToFollow example
  • UnitySteer – AutonomousVehicles and Bipeds
  • Hairy Tales progress – new elements and a boss
  • Public Alpha 2

Recent comments

  • Ricardo J. Méndez on Quick SteerToFollow example
  • Ben Ezard on Quick SteerToFollow example
  • Ricardo J. Méndez on UnitySteer 2.1 released
  • Elie on UnitySteer 2.1 released
  • Ricardo J. Méndez on Upcoming changes to UnitySteer
© 2009-11 Arges Systems Inc.. All Rights Reserved
TwitterStumbleUponRedditDiggdel.icio.usFacebookLinkedIn