Mikal's Forum Posts

  • Some answers:

    1) You can have multiple bound boxes in the Spine project and C3 can differentiate between multiple bounding boxes at runtime. (The expression for the bounding box center and for the poly points use slot and bounding box name.)

    2) The bounding boxes in Spine just provide position and poly data in C3, for hit box and collision, you would still need to align some other sprites with either the center position or use a mesh to have it follow the poly points. I don't think you can get away without having _some_ sprite along with the Spine object. It has to do how the Spine object is rendered, it's basically rendered into a texture which is then used as texture for a rectangular C3 drawing object, so C3 is not aware of all the pieces being rendered. Check out the example project on github for the image you showed below, it shows how to use the poly point of a bounding box to deform a C3 sprite.

    Performance wise, using just the bbox center and a C3 sprite will be faster, because you can just set the position of the sprite in one action. To match a changing bbox (e.g. deform) with a sprite w/ mesh points will require more perf due to C3 calculations of bbox, etc. when mesh points change.

  • I would also like to add Editor (and runtime) render of changing the Z elevation of the object (how far or close to camera), but currently the C3 SDK does not support it in editor. I have requested this in the new C3 suggestion platform.

    If you would like to see 3DObject rendered correctly in the editor (with location, scale, rotation _and_ Z Elevation) can you please upvote the suggestion here:

    construct3-21h2.ideas.aha.io/ideas/C321H2-I-32

  • Thanks, will add to the new suggestion platform.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley any thoughts on including this to the SDK? If it exists, perhaps another nice alternative would be to add AddCommonZElecationACEs() (if that's available like AddCommonApperaranceACEs(), etc.)

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

    sendgb.com/upload

    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!

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