j0schi's Recent Forum Activity

  • I did not really found the issue in the end but by avoiding those triggers it now works for me...

  • HEy WackyToaster, thanks, you are actually right i think, i boiled it down to a "pick by comparrision" where the system trys to pick a Sprite (skin for a 3d Object) i dont know yet why it not exists tho. It was just by chance that it alyways happened while moving, also it seems to not happen when not moving... I am still on it.

    Should i still report it? Because even if it does not exist any more for any reason that should not crash the game? Or should it?

    I am facitnated how you found that from this code haha :D

    Thanks!

    Update: This is really a strange bug.

    It happens even if there is no event after the trigger, "On animation finished" so amybe an animation gets triggerd or something and then the object gets destroyed... But still this makes no sense. But it is this trigger that causes the problem.

  • Hey folks,

    testing on android i noticed that sometimes my prototype crashes without an obvious reason. The loogic runns pretty much in a loop and nothing SHOULD change.

    Also it crashes completly, animation are still playing, but the playerbox is not moving anymore.

    here is what the browser console says from the one time i was able to reproduce this on pc:

    gyazo.com/ede4ef7e74ca3b67cb0dbccd0fc8b509

    function PickDistance(which,x,y){const sol=this.GetCurrentSol();const instances=sol.GetInstances();if(!instances.length)return false;let inst=instances[0];let wi=inst.GetWorldInfo();let pickme=inst;let dist2=C3.distanceSquared(wi.GetX(),wi.GetY(),x,y);for(let i=1,len=instances.length;i<len;++i){inst=instances;wi=inst.GetWorldInfo();const d2=C3.distanceSquared(wi.GetX(),wi.GetY(),x,y);if(which===0&&d2<dist2||which===1&&d2>dist2){dist2=d2;pickme=inst}}sol.PickOne(pickme);return true}

    Could anyone point me in the right direction to what this could be related?

    Normally when i have a problem i can always fix it in construct, but this somehow could be an engine bug maybe?

    Kind regards

    Update: I found out that it has something to to with the tap gesture. I read swipes left right up down. Also i have a action "on tab gesture" when i do a lot of tab gestures and start a swipe at the same time it crashes for some reason... I actually made a check that that the tap gesture can only fire when its not in touch, but that did not help. i somehow can make it crash...

    Seems to be a bit buggy, ill try to find a workarround...

    Tagged:

  • I Finally found it shortly after posting here: So in short: For some reason the array is filling up and i did not notice... so over time the array becomes bigger and bigger and generates the level millions of blocks in front of the player... Finally i found the reason for the lag haha :D

  • Hi, maybe this points you in the right direction: you can compare the X of the source to the x of the player. Then subtract or add (depending if left or right from the source) the distance where there should be full loudness. After that adjust the loudness depending on the distance picel value.

    Kind regards

  • I am testing a game concept for mobile, on very weak cpus. While doing that i noticed a strange behavior.

    Creating and destroying the same objects over a while creates some kind of overhead which eats more and more CPU!

    And that goes without haveing more objects on the screen. After letting the generator run for like 4 minutes the game becomes on playable on mobile.

    Does anyone have an idea what this could be? I checked everything and there is nothing filling up or anything that could cause this behavior.

    In the beginning the object creation takes about 1% CPU and after a few minutes its already 6-7%

    The objects get destroyed when they behind the player, there are never more than 130 objects on the screen.

    The only possible cause for me would be multiplying bigger numbers for position, could that be the issue?

    This is the complete object creation code (no, the array does not have more than a few entrys at any given time, as long as the cpu can keep up:

    This is how it looks like: gyazo.com/0abb10141bf6ac799fbfa26df554f4fd

    This is the CPU Usage on a ryzen after 10 minutes: gyazo.com/6beed8369ee3aa9d22a9397f9a7076f9

    What am i doing wrong here?

    Kind regards

    Patrick

    Quick update: I removed the distance calculation from the single objects and do it now in the beginning once for all objects. it takes like no cpu time at all even after Minutes of running. So something with the object creation / Placement must be wrong here...

  • Maybe its related to this? github.com/Scirra/Construct-3-bugs/issues/5510

    But my devices are not "Old" :(

    Update: It seems like a bug to me, this is how it looks if i make the fog red on my tablet: gyazo.com/92d2e3f5a16f94d5e4812b5a8e32d13a

  • Hi, in my testdevelopment i use volumetric fog to "hide" the spawning of the level:

    you can see how the blocks spawning is hidden in in the distance by black fog:

    gyazo.com/a77b1d67e984d593b677e22f7e6349f2

    however the effect does not work on both my mobile test devices.

    I have an redmi note 8t which just does not show the fog at all, and on my tablet its just hard cut off at the edge where the fog starts: gyazo.com/bf07aa143022d1989bc061b58e1efb1c

    Does that effect do not work on mobile at all? The tablet is a new mid range device:

    Lenovo Tab P11 Plus

    If this effect does not work, is there any alternative?

    Kind regards

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No, unfortunately its not fully solved and i have given up for now, i might look later into this again, but i dont think there is a straight forward solution. Maybe the approach to rotate the layer after spawning the sound sources there might be correct, but that makes for a lot of extra uneccesary objects...

  • The basic audio possitioning does not work for fps (speaking of first person shooter) as it does not take the looking angle of the player into account. so it works only if he looks "up" on the layout.

    for bulluts flying straight its really easy to do, you just set the z elevation of the bullet and laet it fly with the bullet behavior using normal x - y. like this i think: gyazo.com/5cf5926ead353947bcff2b45160a64bd OR you mean something else and i dont get it, in this case i am sorry. The more difficult thing to do is letting the bullet fly "up and down" on z taking the player looking angle into account...

    Edit:

    Had to read again, sorry, you mean straight up, not straight from an fps view...

    jea idk, i havent tested this yet. sory, i thought you meant shooting straight from an fps view... from his point of view to the enemy...

    I might try this...

    Edit2:

    gyazo.com/c745a253c312ca993fdeaf1fb43eb65f

    now the bullets fly up also, isnt that what the op wants?

    Set ZElevation to Self.ZElevation+1/3DCamera.ZScale

    if you have an idea for the audio positioning i gladly take it into account, here i describe the problem: construct.net/en/forum/construct-3/how-do-i-8/rotate-audio-relative-166583

  • So here are my newest findings, i still cant get a formular from this logic tho :( why i am bad at math? XD somehow one have to do an angle correction depending on the player position relative to the sound object.

    So if one uses this formular:

    x+cos(angle)*distance, y +sin (angle) *distance you can take the looking angle and correct it by:

    if source is on the right side its +90

    if sound source is below its +360

    if soud source is on the left side its +270

    if sound source is above its +180

    i am actually doing this by tryial and error, and i still havent figured out what if the source of the sound is for example on the top right of the player... I am sure there is a way to calculate this... Even better would be if someone of the construct team could confirm that there is an intended way to do this or at least that there is something in the making? :D

    Kind regards

  • From my experience the suggestion of Sami424 is actually correct.

    1Z elevation is 17.4px. So if you wannt to raise the bullet 1px/tick you set the z elevation to self.zelevation+1/17.4 also you should take deltatime into account... you can then check the zhigh of an object against the zheight of the bullet and determine if they collide or not at a given point. How fast the bullet raises or falls is determined by the angle, but i have no idea how to calculate that, let me know if you can figure it out :D i would do some trial and error... but must be quite complicated. shooting straight is no problem tho.

    But as you are making a shooter, have you come up with an idea how to determine sound positions? this is quite important for an fps but with the current system C3 has for audio pos its very hard to do...

j0schi's avatar

j0schi

Member since 8 Oct, 2014

Twitter
j0schi has 24 followers

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies