annauva's Forum Posts

  • Really? That's awesome, I feel stupid now. Thanks!

  • That uses the browser invoke download that I mentioned, but that won't work when it's an app I presume? Since it's not in a browser then.

  • I've searched like crazy for a solution but I can't find anything that works!

    I want to save a snapshot to the mobile gallery. That should work somehow I think..

    The browser invoke download thing won't work when I export it onto an app, right? So I need something else. I've tried to read about the LocalStorage, but I don't understand anything there. If someone could explain to me like I'm 5, I would really appreciate it!

  • Ok, I changed the scaling from Scale inner to letterbox scale, and then it works.. But as I understand it, it's scale inner I should use so that it works will all different screen sizes later when I export it? Hm..

  • Forgot to say that the actual size of the object "snapshotarea" is 1140x1440px

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So I'm trying to take a snapshot of part of the canvas, and then download it. I actually want it to download to the gallery on the phone/ipad when you use it as an app later, but I can't even get the snapshot to look right, so first I need help to solve this weird thing.

    I have used this code:

    But the image that downloads always get the dimensions 1920x911px no matter what I do! So strange. I don't have any other code that tells the canvas to change it's size or anything, so I don't understand why it does that. I can't upload the capx here because it's a big project and kind of secret. And when I made a new project and try this with dummy images, it works!

    Just thought that maybe someone has an idea on why it does this strange thing?

    Thanks!

  • I agree on what ashley said regarding memory usage but you should still destroy non-used objects on the layout on startup on negative(-) coordinates since many objects present on the layout (even invisible) still affects fps and cpu usage. I recommend preload images on startup by putting all sprites(images) or tiledbackgrounds(images) that are going to be used on you layout on the outside part of the layout and destroy on startup , create to insert the outfit & destroy to remove the outfit.

    Ok, that makes sense. I will probably change it anyways then, we'll see!

  • Oh ok! I haven't put nearly everything in yet though, so it's probably going to be like double that..

    But when I try it on my phone there is no problems at all, and it also doesn't have any animations or stuff like that so maybe it should be fine anyways!

    Do you know if there is like a limit I should keep under for the newer devices?

  • I'm making a dressup game for ipad and phones, and my memory use says 170 mb which I know isn't very good.

    I've read the blog posts about memory use, but it's hard to optimize this game since it needs a lot of clothes and color variations of all the clothes also. So there is a lot of images!

    But I now have all the objects in the layout, and just make the different "closets" invisible and visible when the user presses the buttons in the menu.

    Is it better for memory usage if they are placed outside of the layout and are created and destroyed instead?

    As I've said, I've read the posts about it but I still didn't quite get if it still takes up memory usage even though it's not all on the layout all the time.

    It's a lot of work to change everything so I thought I'd just ask for advice here first!

  • wow thank you SO much, I had no idea that it guesses the collision shape! I just assumed that it's the same size as the png file. Thanks again!

  • I'm making a game with drag and drop, but I have a problem. I'm using the drag and drop behavior, and it's working well except that only like half of the object surface is "clickable". You have to click on the top half of the hair in this case for it to work.

    I know I can use an invisible sprite that is draggable and pin the hair to it, but it would be a lot easier if I could just do it this way and have the whole object be clickable.

    Anyone have any idea on why it's doing this?

    capx: https://dl.dropboxusercontent.com/u/624 ... phair.capx

  • Ok but hm.. The thing I'm trying to do is, (it's an interior decorating game) create a bunch of sprites here and there. And then you can select one sprite (you click on it and a small menu appears). Then you can rotate it and so on, and also delete it.

    So if the user has created multiple instances of a table for example, I only want the selected table to be destroyed and not all instances.

    When I tried to put all furniture sprites in a family and add a variable to the family, then it destroys all the furniture :/

    Here is an test version so you can see https://dl.dropboxusercontent.com/u/624 ... utton.capx

  • Thanks! Could you explain just a bit more how I do that, I mean, do I add a condition to when the trash can sprite is being clicked? Do I choose Pick by Comparison there? I'm just so confused. When I choose Pick by comparison, it says "expression" and I cant find the variable I've created there so I don't get it.

    As you can hear, I'm still learning hehe. Not used to using variables.

  • I've searched but I can't find anything with this particular thing I'm trying to do so I hope you can help me!

    I have a trash can button, and when I press that I want to destroy instances with a certain instance variable. I know how to do it if it's just one object with different instances, but I don't know how to do it with different objects at the same time.

    Hope you understand!

  • woah thanks! I had no idea that was there, I've been googling like crazy but only found two tutorials and no mention of this one.. I need to start looking through the examples before I google in the future I guess.

    Thanks again, it worked just the way I wanted!