Hillstrom's Forum Posts

  • You probably found it already but this topic seeks the same mechanic (if i'm not wrong). there's some capx there:

    http://www.scirra.com/forum/collisions-with-multiple-objects-same-spot_topic71607.html

    By the way i'm interested in this kind of mechanics, that's way i'm messing around.

  • Sorry to steal a topic but since there's an answer from just yerteday i better do it now:

    My question in relation to this topic is:

    In this kind of games where a lot of tiny sprites attacks in a fixed, predictable fashion as a whole. If i see this game i still imagine each group of tiny chars as one invisible object of the side of the entire group. And the little sprites are just a single sprite with animations that give the ilusion of being multiple different objects/sprites.

    It's a good technique? It's the one used in this game or i'm talking nonsenses?

    For example, Kingdom rush doesn't seems to use groups as Ninja Town do. Where each sprite/char can separate and be used individually.

  • Works like a charm! Now i can throw physical objects agains non-physical objects (and viceversa) and works almost perfectly to the naked eye!

    Thanks you very much R0J0hound ! You make my friday!

  • In you capx I see the same code you posted in your first capx.

    I'm installing Dropbox in this machine since my other blowed up on me.

    What i mean is that in X an Y expresions of "Set angle toward" you could put:

    X: lerp(Self.X, Touch.X, dt*0.5)

    Y: lerp(Self.y, Touch.y, dt*0.5)

    Play with dt until you have something less jumpy.

    Also you can use this to stop the object at the touch position (your finger or the mouse's cursor):

    (As a subevent of "Is in touch")

       System|>Compare two values|>distance(Player.X, Player.Y, Touch.X, Touch.Y)<=10 = Set Bullet speed to 0

    Play with that 10 to match your desired offset. It helped me overcome shakiness when the player reach the destination point.

    About the sprite trespassing your walls. I don't see it happening in my example.

    My only difference is that my wall objects have always the same or more width. And i have "Pixel Rounding" on. But i doubt this cause issues on collisions.

  • Oh nice to see you R0J0hound helping me here! I'm still playing with your latest formulas for the same project :D

    Damn, seeing your methods i feel dumb or you blow my mind..

    Now is dumb time.

    I will check this stuff once i leave my office.

    Thank R0J0hound!

  • If you change the Speed Event to the Angle Event your sprite will move better.

    Something like this:

    Is In Touch=>|Set Speed to=> <<Something>>

                          |PlayerObj=>Set angle toward X= round(lerp(self.X, Target.X, 2))                                       

                                                                         Y= round(lerp(self.Y, Target.Y, 2))

    You can add dt to the thir value as you did.

    If you add Solid behavior to your moving Object and add Solid to the collison object for the walls it should collide.

    (As long as you enable Bounce off solid on the bullet properties of course.)

    This movement works for me.

    And, by the way, if you find a better movement method tell me :D

  • I forgot to add my ways to deal with fake Dampening and Elasticity.

    Right now i'm faking Dampening with this events using Bullet Behavior:

    (Given some kind of propulsion to object Player with bullet behavior)

    ObjPlayer=>BulletDistanceTravelled > 100 |Actions=>|ObjPlayer.Bullet.Speed = -(200*dt)

    BulletDistanceTravelled is a system condition

    Bullet Speed is the speed taken/given from/to the bullet behavior.

    If i add another event to slow down acceleration i get more dampening but since i cannot reset BulletDistanceTravelled it starts to acumulate until theres no more movement even after a new collision agains the object.

    This is my envent to slow down acceleration:

    ObjPlayer=>BulletDistanceTravelled > 100 |Actions=>|ObjPlayer.Bullet.Acceleration = -(50*dt)

    Using only the speed event seems to work okey as a Dampening emulation, adding the acceleration breaks it the more the objects moves.

    Some know a better solution to simulate Linear Dampening using Bullet Behavior?

    And to fake Elasticity i give a multiplier to the speed of the object at collision. I didn't play much with this one. Dampening is my priority.

    I need some ideas for this two effect if someone know of one.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello all!

    I'm playing a lot with physics and bullet behaviors in top view (no gravity) trying to emulate as much as possible some physics attributes.

    I can interact with both behaviors mostly nicely. But the more i can "cheat" with bullet behavior the better (for performance).

    So far i'm good faking force, impulse, density and normal bounciness with the bullet behavior and some dangerous "set positions" and angles.

    But i fail to get Linear Dampening/Friction in a believable way.

    Also i fail to make a "bumper" effect so Elasticity is also a failure on my list.

    Someone know how to emulate those effects without the physics behavior?

    Any method can be used i don't mind. You can even fake the effects as i do. Don't need the perfect equation to simulate the effect exactly (as i'm trying to gain performance)

    Thanks! I will give further info is needed.

  • Thank for the replies!

    So in the end it's all about formulas than hardcoded positions. I was talking with a friend about this (my friend is a programmer), but i ended up blowing his head off with performance issues.

    I will try your equations R0J0hound thanks for your help with this!

    Playing with combinations of Physics and sine behavior i found that they don't play mean with each other as i expected. I will try to add bullet behavior to the mix. I didn't take it into account for some reason.

    Let me see how it goes!

    Thanks for helping me ;)

  • I wrote a topic about this kind of movement (a request not a solution).

    I forgot that sine Behavior will not work well with physic objects so i'm in a double trouble with this kind of stuff.

    You solved part of my problem with your custom "sine behavior" (and sorry to steal the post). I also ask some insight of the code, mostly what all those variables do so i don't program in the dark something similar.

  • I have to refloat this topic since i'm still struggling with a method to make "movement patterns" or "arrangements in custom shapes formations" and things like that.

    More examples of what i try to do (do and do efficiently):

    1) Move objects in an eight shape or spawn an "eight formation" of objetcs.

    2) Move objects in some kind of curved line or zigzag line.

    3) Move objects around another object following a rotating path around it. (Like orbiting around an object). This one is easy but i put it as an example of Movement Patterns.

    Again the link of a game with a lot of this kind of movement patterns i want:

    Subscribe to Construct videos now

    What make me dizzy is how to save those patterns in a efficient way.

    Hard code them? Spawn objects with an array? Create an xml with each movement and call functions from this file?

    Fixed formations is one thing, but movements following a figure kills me.

    This feels like the way one should program "Bullet Hells".

    I need some direction here   <img src="smileys/smiley18.gif" border="0" align="middle">

  • Hello all!

    What i'm trying to do is a way to build a level with objects arranged in specific patterns in relation to other objects or with some "formation" pattern by themselves.

    To best clarify my intention see this quick video:

    Subscribe to Construct videos now

    It's a Arkanoid like game with many objects following different movement patterns, like circling around an object, or following a zigzag line.

    Some movements and patterns are easy to do. Sine Behavior and Pin Behavior solves many of those patterns but some others seems hard to make.

    The "line movement" with or without abstract form is a hard one for me.

    Circular movements around another object feels like a Pin thing with parenting and rotations but sometimes it doesn't work as intended.

    Anyway, if someone made similar movement patterns and know how to make them in a manageable, editable way. I will appreciate it.

    (Also interested in how to best load those patterns, like using xml, or something like that)

  • To narrow the question:

    How would you make a circular sprite with "physics" on, without rotation, to move sliding narrow curved halleys? Again like in pinball games, popular puzzles games like "Rolling Hero", "Rolando", "Iblast Moki", "Worms Golf", etc.

    This question not only is related to a "best way" to move the object. But also how would you build the level so the physical object collides and slide correctly and performance aware.

    I'm missing something here..

  • Hello all!

    Did you see all those games that uses curved scenary in many "physics puzzles games" like "Rolling Hero", "Rolando", "Iblast Moki", Worms Golf, etc?

    My question is:

    What would be the most accurate and optimized way to create such levels. So when you shoot a ball it rolls along the curved surface.

    I could think of "sprite chunks" with a hollow zigzag alley or building the level with two halves of what makes the curved alley.

    I guess i should use masks but big sprites are always a bad idea.

    Any advice about this kinds of levels in regards of precise collisions and rollings around the irregular surfaces will be appreciated!

    Thanks

  • Pixel Perfick,

    I really liked your method there. I will take it as a reference for this and also future projects. I don't know why i cannot solve this kind of problems. In others bussiness i always had my tricks and solutions to "manage" payments. I guess it's because this line of work is new and a partner of two with my added "protection" of interest throws conventional methods out the window.

    I consider myself satisfied with all your help people! As i said before, keep showing more of this for anybody else in my same position.

    Regards and thanks to all of you! ;)