Skip to main content

#30daydeveloper - Day 17 - Spawn Animations

Hello! If this is your first time reading about my thirty day developer challenge, click here to go to the first post!

Wow turn rates were really difficult. Who would've thought that I should've paid more attention in high school trigonometry class? But I managed to get turn rates working after a good amount of whiteboarding.

The problem essentially was the way angles were being calculated. The ball may be facing -175 degrees, but if the player was 175 degrees, then the logical way to turn was counter-clockwise, but due to the way I was calculating the angle differences, the ball would turn almost a complete 360 degree turn towards the player.

My whiteboard scribbling
Therefore, I had to calculate out each specific scenario of ball versus player angles. What quadrant are they in? Are they negative or positive? Which direction should I turn towards to get the correct angle fastest?

In addition to turn rates, I also implemented spawn animations. Now the balls grow in size before beginning to target the player. Once the ball reaches it's maximum size, it starts towards the player. If the angle towards the player changes, the ball comes to a stop before recalculating the new angle. You can also click on the ball to force an angle change. This mechanic combined with the ability to stop time should allow players to launch enemy balls into the correct corner.

An update wouldn't be complete unless there was a change to the scoring system, right? Now balls don't disappear when they collide with a different colored corner. They just simply go through. Whereas if the corner and the ball color are the same, then the ball's current net worth is added to the player score. In addition, every time a ball collides with another ball, their respective net worths go up. This way, the player has incentive to bounce balls against each other before shooting them into a corner for maximum points.


On a side note, my lower back really hurts.

Comments

Popular posts from this blog

Jooble

Yesterday, I received an incredibly friendly email from an anonymous person who claimed to have read my blog and "loved it." Of course, because my blog is public and anybody can comment anonymously, I was a bit skeptical of this email. Yet, seeing as how this was the first ever "fan mail" I've ever received, I read the email. It wasn't fan mail, but it was an email from a person who works for a website called " Jooble ." Interested by his genuineness and heartfelt compliments of my blog, I took a quick glance at the website. Here's what he had to say about Jooble: Jooble operates in 45+ countries, so if you would like to find a job in other locations you may try to search jobs in: Argentina , Australia , Austria , Belgium , Belarus , Brazil , Canada , Chile , China Colombia , Czech Republic , Denmark , Spain , Finland , France , Germany , Greece , Hong Kong , Hungary , Italy , India , Indonesia , Ireland , Japan , Kazakhstan , Mexi...

Unity Game Developer

Been a long time since I've blogged...life tends to do this thing of getting in the way, haha. Anyways, I've been recently taking a Unity game developer class . Here are some GIFs of what I've been learning-- Day 1 - Learning to move a ball with arrow keys Day 2 - Using sprites and learning about physics Day 3 - Flappy Bird clone complete! Day 4 - Learning how to make a top down space shooter Day 5 - Adding meteors Day 6 - Using mouse to turn Day 7 - Shooting nukes and adding menus Day 8 - 3D Terrain building and character controllers Day 9 - Playing with built-in 3D models Day 10 - Learning about animations and 3D physics Day 11 - Starting my final project (4orner 3D) On a side note, if you notice, that last GIF is a 3D version of my hit  game from 2 years ago-- 4orner !

Making a Board Game

Wanted to update my blog with what I've been up to recently. I made a board game and have been working on that full time for the past 3 or so months. The name is still WIP but it's tentatively set as "Our Modern Lives." It's a tile/card based map-building game. The goal is to achieve "Success" and "Happiness" before anyone else can by building your own route. Here are a few pictures of the current build (v1.20 Beta): On a side note, follow me on Instagram for more (semi-frequent) updates!