WackyToaster's Forum Posts

  • I (maybe) got some more information on the memory out of bounds thing.

    First of all, the system max count of particles appears to be minimum 256. Even if set to 100, it will spawn up to 256 particles regardless. I don´t think this is what causes the error though (and I don´t really mind it)

    The second thing however are some discrepancies of created/destroyed particles that may lead to the issue.

    1. The spawnbox I have creates 530 sprites every time... EXCEPT the first time particles are created, where it only creates 529.

    2. The first spawn also seems to overlook the first created particle in the destroy action. So one particle will not be destroyed despite fulfilling the conditions. I nailed this down to the conversion of LFJS.ParticleUidFromSprite, it simply seems to be one off. If I add a LFJS.ParticleUidFromSprite - 1 it will destroy all particles but not the last one. (These particles keep flying until reaching the -12k issue)

    3. Destroyed particles are not actually destroyed, they are placed offscreen at -1000X -1000Y (I assume they are "stored" for reuse). Now if I just go ahead and check to destroy particles that have a Y lower than 300 it will permanently attempt to destroy those, just nothing happens since LFJS.ParticleUidFromSprite returns -1.

    As such I think I figured out the correct way of destroying particles is to filter out all particles that are exactly -1000X -1000Y (that is fine since naturally that will never happen, and even if probably not cause much issues) then use a for each sprite loop AND also use trigger once (Though I´m not sure why the trigger once is important, but it is required. I also tried using the pre world step trigger but that didn´t do anything)

    There is an action to clean up these unused sprites (destroy spare sprites) though I didn´t quite figure out a good place to put it. It usually seems to add issues and I don´t think in my case it will be useful. Either way, the discrepancy with the first spawn beeing one off still exists.

    4. There is also a weird correlation with this issue between the system max count aswell as Particle group tags. It´s a bit hard to explain. Basically if Group tag "A" causes particles of group tag "B" to despawn due to max count settings it will throw this error. If both tags are the same, it works fine. It also works fine even with different groups as long as the max count setting is "amount of newly created particles + 2"

    My conclusion is that this "ghost particle" is likely the root of that issue.

    See these two new projects for debugging.

    wackytoaster.at/parachute/particleBugs2.zip

  • Something is broken with the code formatting and editing the post also doesn´t work :V here´s the link to a nicely formatted code version

    drive.google.com/file/d/0Byqm4cKYC28xV0M1NTdsNVBUMjQ/view

  • Does anybody know how Terraria keeps such good FPS? There are millions of blocks and water tiles,

    countless particles torches, etc. How did they do that? Any ideas? Thanks.

    This was answered in the thread already. Terraria (most likely) uses chunks and processes everything within those chunks while ignoring everything that is outside of said chunks. So the world is basically active around the player (+some extra) but everything else sort of gets frozen, doesn´t create particles/enemies etc. and thus takes basically no processing power. So yes, there are millions of tiles but it doesn´t matter. Even if you would put trillions in, only a specific amount of them is ever needed around the player.

    Also one should mention that when dealing with huge amounts of things, you will get more out of it when you use C# or C++ instead of javascript, even though javascript is slowly creeping up (especially with WebAssembly)

    In terms of water, I really don´t know how one could do it. I found this though

    youtube.com/watch

    Along with the code

    drive.google.com/file/d/0Byqm4cKYC28xV0M1NTdsNVBUMjQ/view

    I think there is a fair chance that you´d be able to translate this into Events or JS (or webassembly?), though it will likely be slower AND it is not optimized for chunking and such.

  • Good to hear! I´m pretty sure I can reasonably work around the -12k thing if it happens to be unfixable. For the destroying, I also think I probably won´t really need it for what I have planned so I think I´ll be fine either way, but obviously fixing it would be great.

  • I actually have never seen that before.

  • Well if I had to pick one, it´s #2.

    Containers and Pin? More like Containers and Pain amirite?

    Prefabs are a close second.

  • Return the property in an expression perhaps?

  • I´m pretty sure the app will go through. I also got the email but it still goes through regardless. But it probably will need to be updated to future-proof it.

    Here´s the exact email

    Dear Developer,

    We identified one or more issues with a recent delivery for your app, "Parry Arena" 2.1.1 (2.1.1). Your delivery was successful, but you may wish to correct the following issues in your next delivery:

    ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See developer.apple.com/documentation/uikit/uiwebview for more information.

    After you’ve corrected the issues, you can upload a new binary to App Store Connect.

    Best regards,

    The App Store Team

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you have nvidia look into shadowplay. Works with construct too and I don´t think it has any performance impact, or at least barely any.

  • Colludium

    Found another odd bug that causes the game to freeze. I think I figured out the exact conditions... that is basically particles that go up and out of the screen and end up on a Y position lower -12000.

    No big deal, I really don´t need them up there actually, I think I can just destroy any particle that goes farther than -5k anyway, far before it gets to any problematic values. But if you come around fixing it I wouldn´t be mad either.

    Or so I tought. Hmm... Maybe I´m just doing something wrong?

    From what I gathered online nobody bothers fixing any of this, at least not from the liquidfun-side :I Maybe you have an idea on how to work around it.

    wackytoaster.at/parachute/particleBugs.zip

    That beeing said, I´m having a ton of fun playing around with it and I hopefully can manage to make an actual game around it :) Btw. is there a way to set the particle density/dampening for individual spawns and not globally?

  • That was quick! Thanks :)

  • I don´t do more than apply some force to it when you press a button.

    wackytoaster.at/parachute/buggy.c3p

    I found that even other objects set to static not tied to the event can just disappear along with the sprite. Really odd.

  • Colludium

    I finally found a reason to try it out but I found something strange.

    If I do this, the Sprite just vanishes. The debugger puts its position on NaN. I actually can get around it by using Force XY instead but I suppose that´s not exactly the intended behavior.

    Also, for Velocity X the description states "The Y velocity" and for Force XY it states Y twice, just a copy&paste oversight :)

    Oh there is also Force at COM that works exactly how I need it. But what is Acceleration XY then? Since it also states "plugin applies a force to the center of mass"

  • Looks pretty cool. One thing I´d adjust are the backgrounds in terms of clarity. Right now it can be a bit hard to judge what is background and what isn´t. Maybe it´s a bit better in motion but generally distant objects will get a blue haze from the atmosphere, especially the mountains/cliffs. This will create more depth and makes it easier to see if something is part of the foreground or not.

    .

  • I have a basic firebase example up for use with javascript. If you have a little knowledge of js or are not afraid to learn something new it should be pretty easy to adapt. The easiest example would be to save everything into an array/dictionary and send the array.asJSON to firebase. Then you won't have to bother with the data structure of firebase and just have a single point of interaction between construct and firebase.

    wackytoaster.at/parachute/firebaseWithJavascript.c3p