Chadori's Recent Forum Activity

  • Hi everyone.

    I'm not really sure if this should be here or if this is a bug/glitch related to the canvas plugin, but I have one canvas object with origin/image point located in the middle (I don't know how it got there, but it's good-I like it where it is).

    However, I cannot seem to figure out how to create a new image point and move it to the middle-right corner. The set origin and image point button is disabled. And when I create a new canvas object its origin is always set to top-left while the button to move it is still disabled. Is it even possible to move the image point/origin for a canvas type object? Many thanks!

    EDIT: I just checked the properties bar, I can set set initial hotspot but I want to make a new image point.

    If this is about a plugin, then I think Scirra has nothing to do with it. You should talk to the developer of the plugin.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For example, if the Window size is 640x480 normally, but for certain stages/levels, I want it to zoom out a bit (like to 800x600). Is there a way to go back and forth without changing the window size for the entire project?

    If you just want to zoom you can use layer scale and layout scales to do that but If you want to scale with a specific amount of size, then you are going to need canvas size and you can just set it back to normal when you leave the layout or etc.

    Note:

    1) Out of the two, I prefer layout scale / scale rate or layer scale / scale rate better than changing canvas size because the change of scale applied on a layout/layer will not affect others.

    2) If you are using layer scale and you don't want to affect the change of scale of a specific layer onto other layers then make sure the layer name of the specific layer of you are zooming is unique.

    3) You can use layer and layout scale/scale rate to make dramatic zooms and pick specific objects in a layer or layout to be zoomed.

  • Forgot a title, sorry.

    Hello,

    i would like to create an app with different unlockable levels/characters etc. What's the best/most efficient way to do this? Creating different layers for each level or storing level data somewhere and fetching it when needed? Does anyone has experience with this?

    So far I stored every single level data in an array and fetch it when needed but I am curious if there is a better way.

    Thank you!!

    That depends on your game but most level games are made by layout per level, especially on RPG or Open world games.

    Note:Layout per level games are more efficient in terms of object count.

  • You'd have to see what you could change with system actions. Maybe changing the view size might do that, but you'd probably have to change the zoom to compensate so things appear the same size to the player. The question is would that affect the performance at all.

    No, I don't think this will help the gaming performance and just make it complicated. I'll just leave it as it is for now. Since there is still no options for this. Thanks anyways XD.

  • R0J0hound - There are rarely particles in my game and no effects because I only use blends and few objects on screen. So there should be no problem there, Because my game is sized (1280x720) causes other phones problems because to adjust to the game scale size the sprites were also made bigger. Is there a way to reduce pixel of any game for example: Low quality (360p) Medium(480p) High Quality(720p - Original) ?

  • PS: The memory dropped! When I changed layouts it was fluctuating up and down, instead of only climbing.

    All I did was do End of Layout > Destroy all (Except, I listed every single asset and set each one to Destroy.)

    I don't know, maybe it had to do something with my code. whatever it is, it worked.

    I'm just going to call it "magic" and take it.

    It's great that it is fixed but try to find the problem in the future because normally unused images are automatically removed on start of layout.

  • I ran it again and it's doing fine. I added End of Layout > Destroy Background to each level.

    The background is high resolution (the only high-res graphic.) that may have been what was causing it.

    In the debugger, I noticed that even when timescale was set to 0, it was still doing collision checks. Sprites on future levels don't move until the layout begins, correct? If the Sprite is set to 0, until the code making it move runs (when the layout is active) it stays still?

    Unless Sprites are loaded and moving in Layouts that are not. Sprites are supposed to move, but the Layouts where they're moving are not active yet. As in, when the Layout is active, they move. What i'm getting is that Sprites are not loaded until the Layout is loaded. Meaning they should not be moving.

    Because when the Layout loads, the Sprites are where I placed them in the Layout view. Which means they are not moving when the layout is not active. Yet the debugger shows collision checks.

    If the Sprites on inacvtive, future, layouts are not moving, how can there be collision checks when timescale = 0

    Im concerned about this because I don't want to melt the phones of people who get this game. Better to solve it now, then end up wrecking peoples' phones.

    Good thing that you fixed it. I am curious, what is the imagesize of your background? Is it a whole sprite? Just for future reference.

  • Phoenixbowman - Okay I understand. Can you show us a .capx file because guessing will be the only thing we can do without much information.

  • There ought to be a function that checks to see if Sprites are used on the next layout. If they are, then there should be the option to flush them from memory. That way, they're not piling up.

    Uhhm. Yes and No.

    Actually, Construct 2 adds and flushes images based on what you put inside the layout.

    For example: If I add an image of "Player1" in "Layout1" but did not add it in "Layout2" then If I go from "Layout1" and go to "Layout2" then the memory will flush "Player1" when I go to "Layout2". That is because Construct 2 only preloads or adds images from what Construct 2 sees inside the layout. Thats why if we have an event that will create objects, we need to make sure that the images of the objects are all added in the layout

  • Were your sprites "Global - Yes" ?

  • >

    > > Something is causing memory to keep increasing. The memory goes up and up. If objects were being flushed than memory would drop. Something is still running in previous layouts. I re-use Sprites from previous layouts.

    > >

    > > Do Sprites that are used later persist in memory from previous layouts?

    > >

    >

    > In my past experiments. There are some cases.

    >

    > If the sprites from your old layout is present in your new layout then it won't be flushed but if it isn't present in the next layout then it will be flushed.

    >

    The Sprites from the old layout are present in the new layout.

    Thank you for this information. That could explain what is going on.

    Will doing at End of Layout > Destroy A destroy the sprite and flush it from memory?

    On End of Layout > Destroy A

    Destroy B

    Destroy C

    A B C and are on the current layout. Will that function destroy A B and C, even if they are present on the next layout?

    I think you misunderstood something Phoenixbowman .

    The images of the sprite are the only thing stored in the memory not the sprites or objects nor instances. The instances you are talking about (The Objects on the layout, THE number of sprites) are codes that are generated by the things you put in the layout or you created using the eventsheet.

    IE: 100 instances of 1 sprite of 32x32 image

    (100 instances are code during layout and not persisted on next layout in other words they are only available in that layout and is cpu based not memory.)

    (1 sprite of 32x32 image is stored in the memory)

    Explanation:

    1 image of 32x32 image or frame is stored in the memory and the cpu is used to make them 100 instances and do movements.

Chadori's avatar

Chadori

Member since 10 Oct, 2014

Twitter
Chadori has 49 followers

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • RTFM Read the fabulous manual
  • x2
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

24/44
How to earn trophies