Hacker News new | comments | show | ask | jobs | submit login
Creating believable crowds in Planet Coaster (gamasutra.com)
239 points by tnolet 6 months ago | hide | past | web | favorite | 17 comments



We use pretty much the exact same concepts in SimAirport [1] and it generally works quite well. As with many of these types of 'scale' problems, invalidation becomes a bit tricky but on the whole it has allowed us to scale the game much better than anything else that we looked at.

Still a lot of work left to scale the remainder of the game (performance-wise), though.

Edit to add: It's also tricky when there are bitmask scopes of availability (is agent secure? is agent first class passenger? is agent a staff member with a badge? etc) and traversal-abilities; and then when you want to add in better heuristics to achieve neat stuff like moving walkways, etc. =)

1 - Disclaimer: Am one of the two devs of SimAirport. http://store.steampowered.com/app/598330


This game looks neat. I see you've got some custom aircraft/airline support on the Steam workshop. Do you have any plans for greater mod/plugin support?


Yeah, eventually we'd like to allow full support -- though shorter term the plan is to expose all the 'config' stuff basically. Long term the goal would be to let you import custom code/assemblies and pretty much allow modders to have at it!


That's great! I hope it works out that way for you and your community. I'll probably get the game when I get back to my gaming PC after the holidays. Please add me to the short list for early mod testing when you start to roll it out. This seems like the kind of thing I could really get in to.


Shoot me an email -- arthur@simairport.com -- anyone else interested in mod testing, or especially anyone that has experience with squeezing every last bit of performance out of C# / multi-threaded game dev / etc. =)


If you're interested in this, RVO (reciprocal velocity obstacles) is another multi-agent system for collision avoidance with some good reading[0][1][2]. I've been porting the RVO2 library to Python3 over break and it's incredibly natural the way the particles float around each other.

[0] http://gamma.cs.unc.edu/RVO/ [1] http://gamma.cs.unc.edu/RVO2/ [2] http://gamma.cs.unc.edu/HRVO/


I love the fact that Undo/Redo is particularly marked as a difficult problem.

I ALWAYS find making Undo/Redo robust to be one of the biggest challenges in any software application.


Same. In concept it seems really easy. Immutable data, events, two stacks, push pop. But in practice it's never that easy.

Unless you base entire systems' designs around making undo/redo easy, but then it feels like you're making a lot more work for yourself elsewhere.


I think autodesk did this really well with their Fusion 360 CAD application (probably others as well but this is the one i know).

Because the CAD concept in general is build around parameterisation every modification the user makes needs to be able to be remade with on a different starting (or previous) state. In a way it becomes even more then a first class citizen functionality in the application. The entire history stack (timeline) is available and you can even directly edit, reorder or modify individual steps and their parameters instead of just un/redoing them.


Is there a name for this kind of architecture? Once I was daydreaming and thought something similar would work well for business CRUD applications. You get an audit log for free, and it would enable offline edits relatively easy.


The principle of immutable log streaming is used in the Lambda[0] and Kappa[1] architectures.

It's also used by state management libraries like Redux[2]. The concept is generic and simple enough that it can be applied to any application where a timeline of state snapshots is useful, so maintaining a history for undo/redo purposes and audit logs is a great fit for it.

[0]: https://en.wikipedia.org/wiki/Lambda_architecture

[1]: http://milinda.pathirage.org/kappa-architecture.com/

[2]: https://redux.js.org/


I'd start looking from "event sourcing".


You will be happy to read this famous post if you haven't yet - log instead of database is a great abstraction! https://engineering.linkedin.com/distributed-systems/log-wha...


In CAD, it's called parametric modeling, at least the part about being able to regenerate from the start. "feature-based" seems to be the aspect of having features attached to other features in a tree structure rather than a linear sequence of operations.


Snapseed (Android & iOS) does a great job as well. It lets you go back to each of the previous steps and edit the parameters without losing your current state.


I think there is some bug with the undo in Planet Coaster with path creation that as a byproduct allows people to create smooth curved plazas. When you add a branch to a linear path and undo it, it seems to create a smooth curve at times so you can repeatedly shape the path. https://www.youtube.com/watch?v=OEtI8Q4XCek


Really fun read, and awesome to see how the scaling and path traversal problems were solved.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: