Page 1 of 1

Adding to object size

PostPosted: Mon Aug 05, 2013 5:44 am
by taborgreat
Im remaking the fish game where you eat smaller fish to get bigger. I have it so every time you come in contact with fish, it adds 1 to player.Width, and player.Height. It is growing the fish horizontally then vertically and it is just being really glitchy. Anyone have a fix?

Re: Adding to object size

PostPosted: Mon Aug 05, 2013 6:08 am
by lmchucho
Instead of adding 1 to with and height. Set scale to > Scale+0.1

Re: Adding to object size

PostPosted: Mon Aug 05, 2013 6:09 am
by Aphrodite
[QUOTE=taborgreat] Im remaking the fish game where you eat smaller fish to get bigger. I have it so every time you come in contact with fish, it adds 1 to player.Width, and player.Height. It is growing the fish horizontally then vertically and it is just being really glitchy. Anyone have a fix?[/QUOTE]

Maybe you shouldn't add 1 to both width and height (except if the height and width of your fish are equal). If that is not the case, adjust the values:

For exemple, for a 16x32 fish you would:

add 1 to width
add 1*(32/16) to height

Or maybe I misunderstood the problem

Re: Adding to object size

PostPosted: Mon Aug 05, 2013 6:27 am
by taborgreat
Here is a link to the game so you can see the problem (bad graphics xD)

Link : http://thplay.weebly.com/test.html

Re: Adding to object size

PostPosted: Mon Aug 05, 2013 6:58 am
by lmchucho
I just tried the game and I didnt see anything going wrong.