HellMax's Recent Forum Activity

  • But then grass just stays the same; and other sprites look floating in empty space.

    Also, what exactly is a "scale factor", because there are several scale properties in Construct.

    Although I might have misunderstood you, let me test smth and get back to you.

    UPDATE : Okay, although a genious idea; this does not work as well as you'd expect :

    1. Grass is too small and looks odd

    2. Everything now looks as in its floating on grass, not built on it (since grass's scale is now 0.5 when layout's scale is 1.0)

    Any way else? Point sampling does the job extremely well, but it results in weird flickering on anything that moves smoothly, which hurts the eyes.

    Other ideas?

  • I have a large map -> 10000,5000 <- with tiled grass all over it.

    The game I am making has a vital function of zooming in and out, and, while every other sprite can just have a much bigger resolution (and smaller sprite size then it's res) and look good both faraway and zoomed; you are unable to do such a thing with tiled background.

    How do I make so that the tiled background would not go blurry and ugly upon zooming into it?

    Thank you in advance.

  • The resolution is 16:9 1280x720; yet the sprite itself is quite small, only 78x177.

    Also, pixel rounding is disabled on the video I provided.

    I am not planning to run on mobile, only NWjs (the game is rather large) thus I need a solution regardless of mobile performance (thnx for warning tho). I will try a scaling filter

  • I'm making a game on NWjs ; with cars moving on Physics and Physics alone. Therefore, every single wall in game is a physics immovable (although every single wall is a copy of wall1, not wall2). Could it potentially bring about performance trouble? (Map is planned to be bigger than 100,000pix)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As a better indication of what I mean, here's a video

    [quote:3e3sskbg]https://www.youtube.com/watch?v=pByASN8guFc

    Notice the black lines going back and forth as if the renderer had trouble updating all of them at once.

  • Enabling pixel rounding just makes it seem like it's horribly laggy.

  • I have a pixely game, based on physics movement - its a car game. The car is pushed by Physic's force and moves around okay. I really need point sampling, as without it the pixely graphics look s**t; but there seems to be flickering lines, as if updating only happens over time, which puts quite a strain onto one's eyes.

    Please help; is there a way to minimize/remove this?

  • Greetings! I am currently using :

    int((P_hull.Physics.VelocityX^2 + P_hull.Physics.VelocityY^2)^0.5)

    to get velocity of my car every tick. What I really need is a way to get car's velocity per second, in Pixel per second, lets say. How do I pull this off?

    Thanks in advance.

  • Ah . You can actually raise the linear damping coefficient past 1. I'm not sure why they listed a maximum value - in real life it can be any quantity greater than zero.

    Well thats interesting

    Thanks

  • Well it is a 2D engine. You want it to work as a 3D engine.

    When you move a Sprite with an X and Y vector, then whats under that sprite is depth, or Z.

    Density, Friction, and Plasticity is about interaction with objects in the XY plane, not Z.

    But. You can do this. You need to detect what it is overlapping. If they are different sprites, give them an instance variable 'Friction'. How more the value in it, how more the slow down. Value should range from 1 to 5 or so.

    If they are different sprites, you need a Family to group them in 1 'is overlapping' event.

    If they are instances of a sprite, you best write the value of that instance variable 'on start up' depending on the animation frame.

    If it is a tilemap, it will be easier to use a lookup table(in the form of an array) with X-index = Tile index, and the slow down value on the Y-index (x,1).

    For sprites.

    (Tank) is overlapping (ground)

    _____ (Tank) Set linear damping ... to Sprite.Friction

    For a tilemap.

    Pick the Tank somehow

    _____ (Tank) Set linear damping ... to ... Array.at( (Tilemap.TileAt(Tank.X, Tank.y)) , 1) .. assuming that X=index = tile index, and y=1 is that slow down value. The array is a lookup table, you use it to translate a value (stored on X) to a paired up value (stored on Y).

    An excellent scheme, will definitely use when work will begin on different ground types.

  • No worries. Most of the things you need to know about the way physics simulations work aren't actually taught until you take a course in numerical physics or modeling at the university level, so you aren't alone!

    Here are the basics:

    Friction: This sounds like it should be what you are looking for, but it is not. In computer games, "friction" is a retarding force between 2 physics objects, but since this is a top-down game, the "ground" is actually not a physics object. Therefore friction will not have any effect in a top-down 2D game.

    Linear damping: This is probably what you want***. Linear damping applies a force backward that is proportional to speed. The slower the object is moving, the smaller the retarding force. Note that this technically means the speed will never reach zero, but it will quickly approach zero such that you can apply a check to see if speed < 1, set speed = 0.

    Angular damping: This works just like linear damping, but for rotation.

    ***Note that "linear damping" is actually a better simulation of air drag than of skidding along the ground. Ground friction is best modeled as a constant force, but you will need to do a number of additional checks to make it completely accurate, and I'm not sure it is worth the effort and extra events for a game. To see the difference between friction and air drag in action, go to https://www.simbucket.com/simulation/rocket-sled/.

    Okay, thats very helpful

    Now comes a trouble that even on 1 (maximum) some movement still noticeable after the force stopped being applied. How do I make it stop dead when the key W, for example, is released?

  • I am moving the object ( a tank ) with physics forces, for it to work well with Immovable walls etc.

    The only trouble it seems is no Dentisty-Force ratio provides what I need -- the tank to stop when force is not applied any longer. It always floats like its on ice.

    Please not that setting velocity to 0 when key is released does not work since I want it to collide with walls and other vehicles.

    I am very new to Physics, so excuse me If I asked something dumb. There seem to be very few tutorials on Physics.

HellMax's avatar

HellMax

Member since 3 Jan, 2013

None one is following HellMax yet!

Trophy Case

  • 11-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

13/44
How to earn trophies