Tenos's Forum Posts

  • Picture of my try to pick the right object.

  • Hey everyone!

    Have been sitting here trying to solve a problem but I can't figure it out. I am building a tower defense game where I have a laser tower. I can build this laser tower on several building spots and if you build it next to another tower then occasionally the laser overlaps the tower next to it. When the laser then follows the object it is shooting at, it appears under the whole tower (see attached pic).

    I want the laser to change Z order so that it is above the tower it is overlapping that is not a part of its container.

    I have tried several solutions. I have an instance variable that I assign on creation so the laserID is set to the tower cannon UID, and I was thinking that if the laserID is not equal to the tower1cannon UID then on overlap it would put the laser above that cannon (see attached pic of events). But I can't figure it out. I have only tried to solve this for the same tower type.

    My dream scenario would be to find a solution that solves this problem so that the laser won't go under any of the 5 towers that are buildable in the game.

  • Hey everyone!

    I would be very interested if you would like to share your experiences when developing apps for mobile.

    What resolution did you target?

    Did you use any techniques to make the image look smooth on HD screens and not blurry?

    What fullscreen mode did you use? And did this result in you making a larger layout than what your viewport was?

    Would be super interesting to see what different techniques everyone has used :)

  • dop2000 I tried both actually cause I understood it as the Sounds folder loads the whole track before playing and the music folder streams, and I was curious to see if it made any difference. But there is no difference with the distortion no matter the folder.

  • NetOne I have not hosted it anywhere and to be honest I am prepared to see this "little" issue through.

    It's a very small problem and I can only replicate the issue on iPhone X all of my other devices work as intended so I think it actually might be that iPhone X is very sensitive for this sort of issue.

  • NetOne Yes, this could have been the case. I have actually tried to disable all other sound effects and events, but the distortion is still present.

    However, I removed the Sine effect of a sprite in that layout and somehow this made the distortion go away. It seems like continuous effects looping are affecting the performance very much.

    But what also boggles my mind is that when I tried another audio file which was MP3, the distortion went away without removing the Sine effect. Which makes me think that some audio files must be heavier for Construct to handle. I have tried .WAV that converts into webm and MP3 but can't understand what makes one work without distortion and the other one not.

  • Yeah, I managed to reduce the memory usage but the audio distortion is still present. Have no idea what to do to prevent popping and weird sounds coming out from the speakers from some devices.

  • Hey everyone,

    My game is crashing randomly when testing it on older devices. As soon as I remove all events regarding music it works great without crashing. Also on some devices I experience audio distortion when playing my music. I have tried different kHz and all of the available bitrates that are available to choose when importing into Construct 3.

    This is such a frustrating problem and I have been stuck on it for several days now and I can't find any solution to it. Is there anyone out there who has experienced something like this and what did you do to solve it?

    Tagged:

  • Great game! Well done :D

  • Hey everyone!

    I have a rather strange (according to me) issue. When i'm trying my game on different devices, everything works as intended, except for one thing. On iPad pro and on desktop the audio works fine. But on iPhone X there is a popping sound being present on some of my stages. The music that is playing makes strange random popping sounds as if the speaker was damaged. But this happens on every iphone X I try on. I also have other songs and they do not pop on the iPhone X.

    The only difference between the "popping" songs and the ones without the pop is the kHz. All of the popping songs are in 44.1 kHz and the ones without popping are in 48 kHz. Could this be a problem and are we recommended to use songs with 48 kHz instead of 44.1 kHz?

    I read this in the documentation

    "If you intend to use this value it is recommended to use an FFT size of 1024, because at a system sample rate of 44.1 KHz the value will update about 43 times a second. Games usually run at 60 FPS, and smaller FFT sizes may cause FFT windows to be missed since they change faster than the framerate."

    But I didn't understand how and what I should do with FFT size of 1024.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ThatOneGuy32 Double click the sprite and check the "Loop" box :)

  • Seems like I need your username on Discord as well. Tried with plinkie#4434 but couldn't find you :p

  • You don't create separate sprites but rather you have 1 sprite object copied 3 or 4 times. You then use instance variables. So when you grab each object it links to 1, 2 or 3 of an array and then you make each sprite relate to those numbers. So the 3 sprites plus the 1 one smaller sprite are always in the layout view and you change how they look based on the items you picked from the array etc. Add me on discord #4434 if you want any more help or this will just become a lot of spam.

    Adding you now :D

  • When you first add the 15 items to an array, say at Y=0, you can add the related object at Y=1. So you have Object A at 0,0 and the related object at 0,1. Object B at 1,0 and related object at 1,1. When you pick and delete the object from Y=0 you can also pick the related object at Y=1, say you are doing it in a loop which is likely, the object is at loopindex,0 and related object at loopindex,1.

    Oh yes, this is great! But can I somehow spawn 3 of these 15 objects in 3 separate boxes away from each other and then spawn 1 of the related objects to those 3 in a fourth box below? I have 15 separate sprites for the objects and 15 separate sprites for the related object. Have I done it too complicated?

  • sizcoz I checked out your example. And I'm starting to get a hang of it. But what I still have a problem to figure out is how can I only spawn one of the related objects?

    For example: I have imported 15 different sprites. First I want the array to choose 3 of these 15 sprites and when that is done I want the game to choose 1 of the related items connected to that one specific character. So in this case I want the sprites to be placed in 3 different boxes (cat, horse and dog).

    When this is done I want one related item to be spawned in a different box below the 3 other boxes. The saddle for example. When the user sees the saddle they think "oh, this belongs to the horse" and when they press the horse they have finished the level. Is this possible to execute with arrays or have I done it too complicated?