The Daily Click ::. Forums ::. Klik Coding Help ::. Spread values poor framerate
 

Post Reply  Post Oekaki 
 

Posted By Message

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
13th February, 2012 at 14:12:17 -


Hello,

I'm experiencing a decrease in frame rate when I create too many "wallaby" objects.

Each wallaby is made from 2 active objects, an invisible object to detect the ground and a visible "mask" object showing a jumping wallaby. Multiple instances of these objects are grouped together using the spread values method but when there are more than 5 or so wallabies, the framerate experiences pain.

I know there must be a more efficient way of doing this but this is the only way I've mananged to get it to work. If somebody could have a quick glance at the code I would really appreciate it.

http://www.whenthereisnoroominhellthedeadwalktheearth.com/MMF/naden.mfa (5mb)

Image

Image

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
13th February, 2012 at 15:16:40 -

Scrap the extra objects and fastloops, and just use embedded collision detectors - it's so much easier and more efficient.
p.s. The "mask" is the invisible object, not the one that people see.

https://skydrive.live.com/redir.aspx?cid=b1e7ee094271bbda&resid=B1E7EE094271BBDA!497&parid=B1E7EE094271BBDA!131

In future, please strip out music and large graphics before uploading a file.

Edited by Sketchy

 
n/a

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
14th February, 2012 at 03:51:50 -


Cheers Sketchy. That is exactly what I needed!

I had used an embedded collision detector for my player sprite but I couldn't figure it out for the wallabies because they were not always touching the ground (jumping) and the animation would restart. Storing the current animatiom frame in an alterable value is a clever work around.

Thanks again!

 
n/a
   

Post Reply



 



Advertisement

Worth A Click