Ruskul's Forum Posts

  • I think that there are some aspects to the copy/paste/move that didn't seem to work as expected until you realize there is a difference in clicking an event vs clicking an entire box... I do agree that sometimes It doesn't seem to work as smoothly as it could.

    I really like the idea of a line based event editor that is similar to simply writing code. Once you understand the event system and all the commands it is much simpler to just bang em out via type than the messy box dialogue system.

  • It turns out that you can only get the window resolution and not the device resolution. If I use crop mode and then ask for the window size I can do some math to figure out the amount to scale the layout.

    I wish there were an integer scale mode that supported a cropping out to fill the space.

  • Layout scale adjusts the scale of a layout. Indeed I would use this to control the zoom but before I can zoom I need to know how much. For that I need the resolution of the display....

    For example. Lets say I have a game with 100x100. On a 200x200 device I would set the layout scale to 2. on a 300x300 device I would set the scale to 2... crop would fill out the edges... Basically I would scale by whole numbers but I need to know the display resolution to do this.

    May question is - how do I find the resolution of the device?

  • I think that construct needs a tile map that works with linear interpolation.

  • Hey,

    I need to be able to find the resolution of the device the game is running on.... Basically I am running the game in crop mode, if the screen is 2x a ceartain size I scale the layout by 2 and so on. The reason for this is that it is like integer scale mode but combined with scale out/ inner.

    I think this is the only way to do it but I may be wrong

  • nice, I swore I looked for that but didn't notice it. Thank you for your reply. If I make a barebones layout I can just duplicate it and it will be ready to. Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey all,

    I have a project in which I have 18 layers that I intend to have unified across the project on all layouts in order to make use of global objects. How can I copy those layers into another layout? (When I create a new layout I have to manually enter and name 18 layers, which takes a lot of time - seems like a job for a computer)

    Thanks, I am sure I have just overlooked the solution.

    #nutsandbolts

  • I'll have to try this when I get a chance. I think so though. Thanks alot. This has been bugging me for a while.

  • Hey all,

    I was wondering if it were possible to rotate the camera in construct 2. I understand the math behind rotating objects in 2d space around a fixed point - rotating the whole world to make it seem as though the camera is rotating would break a lot of the behaviors. Unless you make all the objects invisible and then have visible sprites rotating around but that would be increadibly messy. I know the code for rendering rotation is easy but how is it done in contruct?

  • How does one create an integer scale mode that expands to fit the screen?

    basically I want integer scaling with the ability to crop in our out as the scale inner and outer do.

    Scale inner and outer modes don't work with retro pixel graphics though. neither does letterbox scale. crop mode doesn't take into account any sort of zoom to make the pixels stand out.

    Is this feature simply not available with construct? or is there some work around? I think that it should be a feature though. As it is, there are simply to many screen sizes on the market to not be able to do this with retro graphics. It kind of makes retro unfeasible

  • Sorry, to clarify, I am in frame rate independent mode. I talked to Ashley about it and it may be an issue with the debugger not reporting the right value. (I am still waiting on the status of that) So, basically, just because the two values don't look the same in the debugger doesn't mean that they aren't.

    You can see an example here: dropbox.com/s/h3eku40e03wtill/debugProblem.capx

    You have to run in debug mode and then look at the global variable and compare it to the velocity variable (if that makes sense)....

    Thanks for all the help!

  • I had it multiplying by dt because that was a lot closer to correct than the not, but still a little off (I originally thought it was a dt issue).

    Thanks, will the fix be in the next release?

  • Link to .capx file (required! If link is blocked remove the http and www parts):

    dropbox.com/s/h3eku40e03wtill/debugProblem.capx

    Steps to reproduce:

    1. create a physics object

    2. store a velocity from the physics object in a variable

    3. compare that variable to the listed result in the debugger for velocity

    Observed result:

    There is a difference between the stored variable and the velocity of the object as read by the debugger

    Expected result:

    The variable storing velocity and the debugger reading of velocity should be the same. (are they the same? - is it just a wrong interpretation)

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Operating system & service pack:

    windows 7 64 bit, service pack 1

    Construct 2 version:

    Release 158.2 64 bit

    * You must run the file in debug mode. and inspect sprite.physics.velocity and compare it to the variable stored velocity.

  • Okay, I have a long and complicated problem that I have been dealing with and I have finally gotten to the bottom of it - but alas I can't figure it out.

    When I run the debugger I notice that an objects velocity not is pixels per second which is what the manual says. It is also not pixels per tick. In the end I have no clue what it is.

    I am basing this off of the following code:

    (delta X)*cos(90)

    + (delta Y)*sin(90)

    which should theoretically return the distance an object has traveled along an arbitrary angle (polar projection). In this case it should be the same as the y velocity of the object but it is not. Also if I just check deltaX and DeltaY and compare them against velocity X,Y they are off. Deltax is 0.833(and then some, give or take) * velocity x. What is going on? Did I miss something...?

  • Hey all,

    So I know that if I have a vector in Cartesian space I can find the the vector in polar coordinates (angle, length) by calculating as follows:

    Angle = system angle(0,0,x,y)

    length = sqrt (x * x + y * y)

    This works, but is it the most efficient way? I always heard its a good idea to avoid sqrt because it takes a computer alot of work compared to other equations...

    Is this the best way? or should i try something like L = x / cos(angle)