0
\$\begingroup\$

I'm trying to implement a roguelike movement system for my game. I'm using the ECS architecture.

The requirements are:

  • entities will have a mass, on which should slow down the entity movement accordingly. fatty ones move slower
  • there will have different terrains, that should apply different friction types, eg: ice will decelerate the entity slower; a quicksand will almost stop the entity immediately and so on.

[optionally]

  • there will have different weathers that should also impact on the entity movement, eg: sandstorm would push the entity to it's direction; rains will diminish the friction coefficient a little bit etc...

If the two first requirements are solved, the third will probably be as well, I think. How would you do this?

\$\endgroup\$
5
  • 1
    \$\begingroup\$ This question looks very broad so far. How have you attempted to implement this system so far? Did you run into a particular sticking point or problem that we can help you solve? \$\endgroup\$ – DMGregory Jul 26 '20 at 19:18
  • \$\begingroup\$ Have you noticed that for ALL the three questions I've asked here, you either say it's "too broad" or to "learn something before posting" while others just try to point me to the right direction? If you have nothing to add, don't bother. I clearly don't know how to begin with, otherwise I wouldn't be here. The above question covers kinematic formulas that use friction, mass, acceleration, deceleration, speed and velocity. Architecting/modeling the required systems for this would also be good. \$\endgroup\$ – Henri Jul 26 '20 at 19:46
  • 1
    \$\begingroup\$ "How to get started" is a type of question that the StackExchange format doesn't handle very well. So much so, it's one of our official off-topic categories. The reason mods and other users comment with feedback is to help guide you toward a question that will tend to attract more useful answers, so you can be off to the races instead of needing to ask more follow-ups. So, try breaking this down into smaller steps: it looks like you already have an existing answer with friction formulas. Where did you run into trouble applying a different friction coefficient based on the terrain/weather? \$\endgroup\$ – DMGregory Jul 26 '20 at 19:51
  • 2
    \$\begingroup\$ Roguelike movement to me means turn-based where truns happen when the player moves. But the movement you're describing sounds real-time since you talk about deceleration. \$\endgroup\$ – milk Jul 26 '20 at 20:53
  • \$\begingroup\$ You might want to try talking through your situation on Game Development Chat for a bit. Another user just tried that this evening, and it helped them feel out the terrain around a broad question, so they could work their way toward applicable specifics. \$\endgroup\$ – DMGregory Jul 26 '20 at 22:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.