jobel's Recent Forum Activity

  • Ashley even better! that makes my job way easier... so I can load as many redundant frames as I want and C2 will 'trim the fat' - so to speak.

    excellent! thanks...

  • so if I have different animations (for the same sprite object) that have different filenames it will only use the 1 image?? that is cool.

    I guess that's why some people complain about export times, it's doing a bunch of deduping... thanks!

  • hi,

    I have about 14 animations for my player sprite, each about 15-30 frames. There are a number of these frames that most likely use the same image. I export them from my animation software, sometimes I'm just changing a small thing that is only in part of the animation sequence. So all the animations will definitely share some of the same exact frames. However they may have different names... i.e. "BeamWeapon008.png" and "AutoWeapon008.png"

    Does anyone know if C2 will take out duplicate images (on Export) and only use one image, or is this something I have to do manually? Ideally I'm looking to optimize and not load the same image into memory more than once.

    thanks..

  • ahh yes Ashley warned against using Text objects when they are moving...apparently they create a tremendous overhead.

    Glad you figured it out..

  • the numbers that I need to use are between -20,000 and 20,000

  • okay so here's an example:

    X:251 Y:3200

    compress:

    251 * 1,000,000 = 251,000,000 + 3200 = 251,003,200

    unpacking:

    first number:

    251,003,200 / 1,000,000 = 251.0032 (use floor to get 251)

    second number:

    251,003,200 / 1,000,000 = 251.0032 (use floor to get 251)

    251 * 1,000,000 = 251,000,000

    251,003,200 - 251,000,000 = 3200 (or just use mod)

    works perfect!

    for negative numbers:

    X:4 Y:-8

    compress:

    4 + 100,000 = 100,004

    -8 + 100,000 = 99,992

    100,004 * 1,000,000 = 100,004,000,000 + 99,992 = 100,004,099,992

    blackhornet so far this is a problem right? does this go beyond the highest value? isn't it int32: 2,147,483,647?

  • Magistross yeah I've done bit shifting, but I see that as a sort of parsing since you need to elect 16 of the bits to be one number and the remaining 16 to be a different number.

    That (decimal shifting) math is what I was looking for.. cool, thanks! the only problem is negative numbers which presents a real problem.

  • Magistross I could program parsing easy enough if it were saved as a string. I'm really asking is there a way to store 2 numbers as a single integer. i.e. do some sort of calculation to the two numbers so that a 3rd number somehow represents them both - one would obviously have to do something to the said 3rd number to "unpack" the other two...

  • is there a mathematical way to store 2 numbers (let's say x/y coordinates) as 1 number? perhaps like a seed?

    if my x/y was -3002/1506 there doesn't seem to be a way to store that as 1 number, but is there a way to store a different number that somehow can be extrapolated into these 2?

    You could maybe store them as hex and parse them out.. hex:AE would = 10,14

    I supposed negative numbers would make that even more complicated. Any ideas? it's more of a curiosity...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I doubt it would matter 2 layers opposed to 1 but as far as 50% parallax optimization.. I have no clue..that's probably an Ashley question..

  • which version? I'm still on 10.5

  • LittleStain is right.. if there are only 2 animations you only need to do an else and don't need and 'else if' since it's an either or situation..

jobel's avatar

jobel

Member since 27 Jul, 2013

Twitter
jobel has 8 followers

Connect with jobel

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x4
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies