Joe7's Forum Posts

  • Hi,

    after some playing with the javascript-library JSC3D for loading obj-files, I've created a little plugin to use it within C2.

    Update: Please update the plugin - version <font color="red">0.3</font>

    Updates in version 0.3:

    -) Hopefully fixed the WebGL bug.

    -) Changed actions: values for loading time and scaling/rotation- can get set - depending on the complexity of the object.

    Sidenote: The object in the demo is very small - scale it do 100 (- realsize is scalefactor 1 -) to see it.

    <font size="1">Woohoo - works even now on my old android 1.5 device (5 FPS) ( - the canvas is on the wrong position but for now it's ok <img src="smileys/smiley2.gif" border="0" align="middle"> ). </font>

    Demo + Plugin version 0.3

    _________

    Update in version 0.2: Objects are now on their own canvases in C2 - seems it worked only with WebGL disabled.

    Demo + Plugin version 0.2

    (The button "reload" and the first loading doesn't work in the webdemo. It works locally - perhaps i've given to less loading/rendering time. Maybe the other buttons work fine in the webdemo.)

    _________

    The plugin "Object 3d" can load and render an obj-file into the canvas of Construct2 and can do some simple transformations (rotate, move, scale) with that object. The plugin doesn't work with the "Preview".

    Actions 0.1:

    <img src="http://dl.dropbox.com/u/31151399/Construct2/Plugins/joe7_loadObj3d/actions.png" border="0">

    Properties 0.1:

    <img src="http://dl.dropbox.com/u/31151399/Construct2/Plugins/joe7_loadObj3d/properties.png" border="0">

    Demo 0.1

    Plugin 0.1

    How to load a obj-file:

    specify the path at the properties:

    <img src="http://dl.dropbox.com/u/31151399/Construct2/Plugins/joe7_loadObj3d/pathObj.png" border="0">

    my obj-file is located next to my capx in a folder "obj":

    <img src="http://dl.dropbox.com/u/31151399/Construct2/Plugins/joe7_loadObj3d/pathObj2.png" border="0">

    After exporting you should get a file c2Jsc3d.js - this is for the loading - please don't delete it.

    <img src="http://dl.dropbox.com/u/31151399/Construct2/Plugins/joe7_loadObj3d/path3.png" border="0">

    How you can create obj-Files: Blender, Wings3D, Art of Illusion,..

    Notes:

    1) Version 0.1 can load and render only one obj-file.

    2) The plugin is in alpha at the moment. However it works sometimes.

    DEVELOPMENT: >=0.2: The rendering is done in an offscreen-canvas because I suppose the c2-runtime doesn't like a direct rendering-repaint-thread. The "estimated time" is the time that this rendering/repainting thread should take until it gets killed. If anybody knows a better way - let me know.

    All suggestions are welcome, <img src="smileys/smiley2.gif" border="0" align="middle">

    Joe7

  • Two other possibilities:

    1) If Php is a friend of you then you can do this comfortable with the AJAX-Plugin:

    Tutorial

    2) If you want to store something on a client(= eg cookies) than the testing would be big part - if you want that your game runs on many devices (Pc,I-phone,Android..). If Javascript is a friend of you then you can do "the local storing" this with pure Javascript and the Call Javascript-Plugin.

  • Much work suggest:

    When we post tutorials in our native languages it would be awesome to do "something" that classify them for this language - perhaps similar to Wikipedia. Some of the "native tuts" are copies of already written tuts - it would be nice when they stick behind the original and that we could open them by clicking on a language-link. I know that this is a little work ( <img src="smileys/smiley2.gif" border="0" align="middle" /> ) for the site-admin but that will be very handy - and there would be no "native instances" on the tutorialspage of one tutorial <img src="smileys/smiley1.gif" border="0" align="middle" />

    Simple suggest: Perhaps a simple classifcation could be done with the "tags" - nice example for that: the "Russian tutorial" - is tagged with the "Russian Tag ".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • AnImAtIoNs: Have a look at the platform-tutorials.

    CHanGE direction of the bullet: you can use a instance-variable direction. This variable should changes the walue when you press left or right. At the shooting: Change the angle of the bullet depending on "left" or "right". quick and dirty example with your file

    : Please use dropbox for your files.

    names of your sprites: sprite1, sprite2, sprite3 are useless and unreadable names in porgrammlogic. Give them names that describe their task eg: Player, Bullet, ...

    Joe7

  • I haven't found any rules for the tutorials. I have only found tips for a "good" tutorial (How to write a good tutorial). Perhaps this should be corrected - but i mean not good to bad <img src="smileys/smiley17.gif" border="0" align="middle"> . It think that the language should be English because postings in another "native language" are useless for the community and when the content is wrong or not poltical correct.. but the characters look funny.. <img src="smileys/smiley1.gif" border="0" align="middle">

  • Plugin ajaxPost is no option? <img src="smileys/smiley2.gif" border="0" align="middle">

  • Thanks for the very quick reply.

    No problem to work around but i still wanted to know if theres a hidden feature. <img src="smileys/smiley2.gif" border="0" align="middle" />

    Joe7

  • Hi,

    i've a simple question:

    Is it possible to make an or Condition in C2?

    When a variable has the values 0,1,2 and I want a condition like that:

    if (variable= 1 or variable =2) --> Actions

    What i usually then do is to invert the condition:

    if not (variable = 0) -> Actions

    Is there a way to make this with or?

    Thanks,

    Joe7

  • works nice <img src="smileys/smiley1.gif" border="0" align="middle" />

    a friendly suggestion: It would be nice to see the values of the actions:

    "is counting up with a limit" <--- "to 1000"

    [Should work with inserting {0} at the actions in edittime.js] <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Kyatric: thanx, the plugin works great with that. ("Hello" & newline & "World") <img src="smileys/smiley1.gif" border="0" align="middle" />

  • hi,

    because the Ajax-post-Plugin isn't available i've created a new one (based on the AJAX-Plugin).

    Usage like AJAX-Plugin with the difference that you can post the data via POST. <img src="smileys/smiley1.gif" border="0" align="middle">

    <img src="http://dl.dropbox.com/u/31151399/Construct2/Plugins/ajaxPost/usagajaxPost.png" border="0">

    Plugin ajaxPost

    postExample.capx (HTML-Div Plugin for the example)

    ajaxexamplePostData.php

    All suggestions are welcome. <img src="smileys/smiley2.gif" border="0" align="middle">

    Joe7

  • Thanx septeven ,

    in that cases your plugin works perfektly. What I want is to produce a linebreak when there "comes" a text: "line1 \n line2"

    action: textobject.set Text to("line1 \n line2")

    output:

    line1

    line2

    I've found out, that i can do this with the plugin "JesseJoh's HTML Elements Pack" with <br>-Tags.

    Edit:

    Ok it works with \n when I read strings from php or external javascript.

    g, Joe7

  • Hello Pode,

    how can i create a new div-object? Whenever I create one I get in Preview

    "Assertion failure: No project JSON model available Stack trace: assert2((void 0),"No project JSON model available")@http://localhost:50000/preview_prelude.js:12 ()@http://localhost:50000/preview.js:217 ([object HTMLCanvasElement])@http://localhost:50000/preview.js:112 ("c2canvas")@http://localhost:50000/preview.js:10 ((function (a, b) {return new e.fn.init(a, b, h);}))@http://localhost:50000/:86 ([object HTMLDocument],[object Array])@http://localhost:50000/jquery-1.7.1.min.js:2 ([object HTMLDocument],[object Array])@http://localhost:50000/jquery-1.7.1.min.js:2 ()@http://localhost:50000/jquery-1.7.1.min.js:2 ([object Event])@http://localhost:50000/jquery-1.7.1.min.js:2"

    In your example capx:

    When I create a new div-object I get the same error. When I create a new instance of your div-object and change the innerHtml it works fine? Strange.

    Edit:

    Ok, found out that the original Plugin (Download posted by Kyatric: "some temporary upload") doesn't have this problem. <img src="smileys/smiley2.gif" border="0" align="middle" />

    Edit2:

    With the original Plugin the preview works fine but in the exported project all font-colors are white and the background too <img src="smileys/smiley4.gif" border="0" align="middle" /> --> Add the style="color:red" and you'll see the characters.. <img src="smileys/smiley17.gif" border="0" align="middle" />

    thanx, Joe7

  • Hello septeven,

    is it possible to make a manual line break - perhaps with \n or <br>

    I haven't found out what's the different between the Property Linebreak "auto" and "manual". How can I make the text "line1 line2 line3" shown in three lines?

    thankx, Joe7

  • The most time Preview is ok for me.

    I often export a project when

    #) I forget that the Preview works fine in most cases,

    #) developing/testing a plugin,

    #) and using/loading external data (javascripts, JSON-data).

    Why? The "local" error logs are more confortable for me to handle. It's not very important but would be convenient.

    thanks, Joe7