AnD4D's Forum Posts

  • Are you thinking of something that would dump everything in memory between loading layouts?

    I was under the impression that everything that would not be needed for the next layout was purged.

    I'm thinking of something that is an action, so it can be triggered at the start/end or middle of layouts. As far as I'm aware, it's not purged much, if at all. Local variables have been known to show incorrect figures if the same name is used for 2 different layouts/event sheets. Someone recently mentioned that objects in previous layouts are still "active" in the debug section... though I can't confirm that.

    Well it depends on if the "console" is made to allow it.

    As far as I am aware, it has functions that permit the action to flush storage and request memory garbage collection, but nothing seems to happen. I can't tell if it's C2 refusing to allow that to happen, or the console just doing a half-hearted attempt.

    I'm still saying that the best would be to give the developers memory loading and dumping controls with a warning that it's an advanced feature, don't use it if you don't know what you are doing. The engine does a great job managing the memory, but in rare cases some control is needed.

    Yup! Construct 2 does a great job most of the time, but in cases like this, I'd love to have a little extra control. Construct 2's all about loading at the start and having the rest of the game pretty much instant. I'd like to have the ability to load on demand, and remove when not required.

  • Going to give this a friendly bump, seeing as I've asked for this 3 times now, and been pretty much ignored each time.

    I just want to know if it's a simple addition or not and whether it'll make an appearance.

  • Hi there!

    I recently had a strange experience with my latest game that was released on a console.

    Although I was testing it regularly, when I finally had everything in, about 30 minutes into testing, the console would fill up with memory, and the game would crash.

    I spoke to the console devs about it and they said it wasn't their fault, and I spoke to Ashley, and he said it wasn't C2s fault, however, he did suggest it was possible to create an action that would force a memory dump, but was hesitant because it wasn't a sought after feature.

    I'm just wondering how hard it would be to include it. In the end I had to break every single one of my layouts into its own project. This is now a chore to maintain and a nightmare to set up. On top of this, my loading times went from 1 second to about 10 (as it needs to shut down one project and then load the next from scratch).

    If it's quite simple, I'd really appreciate this being included. The console devs don't seem interested in improving things on their end, so I need to rely on Scirra.

    Any chance of this happening?

  • Unfortunately I couldn't open your capx as I'm still on the stable... but I managed to get this bullet angle idea working quite well.

    270-(angle(0,0,cos(270-Self.Bullet.AngleOfMotion),sin(270-Self.Bullet.AngleOfMotion))/2)

    I believe it is based on your code for cos and sine to determine the difference in angle. Then I divide it by 2, and I get the correct angle the player should be.

  • There are a couple ways to do this.

    One is to take the locations of the points of the collision polygon and calculating the point of collision and angle of the surface in contact by using the Separating Axis Theorem. It's a bit more technical to do but it gives exact results:

    Another simpler way is to check for collisions around an object and averaging out the offsets to get a angle. Here's one that does that when one object is a ball:

    Sadly my collision polygons will effectively be a smoothed shape, comprising of approx 8 points.

    I've attached an example of my current method. Hopefully this isn't too taxing for the cpu. The object shoots a bullet that detects the angle of the surface and feeds it into the angle of the main sprite.

    However, the problem is now that when the object deflects off at (let's say) a 90 degree angle, the main sprite sets itself to 90 degrees where I'd want it to set itself to 45 degrees.

    https://onedrive.live.com/redir?resid=FB21E2766119D2EA!76224&authkey=!AHhzj8Ufzmfbm3c&ithint=file%2ccapx

    It's just a quick and dirty way of determining a surface angle... and apparently not a very good one.

    Might you know of a way to improve on this method?

  • Not sure I follow. When I'm on the green level, I pass overthe particles and they start. Then I leave the level and come back to the green one again, and the particles are still going.

    Do you mean quit the game and then go back?

  • Looks like the layout colour. Have a look at the background colour in the layout editor. Bottom layer. Should show a white box. Change it to black.

  • You uploaded a project. We need a single file capx.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Increase the width and height global variables.

  • Sorry, I don't understand the question.

    You're saying you previously managed to change the colour of the browser itself?

  • Link doesn't work.

  • Sorry, missed your last question.

    Have an invisible text object that contains the finished text. If spritefont = text.

  • Just so you know, you don't ever need to use Every Tick. It's just there so people can see it. Take it out, and you'll see it makes no difference.

    Put your add 1 in the collision. Remove the bool, change the bool condition to 'If var_global_txt_counter is greater than 0'.

    Saves you a global variable.

  • This is a beginner question, right?

    If right click & global variable coins > 5, create wall.

    https://www.scirra.com/forum/beginner-s-questions_f178

  • Phones are all different. That's what the tutorial is talking about. Some phones allow a 1280x720, others will form a big black bar at the bottom. If you want to fit all phones, you need to ensure each level has enough extra padding to ensure it'll appear.

    I assume you've been testing your nearly completed game on mobile devices frequently to ensure it's working.

    Play around with the "Fullscreen in browser" setting.