matriax's Forum Posts

  • Is all explained in the code but the problem is that i want that the textbox updates with the last sprite name created.

    First an event that says -> On click-Create X object

    Second > On X object created > Set TextBox as Sprite.name

    The unique way to get this working is adding a "wait X seconds" firts, but this will give me problems on the future, so how i can fix it without the WaitXseconds ?

    Here the .capx

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

  • Here the capx of the topdown shooter:

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

    And here is the demo if somebody is interested before download:

    https://dl.dropboxusercontent.com/u/659 ... index.html

  • matriax

    This looks amazing! Love your shooter example with the dynamic shadows.

    I want to make a Isometric game that looks like this:

    Will your Effects work here? Can I have light confined to the walls and produce shadows?

    The normal maps do changes on the light using a texture over other. The normal map no project shadows to other tiles, for that use the Shadow Caster,etc...

  • Yep, i design the same solution XD. Create a .gif with 1000 frames of 1x1 pixels and load it on the sprite, in animation called "Imported image".

    So if the sprite Base64 variable is different of "" then set animation to "Imported image", set frame to Zorder variable of the sprite and load image using the Base64 variable data.

    ---

    Will be great if there is some way to "object-clone" action so will have an sprite object with the same properties but without share the image texture. Or an option in the Sprite properties of an object on you can say "Share image texture with other instances: Yes/No" and problem resolved. What you think Ashley , this can be a new feature or there is another way to fix the problem we're missing?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • korbaach I'm looking the variable to store the image data and the NWjs.DroppedFile saves the folder direction of the image in the PC not the data. So if i export the sprite data .jSON if somebody in other PC loads its if not have the image in the same folder none image will be loaded. For that i used Base64 because i not found another way to save data in .JSON.

    Is there anyway to manipulate binarydata in the sameway as Base64?

    Also when a file is dropped all the sprites changes their image to the last image dropped, because they share the same image texture.

    How i can tell that every time a file is dropped creates a new sprite and load an image without share it with an other instance of the sprite? Or not is possible? And in case of not, how solve it to drop various image files and show all the diferent images??

  • Ah! i don't know the sprite load image also get that. (I knew URL and URI(base64 but not also binary data)

    I'm using Base64 for store the image data in a variable. So after i save all values in an array and export the array.asJSON,etc...

    So in a new running of the app if you load that .json all the composition and images are loaded.

    Then, seems i can store the binary data in a variable instead the Base64 to after apply using Load image URL? I'm going to try it!

  • 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.

  • 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.