rusya119a's Forum Posts

  • I have a bug in my game that is on the construct side or the ad side.

    When displaying ads of the interstitial type, if the ad is displayed in portrait mode, the game will be covered with a white screen and freeze, only a restart will help it. As a result, my crash rate is very high. My game is in landscape mode, and portrait ads should not be displayed there. Please clarify how to disable this. Because I didn't find anything even in the admin settings.

    Making an event in the spirit of Lock orientation does not help.

  • Hello! My application has 0.83% ANR error rate with a compliance threshold of 0.43. It has a crash rate of 0.2%. I notice that the optimization in my application is very weak.

    My players send me videos with one of the common errors, in the form of a screen that blinks or completely fills with white.

    Some graphic artifacts, lags, delays. All this is present. Especially, as players note, on one of the layouts, this occurs more often.

    I am sending a video with a bug from a player. Maybe you know what exactly the problem is?

    Critical, I use a cycle that creates objects at startup. (loop up to 6). And a light scrolling layer system. I don't think that the problem is in the small cycle and create object.

    I want to add that this is not the only layer with this problem.

    youtu.be/PnMVB8VHEww

  • > I don't know anymore how correct this system is. But containers and families look much worse in my opinion

    What you need here is a hierarchy. Add other objects (texts, images) as children to the main Card sprite. They will move together as one unit, and you can pick child objects in events. And it's a lot easier than linking them by ID.

    > Then I can’t add 1000 cards to the screen, etc. Where each will have 4 elements, this is already 4000 objects, etc.

    It’s not that bad. Construct can easily handle tens of thousands objects. As long as you keep most of them off-screen, you're not moving all 4000 objects at once, and you’re not updating them every tick, the performance impact should be minimal.

    Another option is to destroy cards once they’re swiped away and create new ones as needed. That approach should be easier than trying to recycle them.

    So, I studied the hierarchy in more detail and made cards using them. Yes, it worked. Everyone has the same ID and it's much easier to move them now.

    For now, I left the endless swipe that moves the card from the beginning to the end. And I change their IDs. So far, everything is correct, but I want to study more and wait for pitfalls

    In any case, thank you very much. The hierarchy has already solved 50% the problem.

  • Hello everyone! I've been stuck on a very difficult task for 2 weeks now. The task is to make the ability to swipe cards infinitely, bind them to an array, and implement the structure of the cards themselves in an optimized and competent manner.

    I'll describe how I implemented it so that you roughly understand:

    I have a card, which consists of a Background. Text. Background image and image. These are 4 elements. Each of them has a local variable id. The text is the same for all projects, so I added a local variable tag and id and attach the text to the card with the tag "Card_Text".

    Each ID is attached to each other. That is, the image with ID 6 is attached to card number 6.

    Image with ID 3 is attached to the background of card number 3, etc.

    I don't know anymore how correct this system is. But containers and families look much worse in my opinion. I don't know. For example, you can't even insert text into a family. And containers are generally unclear how they work and there is no point.

    Next, the essence of cards is that they can be moved, and at the same time you can select the one you need by drag and drop. But since there can be more than 1000 values ​​in the array (the array is the inventory of cards). Then I can’t add 1000 cards to the screen, etc. Where each will have 4 elements, this is already 4000 objects, etc. That’s why I came up with an endless swipe, where a card moved to the left will move to the right. and vice versa, when swiping to the right, the card on the right will move to the left. Thus, there will be an endless swipe, plus with the help of a mask and an overlay effect, I will make the card appear in an invisible zone.

    The main problem with this system is that when teleporting a card, I try to change its ID so that it is as if next on the list and changes. But the OBJECTS that are in it, the background, the text, etc. -> they change the ID to a completely different one. Although when teleporting, I give everyone -5 or +5 to the ID. Because there are only 5 cards. And it turns out that everything is going in disarray, where the object ID is -15, the background ID is 5, the text ID is -10, etc. I don’t understand why, because the teleportation function is activated once and for them at the same time. A very stupid system that I’m stuck on.

    Also, I can’t make a system that these cards need to be dragged onto the table. After all, we can take them and move them higher, but the swipe will still work, and it turns out that when you swipe, the card you’re holding will move, and it will also change its ID if teleportation works on it. Even if you put it on the table to make it inactive, it can still change its ID.

    Also, after that, if I move a card to the table (to the center of the screen), then this card should automatically replace its ID with another one from below. Otherwise, they can be duplicated endlessly. This is also a minus. For example, I don’t understand how to implement all this.

    I have never seen such a complex system in Construct 3. With my 5 years of experience, I don’t understand anything. What is connected with swipes, cards, and endless systems.

    In general, my nerves are already giving out. A lot of problems and loss of motivation. I need help. Please try to explain how to implement such a system. How this system works in other games. And what I need to do. Maybe everything will be done with 2-3 variables, and not 10 like mine... I need optimization and freedom of implementation. Simplicity and ease.. I don't understand.. friends..

    I am attaching screenshots of my crooked system.

  • > I'm not sure about spritefont performance, memory consumption and optimization with it. When I used spritefont before, it could constantly shift position, could be displayed incorrectly

    It's actually the other way around! Spritefont is much faster than text objects, uses less memory, and is always displayed accurately and consistently on all platforms. Webfonts, even when added to the project, are rendered differently on different devices, may shift up and down, may look fuzzy etc.

    Yes, but in my editor, the letters of the spritefont look very strange, some big gaps, distances, letters can overlap each other, etc. Yes, I understand that this requires adjustment.. But, I would not say that it is a matter of 3 minutes.

  • Can you use a SpriteFont? It would be the easiest solution.

    https://www.construct.net/en/forum/game-development/tools-and-resources-27/sprite-font-generator-v3-64038

    Another option is effects, but they don't always work well with text objects.

    https://www.construct.net/en/make-games/addons/449/better-outline

    I'm not sure about spritefont performance, memory consumption and optimization with it. When I used spritefont before, it could constantly shift position, could be displayed incorrectly, etc. And it seemed to me that it was much more inconvenient than the built-in web font. Maybe you can convince me otherwise, but I am very much interested in performance figures. I look at this from my past experience.

  • Hello everyone! I have encountered a problem with implementing a proper outline and shadow for text. I still don't understand why the construct developers haven't done these basic things. After all, you can't even apply a gradient to text in the standard way.

    My problem is that I have Text, which I need to convert into stylized text with an outline and shadow. However, I spent several hours, I tried to use Java scripts, etc., but it doesn't work. Using [outline] won't help. Because there is no shadow, no outline size.

    If you have a way to make a convenient style using stylesheet or other functions, I'll be glad to hear it. I give an example of the font below. I use webfont

    Tagged:

  • Hi. I'm hung up on an easy system that I can't do.

    I have a json type array, with a display of card names, drop chance, and information.

    Each row, is the information for a card.

    I need to make it so that on push, the game compares all the data in the array, and adds by pushing, one card from this json, if there is a drop chance, from the second column.

    The game should do a push of the full row. For example, if the random chance is 15%, the game takes into account the cell with the number 15, the one with card 4, and makes a push.

    The result is: Card 4, 15 , id5.

    If you have more other and convenient ways I would be glad to listen. I need to create a system of dropping items-cards from the box. With random.

    My stupid system that didn't work.

    Tagged:

  • Update

  • Hello! I have a difficult question.

    I have an array of size 800,71,1

    This array has data, the some cells are filled, and the remaining ones are just empty like 0,0,0,0,... etc.

    Question. I need to reduce the size of the array to the available data. So for example, if any number or letter is in the array, instead of 0,0,0,0, then this cell should remain, and all the others should be cut and resized. For example (if 300 cells in the array have any data, and the next 301-799 will have 0,0,0,0, etc. Then the game does set size (x=300, self.height.)

    I did something similar, but it does not work at all. I will be glad for help

  • Hello! My game is running in Landscape mode. But when running admob ads, sometimes portrait ads are displayed, which in turn leads to the game freezing and a white screen. A lot of users complain about this. How to fix this?

  • Hi! I recently mastered the timeline function, and realized that animations of pop-up windows, buttons, etc. are much easier to use this way than through the system set position.

    I use one timeline for all animations in the project, but since I have different objects on each layer, my timeline already stores about 500 objects. Different texts, etc.

    I have a question.

    Does this affect optimization? Or does storing objects that are not used and are not visible on the layout not affect performance?

    That is, for example, on my layout there are about 30 objects (text, 45 sprites, etc.) and they are animated, but the timeline contains 500+ other objects from other layouts that are not currently in the frame.

    And who can tell me how best to use the timeline to animate objects on the layout? Should I make my own timeline for each layout, or can I use one for convenience?

  • My attempt with regex:

    You can put it all in one line, if you want.

    Yes! It works, thanks a lot! I definitely would not have thought of such formulas.

  • Hello! I have a string value for example text format: $9.99, it could also be USD9.99$ or 9.99 UAH. That is, the text is in different places and can be random.

    I need to somehow take this value, multiply the number by two, and leave the existing text in the same position. That is, so that out of the existing $9.99 you get $19.98. But I wouldn't want to use loops, as I think it might harm the optimization.

    Are there any options? How to separate the number and text separately, multiply and assemble into a whole?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The best way to optimize memory is to animate sprites using Construct 3 tools. Use the Timelines, Mesh deformation and "Tween" behavior wherever possible. If you want more specific advice, take a few screenshots and show how your graphics looks.

    I'm using car bodies as frames, not sure if any behavior is appropriate here.