eski's Forum Posts

  • I'm doing an inventory and want to drag objects out of a static placeholder slot. Without changing much of my code, I would like to spawn an object with drag-and-drop behaviour and force it to start dragging in the same event. Currently, I can't get it to do that without doing a second touch.

    The only way I see is to change the setup to a is touching event and have a bunch of variables to check for multi-touch on other items.

    I feel like this was an option in C2, might be wrong.

  • While updating a 5-year-old game, I noticed the ads weren't showing consistently. Just got this error from Google: the "Smart banners" in the Mobile Advert plugin are no longer supported. Google points to using the new adaptive banners instead.

    The plugin doesn't have that option, but I'm using standard and large options, and they work.

    Just wanted to point this out, if anybody else has had issues with ads not showing, it might be this setting.

    developers.google.com/admob/android/banner/smart

  • Indeed, will do when i get the time :)

  • I just noticed this in my debug window. When it's separated, I don't get the red area that indicates breakpoints.

    I forgot I had one and the game froze and it wasn't before I set the debugger back to the game preview I saw I had hit a breakpoint. I could step through there, but not when it was on its own, just grayed out. Anybody else seeing this?

  • I'm using Google Play as well, but players of this game are often offline, which is why I'm relying on local storage.

    I was just reading more about local storage and noticed it offers "Persistent storage" which I can't remember was an option when I published, could maybe help to "bake" the data further down.

    I actually got a report that one user had missed all the local storage data after swapping out a phone battery. The game went to the starting tutorial stage, which is weird. Looking into using the CGS to save all the data online :)

  • A normal user doesn't force close a mobile game after a session. As far as I know, the default state of C3 is to enter pause mode when it loses focus, so it shouldn't be running anything unless it's being played.

    Being punished for this, sure... I clearly need to catch when the game loses focus and save it in that state. Doesn't really explain why it went this way, though. As this is an offline game, I have no other way to save a persistent score.

    I always thought that the local storage is written into the games' "browser" memory, so updating the phone or system browser shouldn't affect that.

  • I released an Android game in 2020 with the latest C3 version. In it, I use local storage to store high scores and other information.

    It's a puzzle game, and each round is intended to be played within an hour or so in one go, but some of my users play it differently. The longest session I know of is about 4 months. The game was always running in the background while the user used other apps on the phone.

    Just now, one user had the highest score ever when he died, and it wasn't recorded in the local storage. There is nothing in the code that explains why it wouldn't happen, but my ONLY explanation is the session's extreme duration.

    I have tried to recreate this error but creating these long sessions obviously takes a long time... :P

    My only solution to brute force fixing this is to systematically write the current status to local storage, or maybe there is a function for that when the app loses focus.

  • Cool, got it working with id from the URL.

    I can publish and retrieve scores through the engine, but there seems to be an issue when viewing them on the website. Get this error when opening the leaderboard.

    HTTP 500

    An error was thrown trying to serve this request. It has been logged, and an engineer will fix it soon.

  • I'm trying out the new Construct Game Service. Mainly interested in the leaderboard system as it looks to be easier to manage than the Google system.

    It's easy enough to implement the login and all that but to publish score to the leaderboard i need the ID of the leaderboard. I must be blind or something, I can't see it anywhere on the CGS site. I only see the gameID and the name i use for the leaderbord. There is nothing about the leaderboardID on any of the pages for the leaderboard. Is it somewhere else?

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm doing a simple CCTV app that has multiple video files. This is used as a movie prop, so certain scripted actions are allowed. For example, videos can be shown full screen or in a 2x2 grid, paused or rewound, screenshot, etc.

    I'm having some issues with playback. The videos flicker for a moment before playing. I have them all preloaded and ready, but it still seems to disappear for a couple of frames before playing.

    Each video is 720p, about 30-60 seconds long, and about 30 MB in size. They are encoded as h264 MP4 files.

    In fullscreen mode, my workaround has been to play video 1, and when the user wants the next video, I start video 2 underneath. I then check if it's playing and destroy video 1 if video 2 is playing. I would do that for every following video. This seems to fix the frame disappearing problem, but I lose the first frames of playback.

    In grid mode, the videos sometimes appear at different times, so they don't start playback at the same time. Still working on a fix for this.

    I know C3 might not be the best tool for creating stuff like this, but I'm just so accustomed to it :)

    Should I use the WebM codec instead of H264?

    Should I preload the videos differently?

    Should I be using an HTML Element for this instead?

    Any tips appreciated.

    Tagged:

  • I'm developing a lot of small apps used on a movie set. They are mainly quick emails, messages, photo viewing, or new sites. I often need to make minor updates to text and graphics, and usually reupload them to the same online path.

    The problem with that is that when the page loads, the cache is still old, and the browser randomly refreshes items. So it could update some of the text, but not all the graphics. Even doing a new incognito window doesn't always work. The strange thing is that it doesn't even always work to delete all cookies and cache. The only sure thing is that I create a new folder for each upload and version up, so that it would be domain.com/app/sc101_v1 and then domain.com/app/sc101_v2, etc.

    It feels like it wasn't always this hard to get this working. This might have something to do with the offline checkbox in the export settings?

    Is there another secret approach I can try besides the previously mentioned stuff, F5, and Ctrl+F5?

  • Just while writing this I thought of a hacky way to fix this.

    Create a sprite and using the HTML Element position at function I can have it follow my button. Then I can just use the Touch object to do my bidding! :P

    But, it would be nice to have those built into the HTML Element object...

  • TLDR: Is there any hacky way to get "on hold ID/class" and "double-click id/class" on an HTML Element object without going to JS?

    Longer version:

    The touch functions on the HTML Element are quite limited compared to the touch object. There, we have double tap, on hold, and more.

    I'm looking for a way to do a hold function on a button that I'm using in the HTML element without going into too much custom JS. My though was trying to do some hybrid of Touch object and getting info from HTML Element but those two don't share information, that is, the HTML Element can't be selected as a object in the Touch object.

  • Ok, so I'm a bit rusty on the libraries, was quite sure that NW.js wasn't only desktop exports :)

    I also somehow managed to overlook the File Chooser plugin and went straight for the File System. I got this all working now on desktop and mobile without any outside tinkering.

    Thanks for the help guys!

  • It's strange that the file dialog for the nw.js plugin doesn't work, right?

    I'm trying to do this all vanilla C3 but if that is not possible I will look at a third-party approach. I am not sure how to implement this Java code to my project but I guess there is some tutorial for that :)