Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

Logged in as:
.
Logging out…
Inbox My Account Log Out


Forum Topic: Weird shaking that occurs...

(76 views • 3 replies)

This topic is 1 page long.

<< < > >>
Expressionless

TaroNuke

Reply To Post Reply & Quote

Posted at: 6/2/08 01:43 PM

TaroNuke LIGHT LEVEL 16

Sign-Up: 10/05/05

Posts: 122

Whenever I zoom in or out using _root._xscale,
my character shakes up and down ever so slightly.
I am using a while loop that makes the character's _y -= 0.1 if character is touching ground,
but it's really weird because everything works just fine without zoom.
It is the kind of game in which the camera often needs to zoom in or out.

What happen? Did somebody set me up the glitch?


None

RiftMaster

Reply To Post Reply & Quote

Posted at: 6/2/08 01:55 PM

RiftMaster EVIL LEVEL 11

Sign-Up: 03/17/01

Posts: 703

this is one of flash's little idiosynchracies. It has to do with how the Vectors are re-drawn. Since it is redrawing everything at the different zoom levels sometimes you will see "jittering" and sometimes not. my guess is that your character is falling through the terrain for a split second before the code corrects this. and at some zoom levels you can see this occurring. you could post your terrain code here for us to have a look at if you want.

this isn't surefire but you could try bitmapCacheing your character sprite, this will eliminate some of the evidence of redrawing in some cases.

this.cacheAsBitmap = true

I put the "funk" in function()


None

J0Rel

Reply To Post Reply & Quote

Posted at: 6/2/08 02:10 PM

J0Rel NEUTRAL LEVEL 07

Sign-Up: 10/11/07

Posts: 126


this.cacheAsBitmap = true

Never heard of this sentence... how it works??

BBS Signature

None

TaroNuke

Reply To Post Reply & Quote

Posted at: 6/3/08 04:41 PM

TaroNuke LIGHT LEVEL 16

Sign-Up: 10/05/05

Posts: 122

PROBLEM SOLVED.

I Math.round()ed the _root._x and _root._y co ordinates. No more shaking.


All times are Eastern Daylight Time (GMT -4) | Current Time: 11:29 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!