How do I use binary data with images?

0 favourites
  • 5 posts
From the Asset Store
500 monsters and creatures images for card games - Set 1
  • The Binary Data object is also useful even if you do not access its contents: it integrates with other plugins like AJAX and Local Storage, allowing binary data such as images to be stored or transferred in useful ways.

    I tried to figure out how to use binary data combined with sprites but can't find any way or example.

    My project is based on packing many images in same file, and with binary data I want to be able to load only the needed image to my sprite.

    Any example explaining how it is done would be verry appreciated.

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Maybe I wasn't clear in my previous post, I try to be simple:

    All I want is to be able to :

    1) Load Binary Data from PNG file.

    2) Load Sprite frame from previous Binary Data.

    I hope someone help me make this possible.

    Thanks

  • You don't actually need BinaryData or AJAX, you can load PNG URL into a sprite directly.

  • Thanks dop2000, that's it, I was missing the "Set response binary to".

    Now I can pack many sprites to one binary file, and keep index(endian) for each sprite in an array, then load each sprite individually.

    I know that I can load images directly to sprite, but now thanks to you I'm able to load it from packed binary data.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)