Post news RSS Happy New Year from Cattails!

Cattails is coming along very nicely! After all the chaos of the holidays, I’ve finally been able to settled back in to development of the project and have made some incredible progress.

Posted by on

Happy New Year from Cattails!Cattails is coming along very nicely! After all the chaos of the holidays, I’ve finally been able to settled back in to development of the project and have made some incredible progress.
In the past week, thousands of...

Cattails is coming along very nicely! After all the chaos of the holidays, I’ve finally been able to settled back in to development of the project and have made some incredible progress.

In the past week, thousands of people have been introduced to the lovable kitties of Cattails, and I can’t wait to show off more of what we’ve been working so hard on for so long. In 2017, I hope to devote even more of my time and energy into the game so that every player can have the incredible experience we’re striving for.

I don’t want to give too much away just yet, but today’s development has centered around the combat system.

image

In the coming months, I plan to write more entries on this blog about some of the behind-the-scenes details that make Cattails work. There’s a whole lot of mechanics that require a great deal of thought to bring to life. Here’s a little bit of the math involved in the combat system from the handy-dandy whiteboard:

image

(Trigonometry is important outside of school! Who knew?)

A large part of the combat system revolves around intelligent path-finding and random events. The enemy cats need to detect all valid targets, select from among those targets, and move toward the target in a logical manner. They also have the option to “run away” for a brief period of time to throw off their opponent, and that’s where the math comes in.

First, the enemies find the angle between them and their target. “E” is Enemy on the map, “P” is player (which is the enemy’s target in this hypothetical situation.) Then, they add 180 degrees to the angle they found to find the angle they should run away at. Next, they find the pixel value that they should run away to by using some clever sin() and cos() functions.

There’s also a great deal of math involved in making sure they all don’t bunch up on each other if they’re converging to a single point involving a precedence variable. When two enemies collide, they determine who has the lower precedence to decide which enemy should move and which should (temporarily) stay put. That ensures that there’s no giant-ball-of-cats flying your way.

Stay tuned for more, and if you have any questions, send them my way!

———————-

Check out Cattails on social media!

Comments
Guest
Guest

This comment is currently awaiting admin approval, join now to view.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.