Smiley movement (An uninteresting psuedo code blog)

No Comments »

With Smiley Showdown the movement was very basic, the smileys went in one of 4 directions and once they hit the edge of the stage would end back where it started.

I wanted to make the movement a bit more random and interesting with this version, I decided to make each smiley have a random angle that it accelerated against. The problem with this though is making sure the angle isn’t too restrictive, what if the smiley doesn’t get enough screen time because the angle is to sharp and head’s off the stage instantly.

You can tell that I don't make the artwork for my games...

I want the smiley’s to stay on the screen atleast past the middle of the stage, making the levels fair. To do this I give each smiley a target in the center of the stage to go to and continue past, this way they have to stay at least till the center of the stage before it can go off the screen. So I need to work out two xy coordinates, the location of the smiley and the target location, the target being a random point on the y axis in the center of the stage. Like this:

I work out the distance between the points and use the Math.atan2 function to get the angle.

I calculate the angle between the two points and give it to the smiley to accelerate along. The smiley should now get a decent amount of screen time, here it is in action:

I hope that made sense…


It Begins!

No Comments »

So it’s been almost a year since I did anything smiley related, it’s about time I did a sequel to smiley showdown!!

No plans for the game yet so it could get interesting, I know I want to add a dynamic zooming camera and do something with smiley movement, so we’ll see how this goes…

I’ll be starting from scratch this time as the previous code structure was pretty bad, it was barely object oriented and was a pain to modify.

Well it’s time to code!!!

 


Fun Flow Studios is back!!

1 Comment »

So after months of being down we’re finally back, I’ll be writing posts much more frequently than I used to, I’ll be using the site more as a development blog this time around.