0 Favourites

Load from url (whole animation instead frames)

  • Hi guys!

    Once more I need your help. :)

    I am sharing my cap so you can have a better idea of what I need.

    dl.dropboxusercontent.com/u/83579758/TestWeapon.capx

    In order you see what is going on, please run the cap and press 1.

    Everytime you press 1, the player will get a new weapon and make an attack.

    My problem is: everytime we press 1, instead I load a full new animation, lets say a whole image, I am loading frame by frame.

    Is ther anyway to to load the whole image or any other better method?

    Once my game gets bigger I should have more than 100 weapons and lots of other gear, I guess loading like this will generate some lag or even maybe bugs.

    Thanks alot!

  • Same problem here... <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Kept reading, trying and doing searches but I could not find anything about it. Anybody has any idea?

    Please helppppp me!!!

    Thanks :)

  • You should not load entire animations like that. Why not just add the images to the object's animations?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • I could do that, yes, but my concern is:

    Lets say I create only one sword and inside it I create all the animations I need with all diferent swords. Now, if I have like 500 swords + all animations for each sword, will not be this "impossible" to load this game?

    Or once I hit the game url the html5 will only load the animations/images used in this very fight? I mean, 500 swords, but player only use sword 1 and 2, will the game load the other 498 even when they are not used?

    Thank you very much for your reply Ashley!!!

  • olivete if such a scenario is actually necessary (500 swords!?) I'd recommend using Spriter for the animations and loading the sword image from a URL.

  • thehen, I really dont want to abuse your good will, but would you mind to show me an example or give me more tips about this?

    I should not have 500 swords, but I might have like 50 weapons of different types, like 50 axes, 50 swords and so.

    I just wish had a way to get this sample I posted and using it make the program load whatever weapon the player should get at that moment.

    Thanks alot for your reply!!!!

  • I think it's extremely unlikely you'll really have 500 swords. That's a totally ridiculous number! Even if you did, your sword graphic is pretty small. 500 sprites at 37x11 (be sure to crop them all) is less than one megabyte decompressed, and well under that compressed. So it probably won't be a problem even if you made 2000 swords. Construct can handle that just fine with the images in the project itself. Don't come up with complicated optimisations if there's no need - it's a waste of time.

  • I probably did not make myselft that clear.

    The way I am doing it (might not be the best one) is get my char and above its graphic layer I put a item, lets say the sword or maybe a helm.

    For each moviment my char makes (and it will use an 128x128 pixel area) it will be carrying his equipments, for example, a sword and helm.

    The problem is that for each moviment my char makes the sword/helm will have a different animation, so I really doubt that only 10 swords/helms will be smaller than 500kb using all these poses.

    The final detail I will drop about this is this game will be like a replay thing. We want to a system creates a fight and the C2 show this fight to the player, and of course, each fight players will have different equipments.

    Is there a better way to do that? Sorry I am too recent here and I still learning/searching.

    Thanks!!!

  • olivete definitely check out Spriter http://www.scirra.com/forum/spriter-c2-plugin-update-update-on-3-29-13_topic59694.html. It lets you have a single animation and to swap out sprites easily (so you could swap out different helmets, armor, swords etc).

    Then, as Ashley said, you can probably just have a load of small sprites for the weapons.

  • Don't draw the helmet and weapon on to the player sprite if they are interchangeable, use separate objects for them. Otherwise you will waste huge amounts of memory.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
1,941 263,388
FlyingRam's avatar
FlyingRam
Unread hot topic
26 1,669
99Instances2Go's avatar
99Instances2Go
Unread hot topic
65 14,834
qvatra's avatar
qvatra