Routing using a custom rectangular cover algorithm + more #3

Merged
merged 12 commits into from Oct 4, 2015

Projects

None yet

1 participant

@RHY3756547
Owner

image
image image

To better support the objects and environments present in the original game, we had to switch routing algorithm to one which supported more accurate routing without incurring a huge cost. This combination of a rectangular cover algorithm and A* is performant, fit for purpose and seems to be quite similar to the way the original game does things.

A prototype for the algorithm is available here: https://dl.dropboxusercontent.com/u/12239448/TSORouting/index.html

Of course, this branch contains a lot of extra changes too. For more information check the development roadmap thread on the forums:
http://forum.freeso.org/threads/road-to-live-release.801/page-11

Notable Changes:

  • Within-room routing with new algorithm.
  • Now uses detailed rectangular obstacles instead of full tile obstacles.
  • Walls and fences included as rectangular obstacles.
  • Turn anim at end, special rules for portal functions.
  • Sim Collision, routing response.
  • Sim shoo and wait during routing.
  • Route failure trees (when your sim gets really angry, points at something then shrugs)
  • Walk spin up/down acceleration, blended animations.
  • Wall raycast for SLOTs (can't use TV through walls)
  • SLOT parser refactor
  • Goto Relative Position now generates a SLOT instead of working independently.
  • Redo room route on failure
  • React to changes in architecture immediately, recalculate room route.
  • Lots of bugfixes and unrelated things, because it's totally impossible for me to keep a branch just for one thing. 8O|
  • Probably a lot more!
added some commits Aug 13, 2015
@RHY3756547 First stage routing using rectangular obstacles
Much better than we had before. Still some kinks and optimizations to
work out, plus a lot more changes to routing.
dc62fa9
@RHY3756547 Turn anims play at end, also not when using doors.
Also added "outside this room" obstacles. Fixed being able to walk
though stuff you were previously parked very near to. Turn body towards
now performs turn animation.
12664ae
@RHY3756547 A lot of work, committing before I do LDJAM
- Sims now collide with objects.
- On collision with objects route is recalculated.
- Sims also now collide with each other, and deal with each other by
waiting, routing around or forcing the other person back. (PRELIMINARY,
VERY UNSTABLE)
- Partial VMGetTerrainInfo implementation (fixes wacketballs)
- Routing failure trees
- Walk spinup/down acceleration.
- Hacked clock time to once every 5 seconds, like original.
- Fix to rect router for being right next to things
d952be4
@RHY3756547 Blended Animations, fixes to shoo, better walk
Still need a lot of cleanup.
084d9de
@RHY3756547 Why is there a circular reference here?
How did this even compile??
60a9a0f
@RHY3756547 Restructure, fixes, Avatar Thumbs 0402f8b
@RHY3756547 Fix animation reset, add wall raycast for slots
Slot parser refactor up next. Will probably make it non static and have
some state.
f75d7ef
@RHY3756547 Slot Parser Refactor, fixes to npc suits.
Not so fast, we aren't finished yet!
6733316
@RHY3756547 Change relative pos/snap to use slots, other fixes.
Don't stand up from a chair or you'll get a softlock.
778e9f0
@RHY3756547 Fix to stand function, stuck softlock, carry anim.
Pre-commit before routing change to room route before slot parsing.
4719d58
@RHY3756547 SLOT evaluated after room route, fail codes.
Make HIT a little more "bad id" track proof. Also fixes to SLOTs with a
low version having incorrect proximities. Routing frame refactor is
almost totally done.
64dfc51
@RHY3756547 Room reroute, invalidation, FindLocationFor, bugfixes.
Should be ready for merge. There are still a few bugs where you can get
stuck, but now since you can cancel interactions while routing, you
should be able to just cancel the offending interaction and click "Kick
Outside" on yourself.
9d6977f
@RHY3756547 RHY3756547 merged commit d0ac8ca into master Oct 4, 2015
@RHY3756547 RHY3756547 deleted the rect-routing branch Oct 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment