LittleStain's Forum Posts

  • > You should remove the action set animation to idle in event 1, because it conflicts with your other events..

    >

    Every tick - set to idle ?

    I think that is good becouse if the player is not mooving it is going to stay on IDLE so that is not a problem

    You might think it is good, but it's not..

    The event is conflicting with every other event setting animations, because it is performed every tick without any conditions, but if you don't want the answer to your question, that's fine with me..

  • I'll try this when I get home tonight and let you know.

    Just for future reference I want to make sure I am reading what you are telling me correctly.

    "--" = Sub-event

    ">" = Action

    " " = Condition

    Is that correct?

    Once again, thanks a ton LittleStain!

    That's the way I write it, yes..

  • You could also use choose instead of random:

    For animations

    sprite set animation to : choose("animation1","animation2") etcetera

    For spawning at imagepoints

    sprite spawn object on layer at imagepoint choose(0,1,2,3,4,5)

  • You should remove the action set animation to idle in event 1, because it conflicts with your other events..

  • Must be my question being confusing. I was asking about which is better for performance, resizing the Image of the TiledBackground smaller or resizing the Tiledbackground smaller itself? The other questions were just addons...

    Are you having performance issues?

    If so, resizing the tiledbackground (in game) itself won't have a noticable effect, because the amount of image memory used for it will remain the same..

    Reducing the amount of pixels of the image, would..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • >

    > >

    > > So the (Ingame sprite or tiledbackground) size or instance count doesn't lower performance (cpu or ram) is that what you mean only the ImageFile?

    > >

    >

    > Not the file, just the image..

    > The size in the game effects the drawing, not the (image-)memory it occupies..

    >

    I am beginning to think I don't really understand the optimization guide of Ashley now. So performance is only based on what is seen on the screen. Thanks i'll keep that in mind. But why do we need to turn off the Collisions outside the screen view according to some guides ? And why do we need to maintain object count if we can just scatter many objects that will not be seen together in the screen view?

    You don't understand what I am saying, or I don't understand your question..

    You were asking if it would be wise to make your image smaller and my answer was that it wouldn't matter that much, because it only take 615x194x4 bytes in memory..

    Collisions have nothing to do with the image, amount of objects have nothing to do with the image..

    So I don't know where these suddenly come from..

    Cpu is something different from gpu..

    I was talking about image memory usage..

  • So the (Ingame sprite or tiledbackground) size or instance count doesn't lower performance (cpu or ram) is that what you mean only the ImageFile?

    Not the file, just the image..

    The size in the game effects the drawing, not the (image-)memory it occupies..

  • > It will work if you set the width of your background to 3690px

    >

    > To get the background to be at least the width of your project, it needs to be 3x615px(it's original image size)..

    > To make this code work, it has to be twice as wide, so 3690px

    >

    Wow! Great Thanks, Just another question. Does making your tiledbackground larger lowers the performance? Which is better? to resize my imagefile(the image of the tile) so that it can maintain 2560px or just leave the tiledbackground size to 3960px?

    Your image is 615x194..

    That is the image size in memory..

  • It will work if you set the width of your background to 3690px

    To get the background to be at least the width of your project, it needs to be 3x615px(it's original image size)..

    To make this code work, it has to be twice as wide, so 3690px

  • > Could you share your capx to clarify your question?

    >

    > For the above event to work, the image doen't have to be the same width as the layout..

    > It has to be at least as wide as the layout and repeated two times, because it only moves half it's width every time..

    >

    Yeah that's true, already tried to resizing the background by x2 or changing Self.Width / 2 with /1.909 or something that'll fit the size of the image..

    I'll post the .capx in just a minute..

    ehhmm..

    I don't understand what you mean with 1.909..

    self.width is the width of your object, so why would you have to change anything?

    You'd still want to move the object half of it's width, right?

    Waiting for the capx..

  • Manual entry UID

    Manual entry function-object

    (look for the part about parameters)

  • You don't need to check the colour..

    I'm guessing if you are using a sprite, the colours would be animationframes and you can just check for those..

    If you want to use 9-patch or tiledbackground, just put them in a family.

  • Easiest way would be to use an instance variable (on the family?) instead of a global variable..

    You aren't referencing an instance right now, so the action is performed on all instances..

    If you search the forum for "select instance" you will probably find many examples..

  • Could you share your capx to clarify your question?

    For the above event to work, the image doen't have to be the same width as the layout..

    It has to be at least as wide as the layout and repeated two times, because it only moves half it's width every time..

  • You now have two events with the same conditions, so yeah everything happens two times..

    You can completely remove event 18 and sub-event 19 and remove the action on what is now event 22..