Toby R's Recent Forum Activity

  • Updated the original post here. I made and released [MM_Preloader] plugin.

    With this plugin you can preload objects, custom items and even layouts which allows to make any loading screen including loading screen between layouts with progress bar and animations. It does not fake preloading, it is a real preloading and it does not "mask" the screen freeze, but it gets rid of it.

    Layout preloading is a feature that has been requested many times in last several years. Now it's finally possible to do it in C2.

    Quick example:

    If you have any questions regarding this plugin please use this thread:

  • Overview

    v1.5.1 update (2017-11-11)

    • * Fixed a bug where in some cases the preloader was not preloading objects after toggling between the same layouts or unload/preload sequence.

    v1.4 update (2017-08-17)

    • Plugin is now compatible with C3 (c3addon added to the pack)
    • Fixed an issue where plugin could have a problem with detecting if an object was already preloaded or not in certain cases

    v1.3 update (2017-07-29)

    • Lazy preloading added. Preloads with specified interval. Potential use case: preload next layout while playing the current one

    v1.2 update (2017-06-27)

    • Spriter SCML objects compatibility adjustment

    What is MM_Preloader?

    It's a plugin which handles any type of preloading:

    • Layout preloading - preload elements of the next layout to get rid of layout transition lag
    • Layout initialization - hook any custom functions to preloader: AJAX, import, multiplayer connection, required calculations, etc.
    • Lazy preloading - slowly preload elements of the next layout while playing current layout
    • Loader layout - game initial loading screen

    Does this plugin just calculate the % or really preload items?

    It is a real preloader. With a single action MM_Preloader finds and preloads (loads to memory) all Sprites, Tiled Backgrounds, SpriteFonts, SpriteFonts+, TileMaps and even Spriter objects of the selected layout. You can also preload custom objects or actions.

    How do I use it?

    Simply add items to the preloader's list and trigger Start action. Plugin will automatically preload and calculate the current preloading progress based on number of added items (and their current preloading state). While it's processing you can use expressions to fetch current state of preloading.

    What can I preload?

    Really anything. The best feature is the ability to preload assets of layout you are switching to, so it's possible to make a preloader between two layouts (not possible by default in C2).

    You can use it on Loader Layout and easily make the initial preloader of your app.

    It is also possible to add custom items which means that you can preload sounds, AJAX fetching progress, Ads, multiplayer connection, etc.

    Can I make visual preloading?

    You can make any visual appearance you want. MM_Preloader does not draw anything, it just preloads and calculates the progress. Based on the current progress you can make any visual custom preloader you need.

    Warranty

    This plugin has lifetime warranty.

  • Hi GIMO2017,

    I sent you a private message. You won't be able to reply directly to this message since you don't have enough reputation points on this forum yet, but I left my contact details there.

    PS. To read the private message, please click the "PM" button on the top right corner of this page.

  • I've just uploaded version 1.1 to store (will take up to few days to be approved to store I guess).

    Added Is video loaded condition which returns true if video is preloaded and ready to show, or false if it's not ready yet.

    This will simplify the process I mentioned in previous post, so no variable is needed any more.

  • I wrote an article for Neexeen.com regarding loading time optimization. I think you may find it useful.

    Article: Construct 2 - GAME LOADING TIME OPTIMIZATION

    PS. With approach I write in the article I managed to make Full HD app load in 1s on Samsung Galaxy Prime, but it obviously depends on the size of your project.

  • I'm not quite sure if I understand what you need exactly but if you want to be able to trigger the video under else condition than you can use a variable to indicate if the video is loaded or not as on the example below.

  • Hi Toby, thank you for your prompt reply. I have figured out the reason and now the video is able to be shown. It was due to Admob filtering settings.

    Regarding the error message, it was shown whenever I tried to initiate the C2 "Run Layout" function:

    Javascript error!

    Uncaught TypeError: Cannot read property "load" of undefined http://localhost:50000/CocoonRewardedVideo_plugin.js, line 151 (col31)

    Not sure if this is related to what you have mentioned above?

    Kind Regards,

    Paul

    Hi Paul,

    Glad to hear everything works fine for you now. Yes the JS error is exactly what I was talking about. The library is attached during wrapping on Cocoon server, which means it's not available in the preview on PC.

    The quickest solution is to add condition that checks if the project runs on PC or mobile and trigger "load" action only when it's on mobile as in the example below:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi, I have purchased this plugin yesterday and have added it to my project, linking the event sheet from this plugin to my other event sheets and assigned the buttons for showing reward video.

    I have just published my game on Google Play Store but upon tapping on the assigned buttons, there was no response at all. May I ask why is that?

    In addition, when I include this event sheet with my other event sheets, it would cause C2 preview function error.

    For your information, I have already inserted the Admob ID to the plugin.

    Hello. The event sheet is just an example to show the plugin's actions so you shouldn't include it in your project but instead create code based on the example.

    You did not write what's the error message in preview attempt, but I guess it is the information that Atomic Cocoon plugin is missing? In such case you can add additional condition to load/start the ad only if the project runs on mobile or on Canvas+ (if you use Canvas+). The Atomic plugin is the code which Cocoon adds while wrapping the app.

    It's also hard to tell why the ad is not showing without seeing your project setup. You could install wrong library/plugin in Cocoon panel or maybe your AdMob account is not fully active yet? Have you set up payment options for your AdMob accout? Have you tested your app with test ad unit first which was provided in the example capx?

    The plugin itself works well on around 15 projects right now and there was no issues. That's why my guess is that it's something wrong with your setup.

    Send me the capx and information of how is your app setup on Cocoon if possible, and I'm sure we will find and fix the problem.

  • I've try it and it works good

    but can you add condition of "Video on Loaded"? because it needed for checking if the user has good connection or else.

    Hi ,

    The condition you mention is there already

    It triggers once the video is preloaded. If this is not what you need, then please explain in more details and I'll try to add it ASAP.

  • Can you post a screenshoot of the same layout (as you posted with black bars) with C2 preview?

  • Then I would guess that you lack graphic elements on top and bottom? Try to preview in C2 and resize your browser to have the same ratio as the mobile device you're testing on and see if there are black bars as well.

  • I've just updated the first post, added some points to "Quick portfolio lookup".

Toby R's avatar

Toby R

Member since 23 Mar, 2015

Twitter
Toby R has 18 followers

Connect with Toby R

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x6
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies