September 29th: A Stone’s Throw

Spent some time roughing out the default behavior state for the stone throwing version of the basic enemy type. Mostly it’s just standing in place and watching for the player, but I also went ahead and kept in the basic versions ability to periodically look around, crouch, and/or turn. I need to create a throw animation for the actual attack before I can get it up and running, but I also need to write a function to detect what angle to throw the rocks at to hit the player. Because it will need to account for obstacles and occasionally arc the attack over them, this could be a bit tricky.

Basically, I guess, for each attack thrown at max speed there will be a range of angles that could hit the player. So maybe I can randomly pick one, then if that’s obstructed I can randomly scan up or down from there, and then once I reach the end in one direction I can go from the other. Well, that elides most of the actual challenges of programming the algorithm here, but it might be a good place to start.


About problemmachine

What is the nature of your problem? Can we modify the nature of your problem? Can your problem be touched? Eaten? May we eat your problem for you? May we eat your soul for you? Would you like a replacement problem? We make problems. We eat souls. We crap solutions. We are Problem Machine.
This entry was posted in Daily Update, Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s