tarek2's Forum Posts

  • The results are correct.

    You have an array size:

    Width = 10

    Height = 1

    If you want to empty it, you can set the size to:

    Width =0

    Height = 1

  • It's hard to know without seeing a minimal example.

    For the error you describing my first guess will be to look at the (character and the Rock) if they are on different layers that have different parallaxes. If they are then you need to make sure that all the objects that need to interact with the player have the same parallax, otherwise, there will be an offset between them.

    Other than that, not sure what could be the issue.

    Have you checked the collision box? and the Origin point if they are set properly? Maybe you cut the picture and the image point wasn't centred after.

    If it is none of the above, please post a minimal example showing the issue so someone can have a look at it and give you better help.

  • Grab a glass of water and regret ever asking for help!

    Lol

    I will skip 3D Arrays.

    Thank God you had some piety for the poor soul :)))

    Thank you for the response! I guess a better question would be, how to fit the tilemap json data into the array and the downloaded file. The concept of arrays is really confusing to me, but as i understand it has 3 dimensions being used for the object name, x, and y position. It doesnt seem the tileset data would fit into the array, perhaps a different configuration or 2 files will be necessary to save a level? Im completely unfamiliar with the dictionary object and its capabilities.

    The goal is to save each level as a separate file and load them all when starting the game. More elements will likely need to be saved as I continue development, so just trying to get an understanding of how to compile complexities into a save. Thank you for reading over this and my ramblings attempting to understand code :) updated the project link it should be accessible now!

    Let me add to the combo, to give you the final blow :)

    A lot of it is repeated, though I will try to make it more visual, maybe it will be easier to digest.

    The first thing I will recommend to you is to spend some time learning (Dictionaries & Arrays). Take your time and learn how to (Add & Retrieve) data from those plugins. There are plenty of tutorials for that.

    And have a look at the Manual:

    https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/array?utm_campaign=C3Editor&utm_source=browser&utm_medium=r391&utm_term=PropertiesBar-LinkProperty

    https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/dictionary?utm_campaign=C3Editor&utm_source=browser&utm_medium=r391&utm_term=PropertiesBar-LinkProperty

    Dictionaries:

    You can learn them in minutes as they are the easiest.

    Use "Add Key": to add a -------> (key & Value)

    Dictionary.get("KeyName"): to retrieve the Key -------> (Value)

    Have a look at the Manual they will show you all the Expressions and Actions.

    Arrays:

    You can customize it to your needs, you can use (1D, 2D or 3D)

    What is the difference between those 3 types?

    It depends on the (Width, Height, Depth)

    The depth is represented by "Z" --------> (Width, Height, Z)

    Width = Total Columns

    Height = Total Raws

    How C3 works to retrieve the data?

    X = Which Columns index Number is

    Y = Which Raw index Number is

    Z = Which dimension is

    1D Array:

    It is when you have a (Height = 1), meaning one Raw.

    So here to retrieve any Column index data you just need the X index number

    For example:

    Here is an Array

    Width = 7

    Height = 1

    The first coulmn will be --------> (X = 0)

    The Last column will be --------> (X = 6)

    If you want to retrieve the value from the first column ------> Array.at(0)

    If you want to retrieve the value from the last column ------> Array.at(6)

    2D Array:

    It is when you have a (Height = 2) or greater, meaning multiple Raws.

    So here to retrieve any data you will need the (X,Y) index numbers.

    -The Top-Left Array cell will be at (0,0)

    -The Top-Right Array cell will be at (6,0)

    -The Bottom-Left Array cell will be at (0,2)

    -The Bottom-Right Array cell will be at (6,2)

    If you want to retrieve the value from the Top-Left------> Array.at(0,0)

    If you want to retrieve the value from the Bottom-Right ------> Array.at(6,2)

    3D Array:

    Is when you add depth, meaning more than one dimension, (Z = 2) or greater

    Each dimension is one Array independent, you can view it as layers:

    (Dimension 1= Layer 1)

    (Dimension 2 = Layer 2)

    Etc...

    As you can see in the picture:

    Array 1--------> will be stored on Dimension1

    Array 2--------> will be stored on Dimension2

    Array 3--------> will be stored on Dimension3

    To retrieve the data now you will need (X,Y,Z) for 3D Arrays.

    If we take the example from the 2D Array Picture Avobe:

    If we want to retrieve the data from:

    -The Bottom-Right Array dimension1 will be at (6,2,1)

    -The Bottom-Right Array dimension2 will be at (6,2,2)

    -The Bottom-Right Array dimension3 will be at (6,2,3)

    Finally:

    How you save the data you will need to figure it out by yourself so you can select a structure that you will understand and feel comfortable with. There is no right or wrong, every one has his favourite way of doing it. You can use Dictionary only or just Arrays, or both. You can use multiple Arrays and dictionaries, the possibilities are endless.

    If you do step one properly then you should be able to figure it out easily.

    Here is just a quick random example, just for this tutorial:

    You say you want to save the Tilemap XY and with, height

    Use the expression ---------> Tilemap.AsJSON

    -That will save you all the data of the tilemap

    -Then for example you decide to use Dictionary to save all the enemies

    -Then you decide to use Dictionary2 to save all the Objects like (Coins, Powerups, etc..)

    Here is one possibility of how it can look like:

    X = Level Numbers:

    X = 0 ----> Level1

    X = 1 ----> Level2

    etc...

    Then you have the whole (Height or column) to store all the data for the levels:

    Example:

    Level1:

    Array.at(0,0) = Tilemap JSON

    Array.at(0,1) = Dictionary Enemies

    Array.at(0,2) = Dictionary Objects

    Level2:

    Array.at(1,0) = Tilemap JSON

    Array.at(1,1) = Dictionary Enemies

    Array.at(1,2) = Dictionary Objects

    Level3:

    Array.at(2,0) = Tilemap JSON

    Array.at(2,1) = Dictionary Enemies

    Array.at(2,2) = Dictionary Objects

    And so on...

  • Hi DexRage

    Have you tried to set the "Origin Point" of the SVG object to the centre?

    It works as it should on my end.

  • I couldn't have a look at your file as it needs permission to access it.

    But in general, if you just need to save the Tiles of a tilemap, then you can save the JSON "Tilemap.TilesJSON" in an (Array or Dictionary) and download it.

    Then load from AJAX the (Array or Dictionary) first and after that load the Tiles Tilemap from that "Tilemap.TilesJSON" that you saved in one of those plugins.

    Here is one example:

    https://www.dropbox.com/scl/fi/y9o8swpe7xthug47awb85/1-TileMap-Load-From-JSON.c3p?rlkey=t36g5zfwa09wrxv749nu086g6&dl=0

  • It could be related to this issue:

    https://github.com/Scirra/Construct-bugs/issues/8236

    He added the fix in r407.2

    Try version r407.2 or higher to see if resolves your issue.

  • > > > Use the condition called "Is overlapping at offset".

    > >

    > > My two objects are circles. If I use "Is overlapping at offset", the offset point XY can only detect one point. Is there a convenient formula? What I am using now is to compare the two values ​​​​distance (friendly circle.X, friendly circle.Y, enemy circle.X, enemy circle.Y) < (friendly circle.Width / 2) + (enemy circle.Width / 2).

    >

    >

    > If you don't need to check at offsets then you should always use the normal condition:

    >

    > "Is overlapping another object"

    >

    > You will probably want to adjust swell the collision points of the circle if you need it to be 100% accurate instead of a Square box.

    >

    >

    > If you need to check the offsets, the manual can help you in how it works:

    > https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/common-features/common-conditions#internalH1Link10:~:text=Is%20overlapping%20at%20offset

    "Is overlapping another object" is useless. These two objects use the "Physics" behavior. The "Physics" behavior can set the collision boundary to a circle. They cannot overlap and can only push each other. The manual shows that offset cannot solve this problem. there is no better way than to detect the distance between the two.

    I missed your second post where you mention the Physics, I apologise:

    My answer was for non-physical objects.

    If both objects have the physics behaviour then indeed the overlaps check will not work, as it will resolve the physics collisions first and push them apart, and by the time it checks for overlaps, it is too late.

    1-Distance check is a great alternative.

    2-You can also use invisible colliders as an alternative:

    Here is one example:

    https://www.dropbox.com/scl/fi/pq3f2ne6q2sjngo020bxp/1-Physics-Overlaps.c3p?rlkey=0pues73jekqf4fzyzdttl3q3w&dl=0

  • > Use the condition called "Is overlapping at offset".

    My two objects are circles. If I use "Is overlapping at offset", the offset point XY can only detect one point. Is there a convenient formula? What I am using now is to compare the two values ​​​​distance (friendly circle.X, friendly circle.Y, enemy circle.X, enemy circle.Y) < (friendly circle.Width / 2) + (enemy circle.Width / 2).

    If you don't need to check at offsets then you should always use the normal condition:

    "Is overlapping another object"

    You will probably want to adjust swell the collision points of the circle if you need it to be 100% accurate instead of a Square box.

    If you need to check the offsets, the manual can help you in how it works:

    https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/common-features/common-conditions#internalH1Link10:~:text=Is%20overlapping%20at%20offset

  • You have multiple doors, but you use "Trigger Once" which is causing you conflicts as this trigger doesn't run per instance. If you want to run it per instance you can replace the following:

    "Trigger once" -----------> by -----> is Animation Playing "Closed"

    This will make it run per instance.

    You can also remove the "For each" and all the other extra checks as they run every tick unnecessarily and do all your logic under the

    Player is overlapping door:

    ----> door_plate is not Active

    To skip all the subevents when the (Player is not operating door & door_plate is Active)

    Also, you will have everything more organised in one event.

    Here is one example:

    https://www.dropbox.com/scl/fi/s7yw609wcrqc9w5eu7ph1/Multiple-Doors-Fix.c3p?rlkey=lpmf1k0mx7u0zp68s2d6tynr1&dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Most games ignore the system scaling setting and don't resize their content. Besides, in a mobile game I need to make sure that touch controls are always usable. I can't just scale things down without knowing the physical screen size. The same button may be fine on a tablet, but will be too small for mobile phone screen - impossible to control without a pen.

    I agree, have the same problem and is quite frustating.

    I have been trying for years to fix this issue without any luck, as any workaround that I tried was unpredictable in how it would behave on each device, so I always went back to a default setup without making any adjustments.

    Therefore I have to decide:

    1-Make the buttons look good size on PC but it will break on phones as they look so tinny and hard to touch and drag.

    2-Make the buttons look good size on Mobile but they will look huge on PC, like you can see and feel that the size is disproportional and not making sense.

    I tried to adjust per device but it's quite insane.

    A lot of work for something that sounds like it should have an easy solution by now since the gaming industry is huge and generates the most money.

    Not sure if this could work but wouldn't be a solution to add to the layers and extra ScaleRate which will affect only how the layer scales according to device resolution.

    100% = Is normal and it will scale as it does now

    50% = anything on that layer will only scale 50% according to the resolution

    This way we will have more control on how we want some parts of the game to scale up, like UI etc...

  • Pretty cool card effect!

    I gave it a try too, as I'm curious about how was done ))

    Here is my try:

    https://www.dropbox.com/scl/fi/bhikucfr47rnm8oe5oejs/1-Card-Effect.c3p?rlkey=xwq50umqo9c3u6mdo7eu9ijuz&dl=0

  • noman Khan

    Hi

    Not sure to which example you referring exactly but for the names you tagged I think it refers to this thread:

    https://www.construct.net/en/forum/construct-3/how-do-i-8/text-input-box-part-styling-175469#forumPost1087095

    I updated the broken links on that thread, I hope it helps.

    How C3 users are able to monetize their games wouldn't be an afterthought like it fells now, it would be the #1 priority.

    I agree 100%, all these years requesting this to be a Top priority but we are still on the same point it shocks me!

    The only fully working, relatively easy monetization option in C3 afaik is mobile. I personally don't care about mobile and never really looked into it, so I just assume it works, because I didn't hear much complains about it.

    ...besides the usual iOS pain.

    iOS has been totally broken for quite some time:

    There is nothing worse than to find out that you have worked for 3+ years on a game targetting as your main platform iOS and when you are finishing out you find that that platform is completely broken. We had to ditch iOS and target another platform because we knew this was not gonna be fixed any time soon.

    Here is the bug report:

    https://github.com/Scirra/Construct-bugs/issues/7626

    It's been two months since a bug was filled with webkit but they never even replayed.

    https://bugs.webkit.org/show_bug.cgi?id=268250

    C3 Team needs to find an alternative export option for iOS as it is always broken and WebKit doesn't care to fix their issues as some bugs take 1+ year to fix, if they ever get fixed. This is not the first time this has happened and I dont think will be the last, basically each iOS update there are issues, if you look on the forums for threads you will find many iOS update issues that took a very long time to fix.

    The problem is not the C3 license price, the problem is when you finish a game you cannot monetise because most of the time those platforms have issues exporting to them. I know they always say "but is not C3 fault" though we the developers are not asking who is at fault is, but instead, we are asking to find an alternative so we can monetise our games regardless of whose fault is. It's been many years with this issue yet there is no solution and when you see plugins being added that a lot of us are not gonna be using, but to monetize to some platforms is still an issue due to the bugs is really frustrating. I honestly dont care about the new things being added, I would prefer you to fix the issues on those platforms so we can monetise our Games, I wouldn't mind you stopping adding new things to C3 for some time to fix all the monetisation and platform issues. To be honest we shouldn't have to say this as it should be a top priority for the Game engine team but the problem is the developers agree with this way of developing with C3 otherways they will raise their concerns more often.

    Every C3 Game we tested have the canvas bug issue yet no one cares:

    Here is some:

  • This is a deliberate restriction by Apple. Construct will happily run at more than 60 FPS if the browser/system allows it, but Apple have limited the framerate in Safari to 60 FPS. Apple ban other browser engines on iOS, so all other browsers on iOS are just wrappers around the Safari browser engine, so none of them can escape the restriction either. That's Apple for you!

    I wonder how much could improve Construct games on iOS if they allow a full Chrome browser worldwide and not just EU, will that get any benefits for Construct devs targetting iOS? For example, more stability when a new iOS release therefore fewer Bugs? or will it not change anything?

    developer.apple.com/support/alternative-browser-engines

  • I'm also experiencing continuous crashes for a while, by:

    -Exporting to html5

    -Exporting to NW.js

    -Also, by just hitting the save button

    I uninstalled Chrome and freshly installed it again without any extensions etc... But still keeps crushing not sure why. I disabled everything like Antivirus, etc... but still no luck.

    I opened a bug report here:

    https://github.com/Scirra/Construct-bugs/issues/7445

    This happens even with new empty projects as I show in the video that I posted there.

    Not sure if yours is related though you didn't provide much info, like which platforms are you exporting to etc...