Ribis's Forum Posts

  • > Ashley, would you consider to allow us to switch the framerate mode in realtime?

    No, that's not a solution, it's just a hack which only raises further difficult problems, like: how do you know when to turn it on? There are thousands of different devices out there with different hardware and different software configurations. And if you get it wrong, you'll drain the device battery, which is a worse problem than you started with.

    In the devices with low performance caused by driver issue the fps are terrible making the game unplayable. Imagine someone who want to play your game, it download the game, then after some minutes you get 1 star rating complaining that more "advance" games run with no problem, so the problem must be the game, and in fact it is...Driver issue!

    As I said before, my friend with a good phone was unable to play because of the bad performance. I tried to change the framerate and the game at that point was playable and the fps were good.

    There could be several to know when you turn in:

    - In empty layout, if the fps are low change framerate mode after some seconds.

    - Allow the player to decide in the option if they want to boost the game as a lot of games do.

    Don't take my wrong, I'm not saying that the battery is not an issue, but the player must decide about it. Take for example Sky: the children of light. It completely drains out your battery, it allows you do decide the framerate and the performance. I played that game, I tried it. Even while you charge the phone the battery goes down. Is it a problem? yes. Do people still play it? Yes!

    A gamer knows already that by playing a game the battery will be suck it up. This hack will allow people with driver issue to play the game. Then, the decision is on the player if keep playing even if the battery goes down quickly, or stop playing. So, if there is a way to change the framerate mode in real time I don't understand why don't allow the developer to change it.

  • For the record, since the introduction of WebGL in 2011, Construct games have rendered almost identically to native games. WebGL is basically OpenGL exposed to the web. So it's basically using the same rendering API as any other native game using OpenGL. (With WebGPU, this analogy will continue, but being more or less equivalent to the next generation Vulkan/Metal/DX12 APIs.)

    The main difference introduced by browsers is the driver blacklist. There are many poor quality drivers out there. These can crash and glitch and ruin games. This is a serious problem faced by many native engines. There is little anyone can do about it. Sadly the state of graphics drivers continues to be poor. (Hopefully the next generation APIs help with this, since they allow the drivers to be much simpler.) Browsers blacklist known bad drivers so you get software rendering instead. This means the game runs correctly, but slowly.

    So barring some kind of obscure browser bug we don't know about yet, the only explanation seems to be the graphics drivers. These are still a problem no matter which technology you use. You may find that when using some other game engine, it seems to be faster, but then you later run in to the crashes and glitches that the browser makers were trying to avoid. This can cause even worse problems, such as the game crashing or just showing a black screen on various types of Android devices.

    So while you may claim that Android performance sucks, I think really this is just driver blacklisting on a small number of devices for a good reason. It's a matter of picking your poison - do you want software rendering or the risk of crashes and glitches? I think the former is the right choice.

    Changing the framerate mode will only make this worse. It doesn't make anything faster, it only changes when frames are scheduled. Unlimited framerate mode will allow powerful devices to run up in to the hundreds, or even thousands, of frames per second, promptly drain the battery, and earn you poor reviews.

    I completely understand the frustration with the drivers. I'm so far happy with the performance of Construct3, and most of the performance issue depends on how the events and how much we push the cpu itself. Today my friend tried again the game with Adreno 618 and strangely after one month it runs 60fps with no problem. Maybe the phone did some updates and now it works as excepted.

    Ashley, would you consider to allow us to switch the framerate mode in realtime? I have actually did some test with it and I confirm that in some old devices if we enable the unlimited fps the game does run smoother (from 45 to 65 for example). So, it could be a possible solution for slower device. If we detect really low fps for too long we could switch framerate and push a little bit harder the CPU right?

    I wouldn't concern about the battery issue. There are plenty of game that drain out the battery even while you charge the phone. These would be limited only in old phone I guess

  • RibisI had a test version on google play, but google censored me for the murderer boy scene ... (now he's a 21-year-old fat guy ...)

    Lol. You can published ad internal tester so that I don't think they can't censored it until you published it. Message me at Ribis#7413 on discord, I would like to test it on my device. Also I think you need to specify the audience target at the beggining?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not yet in this step. However did you check if you turned off the test mode in construct 3 and in the admob platfor website?

  • Hi Ribis,

    thank you so much for your help!

    I just made a pretty interesting test.

    If I do:

    Condition: Google Play is loaded

    Action: "Add product ID" with type and "Complete product registration

    it does fire on every tick (as expected)

    BUT if I do:

    Condition: Google Play on loaded

    Action: same as above

    it doesn't fire... I do not understand why.

    How is this even possible :D

    On the screenshot I posted, the event run under On start of layout and it works good.

  • Hi Ribis,

    I did some more testing.

    " it can be quite annoying for someone to wait 2/3 seconds before the game start"

    you mean each game? Like each round?

    I am pretty sure you only have to sign the user in once the app starts, or when the user loses internet (many people do "on signed out > sign in" in that case).

    Yeah, I mean only at the beggining of the app. it is still annoying in my opinion.

    Regarding my overall problem of my in-app purchases not working:

    I think it all comes down to X (inverted) Has product "myIAP_product" is first true and only after a couple of ms turns true if Has product "myIAP_product" is being detected.

    Therefor my app starts reacting though the IAP has not been purchased and then gets mixed up when it changes.

    I thought when On store registration success fires only one state is returned. Not first 0 then 1.

    Has anybody have any experience beyond all this guess work?

    To sell a product, you have to make an action saying "Purchase product "product name" that you loaded earlier".

    then, you make an event to check the condition of the purchase. On product "product name" Purchased success, or on failed....etc

    But first of all, you have to register all your products when you start the game.

    You can even have a condition to check if the product were registered successfully or not. I always double check this before an user buy a product. if for some reason the product were not registered on start of layout (missing internet for example) before buying it I have a function that first register the product, and on registration complete, then buy the product.

  • Up for question 3. In my game I have to sign in in everytime the game start. If I don't find a solution I will just disable it since it can be quite annoying for someone to wait 2/3 seconds before the game start. I tried to make an event checking if the user is already signed in. But I guess the google plugin in order to work must check if the player is signed in. I might be wrong anyway. I did these testing a month ago and I quite don't remember all the test I did.

  • I CAN get it run fast if I set the frame rate mode to Unlimited, but I'm told that I shouldn't do that in a release build because of battery drain (and some other reasons?). I would probably prefer to set this mode for the older devices that run the engine very slow but I don't think there is a way to switch this mode at realtime :(

    Actually this can be a solution even if is not elegant. I have thought about the same when I was testing my game in lower end device. I did several test, and if the frame is set to unlimited in some old GPU I can get the framerate up to 60fps.

    Ashley it would be possible to add a feature that would allow us to change the framerate mode in real time? or even if we need to start the whole game? we could easily made an event that if the fps drops below 30fps for more than 5 seconds then the framerate mode can change allowing us to run the game smoother. This could be a quick fix for the GPU that strangely run badly.

    The only problem I encounter with my game is that run better on Adreno 405 than Adreno 618, and this of course doesn't make any sense. Also, because the cpu was running low and the fps wouldn't go up to 25fps. While in older device, the CPU gets even at 70% running at 60fps with no problem.

    If your game run really bad in high end devices, or even on medium device released in 2017/2018, then means that you are doing something wrong. After several test, I can say that a low resolution will drastically increase the performance. I use the 1024 x 576 with full screen quality set to low. The sprites should be also small, not more than 1024. For the design or particles I use all tiled background, and I keep al my sprite with a small size. With this method my game run smooth in most the devices I tried (9/10) with levels with over 1000 objets.

    The only things we can do is help each other testing our game in our devices so that we can blacklist the devices that run our game badly before release on the play store. The problem will be solved over time. Mobile are getting faster and faster every year.

    Taximan I really like your art style! I would be happy to try out when you have a beta version ready!

  • I would suggest you to use array for the most important things. Save and Load state for example are helpful to save quick checkpoint in the level itself, but then you should remove the save state once the level is done for example.

    If for example you you need to remember what item the player took, which door the player unlocked, or some kind of states, use an array and save it as JSON in the local storage. I usually assign the X or Y to the IID of the specific object, and update the array accordingly.

    When the player start the game or the level, you would need to just load the JSON from the local storage and push it into the array.

    In my opinion, Save and load state should only used for quick savegame and not to store the whole game. So that, even if you update the game, you could eventually detect the update and force the player to start from the beginning of the level.

  • Hello there,

    I remember that once I saw an example as shown in the picture below, but I can't find it anymore

    What I'm trying to achieve is having a group of block with the same identifier variables, that are attached like a chain. However, when you drag and drop the last block (a variable might decide it), all the blocks should move like a tentacle. They should change angle accordingly to where the last block his. Basically, the block should never make a white space or separate them.

    I have tried different time but I never got a result I expected. I'm sure there is needed some math formula to figure out the angle for each blocks.

    the movement should be no more than the perimeter of the max distance. Meaning that if you move the last block too far, you don't want to split the blocks.

    Thank you

    Tagged:

  • > The level is not linear, meaning that it can expand horizontally and vertically. Also, some platform can rotate and move. So my concern of having an array with fixed angle wouldn't allow me to change the angle on dynamic platform. Still, I could do it for the static ones, that are the most used... However, I would still need a system to get the angle for the dynamic platform.

    Yeah, that approach will work for static platforms.

    I may be able to give you more ideas, if you could share how is your terrain going to be 'moving' or rotating? I can't relate, because of the sketch above, I am guessing it is made up of triangles, how are you managing the movement, a screenshot or video might help.

    I do have some ideas in mind, but it all depends on how your terrain is created (if it can be recreated differently maybe?).

    The solids are sprites and they can be angles or squares. Most of them have a triangle collision because I guess it take less resources to check the collision. So to make up the terrain that the user will never touch below, I use triangle collision. The difference between the static platform and dynamic platform is that the dynamic can move and rotate without using any behavior. I differentiate them because the dynamic platform have the designed attached on it, so when they move the graphics needs to move accordingly. Also, the dynamic platform can form a "unique" platform that can move all together using the pin behavior. Both solids are in the same family, so in my logic I'm checking the collision on the family.

    It is important to note that the player can't move if the degree is of solid is close to the 75 degrees. The example that provided is really good, because even if the player get even extreme angle, I could still use another event to limit the range angle of the player. Also, the angle that needs to be changes is only on the animation, not on the player platform behavior, forcing the player to don't move in right angles.

    I will post a gif of the game soon. Thank you!

  • What I would do is:

    Before game starts, spend around 1 second, to (automatically) survey the terrain and store 'angle' data in an array. That way, all the CPU-consuming tasks (collision-checking for angle detection) will be done beforehand and not in real-time.

    For example: Use the Ray-casting method by (above), and have it run along the terrain rapidly (use object time-scale if possible), and as it moves, every X distance, it checks the angle and stores in an array.

    Then, when the player uses the terrain, based on the X location, it uses the array data to set angle.

    Just a thought. What do you think?

    This is sounds the best approach I guess. But could you elaborate a little bit more? The level is not linear, meaning that it can expand horizontally and vertically. Also, some platform can rotate and move. So my concern of having an array with fixed angle wouldn't allow me to change the angle on dynamic platform. Still, I could do it for the static ones, that are the most used... However, I would still need a system to get the angle for the dynamic platform.

    With the collision checks I did, it basically works with any solids of a specific family. But still, 2% of CPU is quite a lot. It is actually one of the most consuming CPU events.

    Does anyone know some math formula that would help with it? I can try to find a solution using only the player sprite with the x offset collision. This would decrease the check collision I guess. The game run smoothly already, but still 2% it seems quite a lot

  • Hello there,

    The game display well on the mobile chrome. I have been exporting the same game (different versions) hundreds time for andorid and it always worked fine. However, in the last export it is seems that some sprite/tiledbackground get overwrite with other texture. I always used the simple minificaion and the resample image options.

    As you can see in the screenshot, the player solid sprite overwrite what the sun, and what the joystick circle suppose to be. Another time, when I exported the project some sprite textures were completely glitchy.

    How I can check if my projects has been corrupted somehow? I usually save a new file (so no overwrite) every time I do some major changes. And I never got any problem. I'm sure that this depends on the spreadsheet. Is there a way to reset all spreadsheet somehow? I have 100 of sprites with animations...

    Tagged:

  • I put together a simple demonstration for you. It's the surface normal you want, not reflection. My bad.

    It is far from perfect, just an idea.

    https://gofile.io/d/VUZlpB

    Thank you for the awesome example, I did a quick test however the performance are about the same.

    Forgive me if I misunderstood your question but to simplify your current method could you not just check for overlap on the player sprite at an X offset?

    Yes, I tried it but for some reason it doesn't work. I would take a better look. I did the X offset from a specific ImagePoint.

  • Hey!

    Maybe try the line of sight raycasting? You can get the reflecting angle from that.

    I knew that the sight raycast is helpful if you want to integrate it when you are using enemy or similar. How would you apply in this scenario?

    Also, I'm checking only the terrain solid visible on screen, and also I have an extra event that's disable all collision based on the distance. But still, 2% of the CPU is too much. Is one of the most high % of my events.

    Thank you