kmsravindra's Forum Posts

  • Havok, Thanks. I added this to the wishlist.

    Jermfire, the method you showcased is pretty good...However I see some complications adapting this method to Zuma type game especially with curved paths and making the shot ball part of the chain ( addressing prob#2). The closest option that I could think of is option#4 as I mentioned above but I am trying to validate the performance when the game is finally made with this option - especially with certain levels having twisted paths (there could be 120 to 150 static sprites in addition to the moving balls....)

  • Being able to add curve paths during edit time (if possible dynamically be able to create paths at run time as well!) and making the sprites move along the curved paths is definitely on my wish list. Without such a functionality, its very complicated (with several trade-offs ) to build games like Zuma.

  • Hi QuaziGNRLnose,

    I am trying to build something like as in here - http://threejs.org/examples/webgl_inter ... inter.html

    I understood that I have to use the Q3Draycaster for this and tried working my way with the plugin. I have looked at the example of Raycaster and viewports.capx in this regard.

    However, I am stuck with some basic questions like -

    1. how do I pickup the cube and limit the cube movement in 3d axis while moving it only the grid.

    2. how to move it step by step on the grid in x or y directions (exactly into the square positions) along the grid

    3. Should I make the grid a Q3DModel object having one single object OR multiple square Q3DModel objects connected together?

    4. How can I place the cube only on top ( if there is a cube already at the bottom) etc., To do this, would I need to use collision testing feature as well?

    5. I think I can pick up the cube using the 2 conditions - Q3DViewport projection point in frame to mouse co-ordinates and Q3Dviewport --> Project,pick 1st, then I see I can pick-up the cube? Then should I use Q3Draycaster to move the cube along the raycaster? If so, how can I move along the raycaster? (Also, I assume I have to position the Q3Draycaster to cameraposition.xw, cameraposition.yw, cameraPosition.zw and direct it at the highlighted cube model?)

    Do you see this as relatively easy one to build OR slightly complex? Any quick helpful pointers on how to achieve this functionality would be really helpful.

  • I wanted to create a Zuma styled game something like this in C2 - http://www.codethislab.com/bozze/codecanyon/sorcerer/

    I am trying to solve 2 problems.

    Prob#1: Make objects move along smooth curves. To create curved paths at the edit stage with less manual effort on which the objects with bullet behaviour can move along smoothly.

    Prob#2: When a ball hits the chain of the balls, how do I position the shot ball to be a part of the chain and move all other balls in the chain either forward / backward along the curve? I want to achieve this functionality with very little manual effort in the design stage.

    • Beizer curves are not supported in C2, making it very complex to have objects move along curved paths smoothly.
    • Have tried the below options but nothing appears to be a good option. If someone has any better suggestions, let me know -

    Option#1. With Waypoints - I have to create too many way points to make the objects go smooth around the curves...(This might bring the performance down?). The positioning of the waypoints etc., is not very automatic and precise to make objects move along the exact curves smoothly.

    Option#2. Pode Spline path behavior - Doesnt really seems to be an option with no control on speed and to make the balls stop/proceed in the chain as per the bullet behavior. Again my second problem is also not solved with this anyway. The balls definitely should have bullet behavior so that they can be stopped / moved at will in parts of the chain. This cannot be achieved using spline path.

    Option#3. I tried placing multiple imagepoints along the curved path and then dynamically create waypoints. Again with this method, I had to create and place too many waypoints to make the object move along a smooth curve and do lot of manual precision efforts in placing the imagepoints exactly along the curve path image. Does not seem to be a very good option.

    Option#4. Create a static chain of circles from start to end along the curve path in the design stage itself that will act both as waypoints and as a placeholders for the balls in the chain as they move forward/backward - This method seems to solve both of my above problems but it involves lot of manual effort for each level. Also the performance might decline because of too many static objects.

    Any better techniques / plugins / behaviors that solves both the above problems, then let me know.

  • Thanks! With this said, I am really enjoying developing with Q3Dplugin so far and I plan on building some interesting stuff in the near future...Cutting edge technologies always have few trade-off's and I tend to look at the brighter side of the things

  • In addition to the performance suggestions from QuaziGNRLnose in the above posts, here is the summary of performance optimization findings with whatever limited features (and with my limited knowledge of the plugin) I have used so far...These could be helpful to optimize the performance for someone trying build such apps, especially for mobile.

    -----

    • A balancing act : If I create and destroy too many models upfront, then the FPS dips to pretty low rates. Rather, I saw optimized performance, understandably, when I create/destroy a group of them at different times OR you could even consider dynamic loading if the .js model files are very small.
    • Optimization when using morph animations: The morph animations seems to account for major percentage of "kb" in the .js files. So if I try to consolidate many morph animations of the same model with different animation names into a single .js file, then the size of the .js file becomes too large when loading for the first time to cause a enough pause/dip in FPS. Rather a dynamic loading of each small file seemed better from user experience perspective.
    • Beware of Transparent objects : Making a model transparent ( with draw sides of front and back) makes the model appear patchy...probably a threejs limitation but definitely brings the user experience down when this feature is used. I also noticed that having the transparency on, made the performance little bit lower, for valid rendering reasons, ofcourse! With such limitation, the user experience is still a compromise if you want to show transparent objects.
    • Lights on mobile? : With addition of even a single light, the performance on iPad2 ( I haven't tested on other mobile platforms) is pretty low. So need to get rid of all lights if you plan to launch it on iPad2 ( and probably true for many mobile platforms as well!).
    • .js model file size: if the .js file to be loaded is very big ( lets say more than 2Mb or so), then there is quite a good chance that the model will not load on iPad2. So try to have smaller .js model files. Not sure if .obj files are smaller in size and load faster than .js files? If some experts could comment, please welcome.

    ----

    Not sure if its related to performance but I observed that the navigation seemed slightly jittery in iPad in-app browser ( when launched as an app) compared to running the same app on the iPad safari browser when in online preview mode. Again, could be a limitation from Apple to support such stuff...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • QuaziGNRLnose, thanks a lot. I will change the code as you mentioned in the behavior runtime.js as I am overdue to submit the app to app store. Also thanks for the tips on performance. If any of this performance improvements help it to run smoother on iPad, I want to put "lights on" in my app for that extra effect.

  • QuaziGNRLnose, When I am use morph animation "DO loop and do ping pong" mode - then I see that the animation once it reaches the last frame momentarily jumps back to first frame ( seen like a flicker) before it starts going back from last frame to first frame. The same DOES NOT happen when I use "DON'T loop and do ping pong". If you want to verify this, you can verify it in the .capx file that I shared with you.

  • cjbruce, the simulations look great! I would love to hear if your group would be interested in leveraging our content / partnership. I could think of several areas where we could compliment each other's strengths very well.

  • Sure. Thanks!

  • QuaziGNRLnose, few updates from my side -

    1. I have followed what you said about initialization ( "created model, loaded .js file, destroy on model created" sequence for each .js file) and it worked pretty well without any lags! Though it looked funny just to create and destroy Q3Dobjects in the C2 code, I think it made sense from a threejs perspective...However, a neater way could be to have such stuff abstracted from the user, if possible...Anyway, thanks a lot for that tip.

    2. I also happened to figure out that one of my .js model file was quite big ( something like 5 MB) that was causing the FPS drop...When I optimized this .js model file, I was able to get it working on iPad!

    The js error with switching layouts still remains if I dont take care of that in the C2 code...

  • Understood. I will give this early loading a try. Also I hope you were able to reproduce the error I mentioned above...Thanks!

  • QuaziGNRLnose, Understood...I am not complaining...After all you really dared to make a great plugin that lot of us could not even imagine...

    So in the same capx file that I sent you, if you can "toggle disable" the following lines -

    • Disable Line 2 till Line 11 ( here is where I am checking if it has already come to this layout before, then using these events)
    • Disable only "System first time = 0 " condition in Line 12
    • Disable only "System first time2 = 0 " condition in Line 22

    If you observe, I am almost doing the same thing between Line 2 to Line 11 as between Line 12 to Line 22 - The difference being checking for "On model created" event in Line 12 to 22 and not checking for the same during LIne2 to LIne 11.

    When I run with the above mentioned lines disabled in the below scenario, I get this error -

    Here is how to create this scenario -

    1. Choose a cylinder shape and click Nets ( Now for the first time it works fine)

    2. Go back using 3D shapes button

    3. Again click on Nets ( Cylinder shape is chosen by default anyway)

    4. I get the JS error as mentioned in the image.

  • Thanks I am sending the .capx file right away. Could you please respond to this question as well ( that I edited later in the above post..prob you might have missed it)

    One more C2 coding related issue while using Q3DMaster -

    While shuttling between layouts that use Q3DMaster objects during game play, I observe that there are few issues. For the first time when I go to a layout using Q3DMaster, then it loads all the objects for the first time...Then lets say I go back and come back again to the same layout...When I come back again to the same layout I believe it assumes that all Q3Dobjects are already loaded etc., so action-events like "on model created" give a javascript error ( I think it assumes the model is already created)...This is adding an additional burden to figure out in C2 code if I am coming to this layout for the first time or later and accordingly add some repeating logic w/o "on model created" action etc., Will it be possible to see if this could be simplified in the plugin ?

  • QuaziGNRLnose, This is great to hear!

    I had one more performance hitch while using morph target animation. Just when the morph target animation begins, I notice that the FPS drastically falls to 1FPS or so momentarily and then again picks-up the next moment to 47FPS or so. And this happens for the first time when the model loads...I belive this drastic momentarily decrease in FPS is causing a problem to load on iPad. Whenever this is happening, the iPad safari browser again tries to reload the same page (note that I have got rid of all Q3Dlights in my code for performance reasons).

    Here is what I am doing in the code -

    I am having only Q3DModel object but am loading a .js model dynamically using "change model" action. Then on model created, I am calling "play morph animation". I have also tried to pre-load the .js model files at the start of the layout but it didn't help in the performance issue. I am assuming that this issue is happening somewhere between loading the model and then playing the animation "on model created" because I also notice that the model doesn't load instantaneously for the first time (it takes 0.5sec to 1 sec gap to load)...However this happens only for the first .js model file...Later models load and play animation almost instantaneously though I am loading the remaining models, dynamically, as well using the same action - events...I very vaguely remember I didn't observe this hitch when I was using v-2.2 plugin...Not sure if something changed in the code for v2.3...Any ideas what could be wrong? I have spent several hours building models in blender to launch this app in iPad and got almost everything working except this...I can share the .capx in a PM if you want to take a look.

    One more C2 coding related issue while using Q3DMaster -

    While shuttling between layouts that use Q3DMaster objects during game play, I observe that there are few issues. For the first time when I go to a layout using Q3DMaster, then it loads all the objects for the first time...Then lets say I go back and come back again to the same layout...When I come back again to the same layout I believe it assumes that all Q3Dobjects are already loaded etc., so action-events like "on model created" give a javascript error ( I think it assumes the model is already created)...This is adding an additional burden to figure out in C2 code if I am coming to this layout for the first time or later and accordingly add some repeating logic w/o "on model created" action etc., Will it be possible to see if this could be simplified in the plugin ?