istavang's Recent Forum Activity

  • No I dont think, I will ask permission

    u can try 3d makehuman free software and apply bvh animation in blender on maketarget and print out 2D spritesheet maybe ? then it gets pro , but a little work

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Everything required to load an object is explained in the example. It's possible the model you're exporting/importing is too big in your 3D editor, try scaling it down if its importing but not appearing. The update will make things easier with regards to this kind of stuff, so hold out a bit till then.

    just a quest , can we use 2 or more q3d plugins on same layout ?

  • Hi there,

    Download links are right here:

      JSON v1.1

      (2014-04-17) JSON v1.0 (2014-03-21)

    I'm not entirely confident in how it was designed, so I want to leave it as a Work in Progress for a while. So please don't build important project with it yet, as I want to be able to move things around (create/delete condition/action/expressions) to release a clean plugin.

    Here is the basic documentation:

    1 - Design specificities

    All Conditions, Actions and Expressions accept at least an Origin and a Path parameter.

    The Origin can be either:

    - root: meaning from the base of the object

    - current: from the current path that is either automatically set by the foreach condition, or set using the Set Current Path action

    this allows you to be more concise and also some kind of recursion (to inspect an unknown JSON for instance)

    The path parameter is used to travel through level of depth inside your object (a bit like an URL).

    For example, if you have the following structure:

    {
       "Wizard": {
            "stats": {
                "hp":80,
                "mp":120,
                "str":2,
                "dex":2,
                "int":16
            },
           "spells": [
    >             "Fireball",
    >             "Poison",
    >             "Meteor",
    >             "Ice Storm"
    >         ]
        }
    }[/code:3r0vqt1q]
    You can access the hp of the Wizard property like this:[code:3r0vqt1q]JSON: Set 100 at root@"Wizard","stat","hp"[/code:3r0vqt1q]
    You would build this path the same way you add parameters to a function in the Function plugin
    
    A little important note, In an expression, you have to use 0 or 1 as first parameter. 0 stands for [b]root[/b] and 1 for [b]current[/b].[code:3r0vqt1q]JSON.Value(0,"Wizard","stat","hp")[/code:3r0vqt1q]Is an expression which returns the the hp of the wizard.
    
    This design allows you also to export from and import into any part of your object. For example, if you have different sources of JSON file, you could build an array or a dictionnary (Object) of those inside one JSON object.
    
    With that out of the way, let's list all we can do with the plugin.
    
    [b][h2]2 - ACE[/h2][/b]
    
    [h2]Conditions:[/h2]
    
    [b]Is object[/b] - v1.0
    Returns true if the value at the given path is an Object (type of value holding key/value pairs like a dictionnary)
    
    [b]Is array[/b] - v1.0
    Returns true if the value at the given path is an Array (type of value holding a simple list of numerically indexed values)
    
    [b]Is boolean[/b] - v1.0
    Returns true if the value at the given path is either true of false
    
    [b]Is number[/b] - v1.0
    Returns true if the value at the given path is a number
    
    [b]Is string[/b] - v1.0
    Returns true if the value at the given path is a string
    
    [b]Is null[/b] - v1.0
    Returns true if the value at the given path is null
    
    [b]Is undefined[/b] - v1.0
    Returns true if the value at the given path doesn't exist
    
    [b]Is Empty[/b] - v1.1  *New*
    Returns true if the value at the given path is empty.
    If the value is an object, empty means 0 members
    If the value is an array, empty means 0 elements
    Otherwise, empty means undefined (i.e. a boolean, a number, a string, or null will be considered not empty)
    
    [b]For each property[/b] - v1.0
    Loops through the value at the given path. The value should be an object or an array. 
    And order cannot be predicted.
    To loop through arrays you should use something like :[code:3r0vqt1q]System: repeat JSON.Size(0,"my","path")[/code:3r0vqt1q]
    go through your array using :[code:3r0vqt1q]JSON.Value(0,"my","path",loopindex)[/code:3r0vqt1q]
    
    [h2]Actions:[/h2]
    
    [b]Set New Object[/b] - v1.0
    Creates a new empty object (list of key/value pairs akin to the dictionary) at the given path
    
    [b]Set New Array[/b] - v1.0
    Creates a new empty array (list of numerically indexed values) at the given path
    
    [b]Set Value[/b] - v1.0
    Sets a string or number at the given path
    
    [b]Set Boolean[/b] - v1.0
    Sets true or false at the given path
    
    [b]Set null[/b] - v1.0
    Sets null at the given path
    
    [b]Delete[/b] - v1.0
    Deletes the property at the given path (future access will be undefined)
    
    [b]Clear[/b] - v1.1  *New*
    Clear the object/array at the given path, if the value at the given path is neither an object nor an array, it will be deleted (future access will be undefined)
    
    [b]LoadJSON[/b] - v1.0
    Loads any kind of JSON string. It will internally build a JSON object from it.
    
    [b]Set Current Path[/b] - v1.0
    Sets the current relative path of the JSON object. Allows you to use some shortcuts when writing path and to loop through properties recursively.
    Example:[code:3r0vqt1q]+ some condition
       -> JSON: Set Current Path to root@"my","path","to","an","array"
       + System: repeat JSON.Size(1)
          -> Text: append JSON.Value(1,loopindex) & newline[/code:3r0vqt1q]
    To list all the values of an array at "my","path","to","an","array
    Without using Set Current Path, it would look like this:
    [code:3r0vqt1q]+ some condition
       + System: repeat JSON.Size(0,"my","path","to","an","array")
          -> Text: append JSON.Value(1,"my","path","to","an","array",loopindex) & newline[/code:3r0vqt1q]
    
    [b]*LogData[/b] - v1.0
    That's the only thing without any path property, it allows you to log in the browser's consol:
     - the entire object
     - the current path
    
    [h2]Expressions:[/h2]
    
    [b]Length[/b] - v1.0 - deprecated in v1.1
    Returns the Length of the array at the given path. If there's no array at the given path, it returns 0 (maybe should return -1)
    
    [b]Size[/b] - v1.1  *New*
    Return the size of the array/object at the given path (-1 if not an array/object)
    Replace the deprecated Length expression
    
    [b]Value[/b]
    Returns the value at the given path. 
    If the value is:
     - a string, it returns the string
     - a number, it returns the number
     - true, it returns 1, false, it returns 0
     - an array, it returns the string "array"
     - an object, it returns the string "object"
    
    [b]ToJson[/b] - v1.0 - deprecated in v1.1
    Replaced by AsJson for coherence
    
    [b]AsJson[/b] - v1.1  *New*
    Returns a JSON of the data at the given path
    To export the entire object as JSON, do[code:3r0vqt1q]JSON.ToJson(0)[/code:3r0vqt1q]
    
    [b]TypeOf[/b] - v1.0
    Returns a string representing the type of the value at the given path:
     - "string" for a string
     - "number" for a number
     - "boolean" for true/false
     - "array" for an array
     - "object" for an object
     - "null" for a null value
     - "undefined" if there's nothing
    
    [b]CurrentKey[/b] - v1.0
    Returns the current key in a foreach loop. Outside a loop returns an empty string "".
    
    [b]CurrentValue[/b] - v1.1  *New*
    Returns the current value in a foreach loop. Outside a loop returns "undefined" (probably)
    
    [b][h2]3 - Use Cases:[/h2][/b]
    
    [h2]Class mecanism[/h2]
    [img="https://dl.dropboxusercontent.com/u/23551572/C2/plugins/json/proto.png"]
    gives you this kind of console output
    [img="https://dl.dropboxusercontent.com/u/23551572/C2/plugins/json/proto-console.png"]
    and now (v1.1) in the debugger:
    [img="https://dl.dropboxusercontent.com/u/23551572/C2/plugins/json/debugger.png"]
    [url]https://dl.dropboxusercontent.com/u/23551572/C2/plugins/json/demo/prototype.capx[/url]
    
    [h2]Inspecting an unknown JSON[/h2]
    
    [url]https://dl.dropboxusercontent.com/u/23551572/C2/plugins/json/demo/inspection.capx[/url]
    
    If you have other interesting use cases or any kind of idea to improve the plugin don't hesitate.
    To be honest, I'm more interested in making the current features more accessible/understandable than big new features, but I'll stay open minded (:. The main reason I go through this Alpha phase it to make sure the plugin won't be a pain to use or behave unexpectedly.
    
    Also I didn't implement yeah all the C2's save/loading and debugging system. I want to wait until we are sure the plugin is solid and stable.
    
    [h2][b]ChangeLog[/b][/h2]
    v1.1 - 2014-04-17
    [ul]- implement save/load/debugger
    - ToJson deprecated and replaced by AsJson for overall coherence
    - change the brackets syntax for a less confusing one (I hope) [code:3r0vqt1q]before: root["Wizard","stats","hp"]
    after:  root@"Wizard","stats","hp"[/code:3r0vqt1q]- change Length for Size and handle object/array return -1 for anything else
    - isEmpty condition and Clear action for array and object
    - add a CurrentValue property
    - in foreach loop reset the current path to the path given at the begining on each iteration, this way we can mess with this current path to our heart content within the loop
    - more reliable logData[/ul]
    

    could u load animation object json or md5mech or simelar objects with this

  • Ubivis

    Thanks, I also have no idea why it could be related with tmx.

    It might be the job of Q3D plugin I guess.

    Opps sorry , my wrong .

  • I re-factory tmx importer, and JSONtmx importer, to merge the interface (ACE table) into one plugin, and plus two parsers for JSON and XML format.

    Here is the documents (include sample capx)-

    rex_tmx_importer_v2

    tmx_JSON_parser

    tmx_XML_parser

    Briefly.

    [quote:19e2zxxt]rex_tmx_importer_v2 + tmx_XML_parser = tmx importer

    rex_tmx_importer_v2 + tmx_JSON_parser = JSONtmx importer

    Now user could change the JSON/XML input format by only change one action ("Action:Import tmx").

    The older plugin might be deprecated.

    General Quest:

    is it possible to make a genaral package importer plugin

    for importing eg .bvh animations or simaler ?

  • No, loading animations is not supported yet.

    I like your answer "yet" so it should be possible in near future .. ?

  • Node-webkit should be working, in fact it works better than any of the browsers (except possibly chrome), you have to disable "minify script" on export though, since minifying is not currently supported (this plugin uses loads of external dependencies and is a huge headache to make minifiable).

    EDIT: hmm, the previewing in nodewebkit works but not the export, not sure whats happening so ill have to investigate.

    EDIT 2: Looks like it might be a bug with the exporter too, i got exported node webkit to work but i'm getting some errors on export but not on preview, which is very strange. Everything might work if you export without minify, but this bug is a bit unsettling. seems related to custom functions declared as instanceProto (no idea why they're breaking only on export through nodewebkit but not preview though, Ashley might know)

    is there any where or way to set or activate the animation in js json object , function ensureLoop ( animation ) as in three.js examlpes : webgl_animation_skinning_morph.html ??

    https://gameportalen.com/three.js-master/examples/webgl_animation_skinning_morph.html

  • > Ubivis It might be a problem with the UV's of the model using texture repeat, and tif files aren't supported by browsers so try converting the textures to png. you might need to set "ST wrapping" to "repeat wrapping" on the texture you create for it to work properly i think for this model, but even then it might not look right because of the specific engine this model was made for or program this file was exported from so you may have to fix the uv's yourself somehow in blender.

    >

    Converting to png was the first step I did.

    I will try to recreate the texture with blender... so far, works great. What I got so far is an editor where I can place houses (at the moment, just cubes as long I really understand the model loading) in real time and saving it as a json file to reload my design.

    quest : how do u save as json in blender?

  • Been having a play with the plugin and while it is early days, I certainly can see some potential for it. The main issues are mainly to do with events and interactions...namely iterating through instances and collision detection. Also, some sort of layout editor (or use of the three.js online editor) will be a must for anything more complex than a procedurally spawned game .

    What is planned as far as collisions? Will it be auto cubic bounding boxes that rotate with a model or just a spherical, non rotating box? Of course options are always a good thing. The ability to use another mesh as bounding box would be great, though I am not familiar with the capabilities of the Three.js engine.

    Currently I am noodling with a prototype of a basic 2.5d shooter to learn the plugin. I have basic player movement and camera down fine. I can fire one bullet, but the issue becomes how to control instances. Of course this is all handled under the hood with normal C2. How would I check for its position to destroy offscreen? I can create multiple bullets but they all have the same name and only one responds to actions. I have tried using object>create>create by cloning but can't work it out...

    cheers...

    Please upload your capx for better helping on ur ecsact isue

    "allso encourage all to do so for time saving learning and help to benefit all"

  • I got the camera to work! Sort of, though you have to use arrow keys to look around. I would prefer mouse movement look around, but here you all go! First person view look around. I'll see what I can do for mouse look around also.

    https://googledrive.com/host/0B8m5DDRra ... 1fUWtfSW8/

    Please upload your capx

    allso encourage all to do so for time saving learning and help to benefit all members <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Dancer is a special .ogg and .wav file player, featuring a dancing puppet.

    This fun app is part of (or example to) a tutorial I want to post soon, about the lesser known or used ACEs of the XAudio2 object, mainly Peak and RMS.

    Play around with Dancer, it really makes fun!

    The puppet has no premade animations or anything else premade. It simply reacts to Peak and RMS in various combinations!

    F1 toggles a context help.

    If you don't have some .ogg music at hand, here is one of my own songs. Please don't use it in any way other than listening to:

    http://www.mediafire.com/file/d6a4tcx5a ... of_you.ogg

    There are some sources for .ogg music, e.g. http://www.01audio-video.com/download_ogg.htm

    And you could convert some of your mp3's to ogg. Audacity does a good job.

    Download Dancer: http://www.mediafire.com/file/b3vw5whkv ... Dancer.rar

    EDIT: Just wanted to mention that the level meter are absolutely professional in resolution and display, including dynamic range meter...tulamide2011-07-25 10:30:13

    do u have time to possibly convert this to capx ?

  • Just picked this sucker up yester and I'm having a blast . Kinda reminded me of my old CC3d days, but without the tear inducing calculations and cries of "why won't you rotate correctly?!". So far I've managed to make something of a very simple 3D platformer, and I plan on seeing just how far I can go with just what's available right now, although I'm quite excited for what's coming up.

    BTW, to everyone fiddling with camera stuff. TiAm's MouseLock Plugin might prove handy if you haven't already gotten it

    encourage all users to upload there capx working mockUps progress are welcome in here for faster learning from and to benefit for everyone , comming soon with one myself .

    thanks and lets have fun

istavang's avatar

istavang

Member since 25 May, 2013

None one is following istavang yet!

Connect with istavang

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

13/44
How to earn trophies