Mikal's Forum Posts

  • Try this version of localForage.js in the addon:

    sendgb.com/FQ3rBVs0MY1

    It looks like the old (1.4) localForage lib was not initializing due to how the top level function was declared / exported for C3 (it caused an error.)

    So, I updated to version 1.9 and added a declaration of globalThis.localforage2 = localforage_js; at the end of the localforage library.

    It seems to work now (at least for start time, get away time and print the expression of timeElapsed.)

    Good luck!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can you share the entire file or perhaps the modified addon, I want to see the context of where you define const localforage2.

  • In runtimes, at top of each file try adding:

    const localForage2 = globalThis.localForage2;

  • Thanks to the C3 team, I was able to add in Editor render of the 3DObject plugin. I also added rotation, scale props with automatic model local center during model load.

    (The in editor view is not released yet, will be added towards the end of the week.)

    Example below:

  • In my case this is for the 3DObject, so it can render with different Z Elevations in Editor and Runtime based on Z Elevation.

    I currently have rotation and scale now working in Editor, it would be great to have access to Z Elevation also, so it can also be reflected in Editor. Example below:

  • I saw that, thanks Ashley! I will get some time to take a look later this week and I hope to add editor 3D rendering of 3DObject soon.

  • Ashley In case you want to see what I am working on to get more info for your decision, here's a link to the addon and sample project.

    kindeyegames.itch.io/c3-3dobject-alpha

    Here's a link to one of the scenes of the project, which can be used for testing performance on different platforms. With this model and movement, I'm getting around 50k-60k polygons on a desktop, around 30k on an iPhone and around 10k on the Raspberry Pi (though again, the plugin is not optimized at all yet.)

    kindeyegames.com/3DObject003

    Fighters are spawned 1 per second, each is 926 polygons. Arrow keys move view.

  • Ashley Nice addition of changing the vanishing point in the latest beta, this will also help some with 3DObject. Have you thought any more about documenting Quad3D2 in editor/runtime? Any other questions I can answer if you need other information from me?

  • I do not use C2, if someone else wants to port it, they have my blessing!

  • Ashley Thanks for the considered reply. I think I do appreciate the limitations here (in my past life I developed ASICs for modern video game hardware, PC and console. So, yes, more on the hardware side, but I understand GPU/CPU tradeoffs for performance.) So, even though we have to upload vertices every frame and we can't use VS for things like rotation or deformation/animation, a good experience does still seem possible offloading that work to the CPU and requiring per frame vertices upload.

    I think it would still be interesting for a range of games on a range of platforms.

    Developers would need to focus on low poly models in general and especially for the lower end devices, however in C3 we do develop games that focus on different platforms (e.g. some focus on PC/Console, some focus on higher end mobile, some across the full range, down to low end mobile.) So at least for the PC/console platform it should be possible to have a number of models. The fighter model is in the 900 poly range, I've seen other low poly models in the hundreds range which look pretty good.

    Without any optimizations, I've tested some 3DObject models on my iMac and get 100k+ polygons at 60fps, on my $120 Raspberry Pi 400 I get around 10k+ polygons.

    As with 3DShape, it would need to be used in moderation. For example there have been a number of GTA2 examples done using 3DShape for buildings and playing with the coming vanishing point and just a low poly car or two would look pretty nice in my opinion. Thanks for considering the request.

  • Ashley I will amend my request, can you please add Quad3D2 API support/documentation for both runtime and editor? This work on 3DObject is done in the spirit of 3DShape which also uses Quad3D2, not full 3D, but 3D to enhance the C3 2D environment, leveraging C3 behaviors and integration with other C3 objects.

  • Ashley - can you please add the Quad3D2() API to the editor iwebGLInterface, similar to how Quad(), etc. are available? I am working on the 3DObject plugin and currently I can render it in the runtime, but I think it would make it more user friendly, if I could also render it in the editor w/ control via drag and drop and properties, similar to how is done today with 3DShape.

    My goal is to make 3DObject have similar behavior to 3DShape, but allow for loading of a little more complex models and textures using obj/mtl with some controls for scaling and rotation initially.

  • Thanks for all the replies and encouragement, when I move to a stable release, I will add more details on usage and models. (I am learning some myself as I look at all the different variations of obj/mtl/png formats that I see available.)

    Right now it's still more of an Alpha test targeted to people already a little familiar with 3D and 3D models and their formats, to see if it is worthwhile to continue work with.

    Also for better user interface, I have requested for the ability to render the 3DObject in the editor also. The thread is here if you care to support it: construct.net/en/forum/construct-3/plugin-sdk-10/request-add-access-quad3d2-161210

  • Another example 3DObject moving using scene graph as child to a parent sprite tweening Z elevation and orbit behavior.

  • I am developing a 3DObject plugin to complement the great new 3DShape recently released into C3 stable. 3DObject can import 3D models in the obj/mtl/png gltf embedded format. I intend for the final version to be simple and well-integrated into C3 (for instance, behaviors like 8 dir, drag and drop work, for controlling X,Y location of the 3DObject work now.) Low poly models work better in terms of performance.

    The current version is in Alpha and still has lots of rough edges (e.g. the 3DObject shows up in the editor as a placeholder sprite, only at runtime is the 3D model rendered.) The 3D model is rendered in editor.

    If you know a bit about 3D models and can work with Alpha (early release) SW, please try it out and give feedback or show what you have done with it. The itch page describes some of the process and limitations, it also describes possible features to add in the future. Below are some examples (example project included.) 3D Animations are not supported, but may come later after release of a stable version w/o animations. 3D animations in gltf are supported.

    Try it here: kindeyegames.itch.io/c3-3dobject-alpha

    X,Y,Z rotations, integrate w/ other C3 objects (e.g. rotating sprite)

    Using 8 dir on sprite to control 3DObject

    Compatible w/ obj/mtl/png files generated by KenShape