fuego96's Recent Forum Activity

    Now to the question at hand. How to call an audio file from a web server.

    , the WebAudio API goodies aren't available to video unfortunately.

    mchulet, Animate, Carbincopy, I recently needed to do this and came up with a workaround (albeit hackish). So if you want to try, here goes.

    This involves modding the Scirra audio plugin with a small change to the runtime.js and edittime.js

    In my case, i just needed to reference .mp3's managed by a CMS exposed as a static site directory from a remote domain (ie. a web server). To keep things simple let's assume only using the Chrome browser and that mobile devices are out of the picture (I didn't need it in my case).

    Let's say that our MP3 files are at http://www.yourdomain.com:8080/tracks/

    1. Backup Scirra's audio plugin in case it gets messed up.

    2. Edit the runtime.js and add a line after 3401 like so.

    3. Edit the edittime.js and change line 71 to the following.

    BUT... and here's the complicated bit.

    4. You'll need to be the administrator of said server and be able to configure the appropriate Cross-Origin Resource Sharing (CORS) to ensure that your C2 application is allowed to GET those mp3's from wherever origin (domain) you're getting it from. Also note that when configuring CORS, you need to include the origin's port number as well (if any).

    That's basically it.

    During authoring time, just enter the URL (where the Folder property used to be). After a successful test, you can then think about reading an external JSON, iterating over an MP3 playlist and feeding the filenames to the (modified) audio plugin as a next step (see demo below).

    Here's the modified plugin dialog for Play (by name) action. Notice the empty Sounds/Music folder:

    Finally, doing it this way would allow the continued use of the WebAudio API, filters and stuff. You get the idea.

    EDIT:

    How about an app that's hosted in Scirra Arcade which gets its audio from another site? Perfect example.

    https://www.scirra.com/arcade/other-games/q3d-c2-webaudio-api-demo-again-15356

    EDIT 2:

    If you have previous C2 projects using "PlayByName", beware that the above "hack" will break your previous project. However, the proper (less hackish) way that doesn't break previous C2 projects would be to extend the existing audio plugin with a new action, say "PlayFromURL", instead of modifying "PlayByName". But this requires a bit of plugin development know-how from your side to get done correctly (but is relatively easy).

    I tried to looking for a Select All command to select all instances of an object in the editor, but I was surprised that there isn't this ability. Can we get this in C3 if not C2?

    CTRL+A doesn't work for you?

    What about this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the link! I've been through the examples, and don't see how this helps. I've tried all of the expressions and haven't been able to find any expressions that map 3D screen space (x,y,z, with a perspective camera) to the 2D screen (x,y in flat screen space)....

    cjbruce Ah... I just realized that the example didn't actually return any screen space coordinates. It uses "container" to "pin" the text to the Q3D Model. Sorry, but you're right. Getting the screen coordinates for a Q3D object would be pretty useful indeed. Will let you know if i find anything as well.

    EDIT: Correction, the example does return screen space coordinates. Try adding an extra action to the existing example as shown here.

    Shows the screen space per Q3DModel by the .xw and .yw properties

    The only problem is that, it works if your Q3DMaster camera position is static. You'll have to account/calculate the new screen space manually when the camera moves, which I guess you're probably already aware of

  • If you're wondering why your Q3D app isn't displaying properly on your smartphone (LG V10 in my case), try setting "Use high-DPI display" to "No".

    Also, don't use Chrome Beta for Android, touch controls are buggy for some strange reason.

    Now I can check Q3D performance on my smartphone (actual screenshot here).

    Feel free to post your phone's make/model and how many FPS you had.

    https://www.scirra.com/arcade/other-games/q3d-the-baked-room-scene-with-mobile-controls-13979

    LG V10

    Fullscreen = 43-46fps

    Non fullscreen = 53-60fps

    (lowest-highest fps)

    EDIT: Hmm... performance seem to vary according to the device's power management, such as when you drive around for 5 minutes and the smartphone start to heat up, thereby reducing thermal margin and the PM throttle's down the CPU/GPU. It's better when deployed as an Android (.apk) app.

    On the first try with Android OS 4+ (Lolliepop) (Webview), the app ran at 60fps like the Chrome browser app but running entirely in fullscreen with very little heat dissipation for more than 10 minutes. About 30 minutes later and it got only fairly-hot but not as extreme as when it was running in the actual Chrome browser app, however the FPS remained at 60FPS. After quitting and re-launching a few more test builds, it never went back to 60FPS (just around 39-45FPS). Strange.

    EDIT2: Found the main culprit that downgraded the speed. Now the .apk works PERFECTLY like I initially experienced. And the culprit in Intel XDK was this setting.

    Just uncheck it. The app will still run in fullscreen anyway -- but way faster (screenshot below).

    Feasibility test complete.

  • ...Collider Fit is independent of physics... ...Oimo Physics bodies have their own independent collider...

    QuaziGNRLnose

    Ah, indeed they ought to be different. Was fooled and couldn't immediately see the difference between the two, sorry.

    I can understand that the Oimo Physics collider shape is initially bound to DefaultShape0 and that one could simply create a separately-sized box (collider) shape for Oimo Physics, but shouldn't the physics behavior initially have its own separate box collider adhering to the size calculated by "Collider Fit: Model"? It only seems natural.

    QUESTION: Is there a Q3D Model expression so I could query the Collider Fit calculated width, depth and height -- so i could then automate the resizing of DefaultShape0 ?

    It's about automatically creating (physics-based) multi-level grounds and walls that have been sized and pre-positioned in Blender. Personally, it's hard for me to pretend that it's better to scale/position them in C2 when clearly, external 3D editors are purpose-built for these things -- depending on the game type of course

    Many thanks for the previous response, and nice work on the manual -- helps a lot!

  • My very first Q3D test scene

    https://www.scirra.com/arcade/other-games/q3d-the-baked-room-scene-13979

    QuaziGNRLnose dear sir, would there be any way of accessing a mesh from the 3D scene?

    It would be nice if I could simply reference the walls that are already in a scene (not necessarily from another individual model) to add box colliders. Like maybe...

    ...so the "Model Meshname", if not empty (nor misspelled) *and* exists in the scene, would get used. Would be nice not having to recreate/re-position separate box colliders (for the floor and walls). Maybe a new "Q3D MeshBinder" plugin perhaps?

    Speaking of colliders, "Collider Fit: Model" doesn't seem to work.

    The boxes and the first platform (left) are primitives made by Q3D, the second platform (right) is from Blender whose (Q3D Model) collider fit property is set to "Model". The collider debug shows the correct size, but the box still falls through.

    Here is the .capx file (with the blender file in the Files Folder).

    http://crxmedia.com/test/ss/BoxColliderFitModelTest.capx

    EDIT: Changing the values here...

    ... to larger XYZ values would increase the BBox and solve the collision issue, at the cost of changing the size of the model and negating the intention for "Collider Fit: Model". Sadly this would mean that I have to key-in the dimensions for every wall (and endure the tedium of object placements).

    Here's hoping it's an easy fix.

  • ...Does anyone have a quick and easy way to map 3D space to the 2D screen so that I can label the players?

    Here's what I am looking to do:

    cjbruce Q3D has a V-2.2 example called "Position & Rotation actions.capx" which should serve your needs.

    https://dl.dropboxusercontent.com/u/82947809/Q3D_Release_Examples/Q3D_V_2_2_Examples.zip

  • X3M Issue report.

    I am getting zero values for Mesh.MeshPosX, Y and Z -- again.

    You've made fixes to this before in v0.4 but were somehow not applied to v0.5. Here's a hint.

    (The screenshot above are the runtime.js for the plugins MeshArray and Mesh respectively)

    Please do have this in v0.6

  • X3M Issue report.

    The behavior of Mesh.MeshSetRotation() is the same as Mesh.RotateMeshBy().

    I need a mesh to follow the exact orientation of another mesh with every tick. But MeshSetRotation() adds to the previous angular values, just like RotateMeshBy().

    Is this normal?

    (Or is there a way that I have yet to pick up on?)

  • ...@twg You attached the camera to controls? In this case if you move around with the keys and rotate the camera with mouse can you see anything?

    twg Ditto what matriax said. It's likely just behind the camera (if you didn't get any errors). Also just in case it's a lack of lighting or lack of texturing issue, set the Scene object's debug enabled property to True. During your preview, the debug options will appear and allow you to set the rendering mode to wireframe. And to see if your mesh exists in the scene at all, checkmark the "Mesh Tree" option.

  • X3M Just FYI, I've created an anim via NewScene and OBJJS-Mesh as per your previous instructions and here's the error.

    I've double-checked my model and bones many times. Even tested it in pure BJS without problems.

    http://crxmedia.com:9180/test/anim

    (The skeleton is indeed driving the worm mesh)

    It is understood that by B3D version 0.6 it would be working better, but just know that the (OBJJS-Mesh, Babylon Skeleton) "Create animation range named..." action currently doesn't work. Looking forward to version 0.6 (really need skeletal animation).

  • Whats the name you have given to the worm mesh ?

    X3M The mesh names are from the green tip with the eyes to the blue tail:

    cy0, cy1, cy2, cy3, cy4, cy5

    All of them are children of "Armature".

fuego96's avatar

fuego96

Member since 18 Jul, 2015

Twitter
fuego96 has 2 followers

Trophy Case

  • 9-Year Club
  • Popular Game One of your games has over 1,000 players
  • Email Verified

Progress

11/44
How to earn trophies