matriax's Recent Forum Activity

  • The idea is drag an image on your pc folders and drop into the app window and show as an sprite.

    At the moment i get how to create a sprite when an image is dropped in the windows and set their binary data inside the Base64 variable of the sprite.

    Here is the capx.

    https://dl.dropboxusercontent.com/u/659 ... drop1.capx

    So, or i find someway to convert that binary data into Base64 or directly set the sprite an image using the binary data.

    In case the convert to Base64 is correct the events are done so the image will appears.

    Also you will need this behaviour to open the .capx. Is a behaviour to extract the Base64 from an image:

    viewtopic.php?f=153&t=68494&p=873882&hilit=pode+base64+extract

    But can convert the binary data to Base64 seems <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad"> .

    Any idea?

  • Well, you can save & load the sprite states on runtime.

    https://dl.dropboxusercontent.com/u/659 ... tate4.capx

    You can Press Circle or Square to create them and drag anywhere and works in the same app.

    Works the export button of Array.AsJSON

    So the unique problem still is create the objects and add their properties of the Array.asJSON. And well discover how open a file and get the text instead of put the direcction by default on import.

    Still nothing how to solve that?

  • Well, at least now i can save and load the family sprite states using json and arrays in the runtime.

    https://dl.dropboxusercontent.com/u/659 ... tate2.capx

    Now i guess is export the Array.JSON state. SO in a new running i will load the arrays and a for each to any sprite.

    But if i create more sprites, and if i run the app without any sprite, how i tell the program he have to create a sprite of X type and set their properties?

  • I'm doing a 2d tool program based on sprites.

    I'm looking how to save all the sprites properties like: Name, X/y position, instance values, opacity,effect parameters,etc... in a file and after in a new runing load that file that create all the sprites with their properties to regenerate the same composition.

    I saw the sprites have a AsJSON and "set from JSON" but, how i tell the code how to create the sprites and how many sprites and in which one add what properties ¿?

    I search in the forum and i saw this one:

    Changing the SaveState to text instead a global number save/loads the properties of the object, but i have no idea that how do the rest.

    I guess, at least for save, create a family called "sprites" and using an Array plugin and then: For each sprite save their JSON state in a X. so i will have stored in each X(x1,x2,x3) the properties of each sprite. But how i save all that in a .txt o .JSON file and how load all that after to recreate the same composition? :S

    I tried another way using the System:save but each file gets near 80mb and saving is a bit slow, works but is not an option .

    So, how i do the .json thing?

  • Ahh great rexrainbow ! Newgrounds asked me(I mean Tom Fulp the owner) to do the plugin due some game i uploaded to their site made in C2 with highscores (Asteroidx) but i told they i not have the skills and recommend you as best for the work, seems they finally contacted you .

    Are you finished to develop the plugin? or still busy? I came looking you for some help about your listCtrl plugin and maybe some freelance work to create a plugin i need. Can i send you a private message with the info?

  • Well, i finally solved it. I put the Sort Z order out the action of the wheel mouse and now works perfect.

  • I realize that i can get the Zindex of an object in a layer but i can only move to Bottom/Top.

    There is no way to change the Zindex of an objcet in 1/-1 insted only front/back?

    I can get this sorter Z order working.

    I simply want that using the mouse wheel change the Zindiex of an object in 1/-1 to put the sprite in front o back others.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is what i'm trying to do:

    I not understand very well how the Sort Z order works for instances.

    When a Circle is created gets a Zorder number. With the mouse wheel you can add/substract this number to get higher/lower to make the sprite be in front or behind others. Each move of the wheel make a "sort Z order by the Zorder instance variable" but seems i'm doing something wrong :S .

    Here is the capx:

    https://dl.dropboxusercontent.com/u/659 ... am_p8.capx

    Create a circle and click the button "light" to see better if they are front or behind others.

  • So with the minor bug fixes i'm stucked in the canvas thing.

    So at the moment i put a fixe canvas of 1856x928 tha is the maximun and when the user resizes the window show more o less of the canvas. Yes, is not perfect and when you export an image even if is a small one you will get a a big one of 1856x928 with your draw but i can't fix it in other way

    https://dl.dropboxusercontent.com/u/659 ... am_p7.capx

    Also other of the problems are the buttons and other stuff that changes their possition and his size when the windows changes, i guess maybe with canvasTolayer like the "export" button i did it but still is buggy :S .

    Edit: Use the Anchor behaviour is more simple than the CanvasToLayer but if there is another way to get it better fixed i want to know.

  • Well i solved the other bugs regarding my program about change size and textboxes.

    Still not find the solution for the canvas. Maybe use a fixed canvas and only show some part when the windows is resized to fake it? :S

    If not at the moment i will change to my resolution 1920x1080 until i get some idea that how fix it.

  • I want the canvas changes when the window changes. So in properties i set:

    Fullscreen: Crop.

    When the app runs(I'm using NW.js) i can change the window size and the canvas is sized to the zone i want correctly.(Press Q to fill the canvas in white and see how changes).

    But when is time to export the draw the objects are stretched horizontal/vertical due the window changes.

    i tried with set size and with "resize canvas" but with this last one disappears and none is exported. So, maybe is a bug on Canvas or i'm doing some wrong?

    Here is the .capx

    https://dl.dropboxusercontent.com/u/659 ... am_p5.capx

    Also there are two errors explained in the code and marked like the size change on srites and the sprite name on textbox that i can't figure how to fix.

    Thanks in advance.

  • dl.dropboxusercontent.com/u/666516/temp/canvasimage.capx

    Worked! Thanks!

    I tried to add some sprites but if i add in the layout when try to export only the black dot appears.

    Edit:

    With a: Paste object "SpriteX" into canvas then exports all correct.

    So i guess i will need to create a family to paste all sprites i want into canvas, or some comparision like "if FamilySprite is not on canvas paste it" to be sure all sprites and draws are exported correctly i guess.

matriax's avatar

matriax

Member since 22 Jun, 2015

Twitter
matriax has 114 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies