greyspot's Forum Posts

  • Window.X gets the position of the window including the border and title bar, while Window.ClientX gets the position of the content of the window, which excludes the border.

    I see, thanks!

  • Very nice. To help me understand this a little better, would you mind me asking the difference between "Window.ClientX" as apposed to "Window.X"? I noticed the results were a hair off when I switched them, but it was pretty much the same.

  • This is now an obsolete topic. Recent changes in Construct Classic have solved this problem. Perfect window scaling is possible by simply changing the client width and height.

    For your convenience, this is copy/pasted in the .cap

    The problem with 1:1 window resizing is that DisplayWidth/Height return the actual resolution of the window while Window.Width/Height return the resolution of the window + the window handle (You know, the border and the thing with the x on it!).

    Notice at the bottom of the layout the fact that the window size is NOT a multiple of 128x128 like it should be. This is how Window.Width/Height measures it. This includes the windows handle/border.

    To use the Window: Set Width action, we must determine the width and the height of the border and add it to the multiplied DisplayWidth/Height AFTER we multiply it to scale the screen. If we don't, the game is slight stretched out of proportion. You probably won't notice this on a regular game, but on a retro/pixel game, it's ever-so-obvious that something is wrong.

    Also, as a limited time offer, I show you how to properly center the screen after a window resize! Megaman included for example, and for awesomeness.

    Good luck with your games!

    Love,

    greyspot

    Created in Construct 0.99.91.

    Opps, updated the .cap

    Combined silly things like "set x" and "set y" to "set position." Same with width and height to size.

  • Just want to confirm that this is a bug (or I am retarded and am doing it wrong) before I head to the tracker.

    With an animated sprite object, go to the animator panel and edit it's collision mask. Now, right click on it and pick "Copy Collision mask to each frame." Now check the collision mask on any frame. They have all been erased.

    Just want a few others to confirm this before I make a wrong bug report and look like an idiot :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • He deleted it because it was solved, I have the .cap myself if you want it but I will not upload it without permission but I can give it to you by PM.

    That would be nice

    It's always great to have more examples to learn from. Would have been helpful to others to leave up!

  • Thanks for contributing to the community sir! This will be a help to many

  • What happened to the .cap?

  • Very cool sir!

    Thanks for being a help to the community

  • I read it long ago.

    I was so infuriated when I reached the end... I facepalmed and hated that a good story had to end.

  • You guys sure are helpful!

    I was attracted by the open source aspect, and I already like it a lot more than GM. I just have to get used to a few things I suppose.

    Thanks guys :D

  • I disagree, give it a minute and balls will randomly teleport and disappear.

  • I cold think of a few ways, but here's one using the family picking trick:

    http://dl.dropbox.com/u/529356/TempPics/greenflash.cap

    v0.99.84

    The green sprites are in the Green family, which is then used to distinguish between instances of the same object. Any questions feel free to ask.

    It works, and this is somewhat unrelated, but if you change the target from the overlap from the green family to GreenSprite, the game crashes. Why is this? Families work here, but I don't know why they do.

    On a side note, this is the one thing I dislike most about Construct. I personally find the event system hard to use when you have many of the same object, such as in this instance. You used a family to solve this problem, but why did it work? If I needed to do this myself, I would have ended up doing it the way I told you above, and resulted in a crash. Next, I'd try all kinds of craziness with private variables and whatnot, but some things in Construct just don't seem intuitive to say the least.

    This coming from an old Gamemaker user, so needless to say, I'm used to each object working independently without having to work out which ones will be affected by the global event sheet. Construct is so much better in so many ways, but manipulating individual instances is hard for me to wrap my head around with the event system controlling everything.