Ribis's Forum Posts

  • ALWAYS test your game on 3 different devices (low/medium/high specs). This might seem obvious but is not. For testing, I mean installing the app from the store. Preview mode gets close to the real specs, but sometimes the app runs slight different from the app (for Android). If you do not test the game and you do not apply good practice regarding events, you will hit a huge wall that will force you to rebuild the whole game. I'm saying that because I hit that wall. The game I was working on years ago would run 60fps per second on my old laptop. On my phone, was not playable, because it was extremely laggy. The suggestions below apply to any game, however, you might skip some of the steps if the game you make is really simple. So, these steps are the ones I'm taking when making a complex/big game.

    This is how I improved my games, to make sure they would run fine on mobile:

    - Always test several event logic on a separate project, and check for the best performance. Ask the forum if you might think there is a better way to achieve what you are looking for. Someone else might already encounter the same problem.

    - Use overlapping and on-collision when is REALLY needed, otherwise, use distance.

    Avoid physics if you can replicate it using events or scripts.

    - Do not make a frame bigger than 200px if possible (in the animation tool).

    - Use groups to organize your events. For example, if you are making donkey kong country, you might want to organize the code as follow:

    - Group events regarding the barrel launch

    - Group events regarding item

    - Group events regarding specific enemies

    - For platform 2d, I find out in my case that tilemap would work less efficiently than using tiledbg, here is more info: https://www.construct.net/en/forum/construct-3/general-discussion-7/mesh-distortion-editor-155675

    Once you have the groups, enable/disable them based on when they are needed. For example, you might want to enable the group barrel launch when the barrel is on screen, and disable it as soon is not in use.

    - It extremely helps to set a really small viewport size and use the scale view. I have noticed a huge increase in performance and the graphic still looks good.

    - Set downscaling quality to Low. I do not notice a huge difference with the medium downscaling.

    - Once you are happy with the results, start stressing your game by adding hundreds or thousands of objects to see what is the limit.

    From my test projects, I was able to run a Donkey Kong Country remake on low-spec devices (like an iPhone 5s), at 60fps per second. My current game, which is pretty complex (like a mix of Super Mario World and Donkey Kong Country) with additional features, such as items inventory, dynamic light, dynamic weather...etc., runs at 60fps on low specs.

    Before using the techniques above, the game I'm working on, with a simple graphic, fewer layers, no weather/light, no items, no effects, or no complex events, was running extremely badly on the iPhone 6, lower than 35fps even if the level was really small compared to the huge levels I can make now (with over 3500 objects per level vs the 75 objects).

  • Thank you tarek2 for the reply and the project shared.

    This is what I was able to do starting with your generator:

    C3 File: https://drive.google.com/file/d/13v5Ftz4MPLFlTnup2WTs2H0TsgiWawQV/view?usp=sharing

    I feel like there might be a better way to achieve the same result. I'm still playing around with some property (to make the touch effect more realistic), but I guess this will be a kill performance for big levels.

    I was thinking if there might be some effect that can be applied to a single bg where the mesh get distorted on a specific area (when the player touch it).

    Feel free to play around with the file. I have checked around the forum but I'm not able to find a nice grass effect that doesn't kill the performance.

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello there,

    I'm having some trouble with the math behind on how I can spawn sprites that would belong to a parent sprite having the best performances. (not using any behavior).

    For each parent sprite (platform), it should spawn multiple sprites (like the grass), which would follow the width and the of the parent sprite.

    If you see my project, you can see I'm "almost" there, but I'm missing something. The children should spam within the width, and the space between each child should be slightly random.

    Example: https://drive.google.com/file/d/1d2qrvecjUsEq99_xzHUd2f-PGhyfvyEN/view?usp=share_link

    Thanks!

    Tagged:

  • On my side, Construct 3 just crash. (see the information below).

    Just make a new project, and start playing around with the animation editor. It crash when you select a palette, when you close the animation editor, or any other actions in the animation editor. It crash casually, and you might need to repeat the steps above in order to crash Construct3. Never happened before

    Error report information

    Type: unhandled exception

    File: editor.construct.net, line 0, col 0

    Message: ResizeObserver loop limit exceeded

    Stack: null

    Construct version: r336

    URL: editor.construct.net

    Date: Wed Apr 05 2023 08:29:10 GMT-0400 (Eastern Daylight Time)

    Uptime: 216.5 s

    Platform information

    Product: Construct 3 r336 (stable)

    Browser: Chrome 111.0.5563.66

    Browser engine: Chromium

    Context: webapp

    Operating system: Windows 10

    Device type: desktop

    Device pixel ratio: 2

    Logical CPU cores: 8

    Approx. device memory: 8 GB

    User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36

    Language setting: en-US

    WebGL information

    Version string: WebGL 2.0 (OpenGL ES 3.0 Chromium)

    Numeric version: 2

    Supports NPOT textures: yes

    Supports GPU profiling: yes

    Supports highp precision: yes

    Vendor: Google Inc. (Intel)

    Renderer: ANGLE (Intel, Intel(R) UHD Graphics 620 Direct3D11 vs_5_0 ps_5_0, D3D11)

    Major performance caveat: no

    Maximum texture size: 16384

    Point size range: 1 to 1024

    Extensions: EXT_color_buffer_float, EXT_color_buffer_half_float, EXT_disjoint_timer_query_webgl2, EXT_float_blend, EXT_texture_compression_bptc, EXT_texture_compression_rgtc, EXT_texture_filter_anisotropic, EXT_texture_norm16, KHR_parallel_shader_compile, OES_draw_buffers_indexed, OES_texture_float_linear, OVR_multiview2, WEBGL_compressed_texture_s3tc, WEBGL_compressed_texture_s3tc_srgb, WEBGL_debug_renderer_info, WEBGL_debug_shaders, WEBGL_lose_context, WEBGL_multi_draw

  • If you play your app from your smartphone (APK installed), and the iframe display correctly, (you see the links) then it works fine. If there is a problem with the Allow Origin, the iframe wouldn't load at all. If you host the page on your server, you would need to configure your web server (Apache, for example) or simply edit the .htaccess and set the Access Control Allow Origin to *.

    If the iframe works correctly, and the problem is when the user click on the links, like they are getting redirected somewhere else (like the play store), then it means you need to change some configuration, or you can try to edit your link. You can try to edit the link and add the target as _blank, or you can try to use a shortener URL as well. If these options don't work, then you can try this way: https://stackoverflow.com/questions/32928318/using-cordova-how-can-i-open-external-urls-in-chrome-instead-of-the-in-app-bro

    There might be some other configuration you would need to set. You can add the JS provided in the solution directly into construct (if it apply also on the iframe, just add an alert to make sure) or directly into the iframe. I didn't test it, so you would need to try all of them. Hope this help

  • This is the example code the site gave me,

    curl \

    -X POST \

    -H "Content-Type: application/json" \

    -H "X-API-KEY: YOU API KEY" \

    --data '{ "query": "{ bitcoin { blocks {count} } }" }' \

    https://graphql.bitquery.io/

    I tried to replicate it in construct, but this is the best I could do. I think it's the data section that is giving me issues

    If you could tell me how to write the code or link some reference material, that would be great, thanks :)

    Please, don't do that. Your users could steal the API key. If you have a server, make a config file outside your public_html folder with the Api key or any authentication needed. Then, make a php file which loads the keys, and make a script which sends the POST data received from construct3, to the third party application. (check online, how to handle POST PHP, and how to send POST PHP) There are thousands of tutorials.

    So, it would be: Construct 3 post to > your php file post to > bitquery.io. Then, you can return any result to construct3 from the php file you made. This would allow you also to manipulate the data before sending it back to Construct 3.

    Make sure to check the data in the PHP file for validation, and make a sort system security which accepts requests only from the construct 3 app.

  • Hi Ribis, thanks for you answer.

    "Your game runs via web browser"

    I understand correctly that mobile games (or operating systems - Windows, Mac) are also launched through the browser?

    Could you please tell me where can I find documentation on how the contract works on different operating systems?

    Of course I read the official documentation.

    is there more detailed documentation?

    Construct 3 is used to make games/app which only runs on the web browser. Construct1 could export as an application, but it's not the case anymore.

    This is because, the app is made with Javascript, which runs only in a web browser. So, really the game run on a web page that has a canvas on it. This is good in some aspects because an app or game made with construct3 can run on any device which supports a web browser/javascript, however, the performance is not great as native export.

    That's why you need to use AJAX when you are trying to retrieve some specific data in the file. The web browser doesn't have direct access to the files if I'm right.

    check the export options: https://www.construct.net/en/make-games/manuals/construct-3/overview/publishing-projects

  • Hello there,

    Ajax can be used to retrieve local JSON files, or to store data on your server via POST. Your game runs via web browser, which doesn't have access to the current project files. So, in order to retrieve the data in your project, you must access the data via AJAX call.

    I guess you have a text file or a json file which needs to be loaded into an array. In this case, you can request the project file, name the request with a specific tag name. Then, on competition using the same tag name, set the array using Ajax.LastData asJson.

    Read more here: https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/ajax

  • Hello there,

    I exported a project which is running in two different server. In one server, the project runs well (my server), while in another server (client server), the project doesn't run.

    On my computer I get the following JS error:

    Uncaught (in promise) Error: invalid expression number at GetExpressionFunc (/project-name/scripts/c3runtime.js:2404:92) at new ExpressionParameter (/project-name/scripts/c3runtime.js:2405:407) at Function.New (/project-name/scripts/c3runtime.js:351:47) at Function.Create (/project-name/scripts/c3runtime.js:2403:145) at new Action (/project-name/scripts/c3runtime.js:2458:518) at Function.New (/project-name/scripts/c3runtime.js:351:47) at Function.Create (/project-name/scripts/c3runtime.js:2459:265) at new EventBlock (/project-name/scripts/c3runtime.js:2290:451) at Function.New (/project-name/scripts/c3runtime.js:351:47) at Function.Create (/project-name/scripts/c3runtime.js:2291:502)

    The app doesn't even load. neither the first loading appears. It's a white screen, nothing happens.

    I was thinking the problem was related with Cache, but is not. I can't open the app using neither my phone, with a different connection. I have a broken project in one server, while in the other one works perfectly. I have tried multiple time to move the file again (maybe there was some corrupted file, but not, isn't working!)

    In the console, I get these errors. Both project exported are exactly the same.

    Did anyone encountered a similar problem? Thanks!

    Tagged:

  • Colonel Justice I managed to use coordinates for sprites on the 2d layer. But I do not understand how to achieve the correct size of sprites. This method can be used for a coin in my case. Since the question arises how to move sprites if we constantly set their position.

    https://drive.google.com/file/d/1Z36JfxluwTB0vrWVDJi97Ko6H5HAkvq3/view?usp=sharing

    But even a coin I would like to animate (smooth movement up and down). Therefore, the ideal option would be for a coin or a flying ship that comes from the sky or whatever to be displayed correctly in 3d mode. And here is an example of a game in which i want to do this:

    Would you mind to share the c3p file shown on the GIF? (if you made this, off course). Thanks you :)

  • brainwavecreations Thank you for the reply. This is what I'm seeing: https://www.awesomescreenshot.com/video/6511834?key=938b2d21948c8ed4e3a31af819382875

    Can someone see if you get the same lag/glitch? The game is almost unplayable in the first-person view. This happens especially when you turn around quickly.

    The events I'm using are the same as the demo which works on my web browser. I have added just some code. Am I doing something wrong with the 3DCamera?

    Thanks

  • Hello there,

    I have been playing around with the construct3 3d demo. I'm relatively new to the new Construct 3 functions. I wanted to combine three 3d games (first-person view from one, third person from another, jump action from another example).

    In the third-person view, the camera seems to work just fine. However, when you switch to the first-person camera view, if you try to lock the mouse and move around, the camera will randomly glitch (it's like a lag, the camera will look somewhere else randomly). I have no idea if I did some bad logic, I tried to disable almost all the events and the glitch seems to happen all the time. Even if I disable the third-person view, the glitch is still there.

    I have been trying to figure out what's happening for 2 days now. I tried 2 or three times with several logics, but all the time I get always the same glitch. Note that the first-person view is taken from one demo which works perfectly.

    Here is the project: https://umbriadesign.it/first-camera-test.c3p

    To switch the camera, press 1. to jump press space.

    Thank you

  • eleanorjmorelHello there,

    I'm open to discussing any budget as long all requirements are met and everything is well documented. Depending on which contract we sign, it is by hours depends on how much it would take so if it. If it is fixed then it depends. If the project stays under 450 hours would be good. I'm looking only for the multiplayer side and some of the feature can be postponed based on how much time it takes.

    I also forgot that I offer %0.02 on the 15% royalty for each item sold in-game for the first year. This can be negotiable based on the main hourly or fixed price.

    If the project goes well as I expect, it would be a long-term collaboration. Good opportunity to join an innovative project using Construct 3. So, for anyone interested leave a reply here or contact me at umbriadesign.it[at]gmail.com. Happy to schedule a meeting during the morning (9 am- 3 pm GMT+1 Central Europen Standard Time) Thanks

  • dop2000 Hello, thank you for the reply.

    The json looks like this and is vaid (checked on jsonformatter): https://umbriadesign.it/nftJson.json

    You can see the raids is being used. I'm trying to understand how I can access the id (the one above token_id) and get the data I want (name = "CryptoPunk #721", traits....etc).

    I'm not good with json manipulation. From my list (the nftList string) I would like to see if there is one in the json, and if there is, get the specific value for that specific item id.

    Thanks again

  • Hello there,

    I am looking for someone who can implement the multiplayer feature in the demo "Toggle Camera Perspective" from the original Construct 3 demos.

    Any framework is well accepted, even paid ones, such as Photon or similar. Please, check out the demo.

    Multiplayer features:

    - anti-cheat system.

    - Global area where people can chat together. These areas or layouts would serve as servers. People explore the map and go in and out from these layouts.

    - If 120 person joins the same layout, limit to 64 or fewer players based on the region. So, the person who lives nearby should be most likely to meet. Similar to the game sky children of the light, where one layout can have a limit of 24 players. The 24 players in this case would be the best match based on location or ping. So, basically there might be 1000 players playing in the same layout but you are limited to see only the 24.

    - People can chat. When a person sends a message, it will appear at the bottom and the character assigned to the person who is doing something.

    - People can add friends. So, the user can have a list of friends.

    - The user can set the status as busy or free. Based on this status, people can invite a

    friend to join the private room.

    - A private room can be joined only if the host invites the player, or the friend can ask to join if the status is set to free.

    - Some mechanics interact with the map itself. For example, if there is a switch the users can turn it on or off and this should be synchronized. Or again, if the user owns one object, be free to move it around the map, and this should be synced in real-time or only when the user finished positioning the object.

    - Integration with Firebase is a plus, but not needed.

    The project should be scalable, meaning that we could have several servers (USA, Europe, Asia). So resources can be added and removed based on the costs. It should be super safe, and the user should never be able to manipulate the server.

    The project is paid by hours or by project with a contract. Paid in USD or EUR. Paypal / Cryptocurrency / Bank deposit.

    Please, contact me at umbriadesign.it[at]gmail.com, or drop a line here with your email if you are interested. Thanks