Christmas's Forum Posts

  • Hi all,

    I been working on an idea for a while now, but I'm only half satisfied with the way it controls so figured I should swallow my pride and ask the mother-brain for help.

    Essentially, it's a kind of pullback toy car. Here's the bare bones of it. https://www.dropbox.com/s/5rkgpjwx2tc2wu3/Pullback%20Test.capx?dl=0 Just drag the car back and release it.

    It borrows heavily from the examples of how to make an Angry Birds style catapult, but with Zero world gravity to make it top down, and dampening on the car to make it a bit more realistic (a bit). In hindsight this may not be the best way to approach this but couldn't think of anything better. The main issue I'm having is how to stop the car being moved through walls while it's being pulled back.

    Would I perhaps be better using Drag and Drop behavior to pullback the car? If so how would I make that affect the physics impulse AND be able to stop it when its dragged into a wall? There are no real hard and fast rules here, except that the car must have Physics behavior and it's propulsion speed upon release must be based on how much it has been pulled back.

    Any ideas, suggestions or feedback would be greatly appreciated.

    PS: The cute car asset is from here http://www.kenney.nl/assets/racing-pack

  • Maybe try something simple like

    On enemy Fire (or Missile Activate? Whatever your trigger is)

    Is Player.X less than or equal to Enemy.X then Set Enemy Mirrored

    Is Player.X more than or equal set Enemy Not Mirrored

    If its more of a top down game, then maybe try setting the Enemy Angle towards the player

    Sorry not more help but can't follow that link so unable to look at your file

  • Keep an eye on my Box2D+ plugin in this thread. I'm working on a platform behavior helper plugin that will supplement Box2D+ and allow you to control an object in the same way as the platform behavior, but (of course) it's a high performance physics engine as well. The helper plugin should be ready in the next few weeks...

    Looks great Colludium

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ultimately dop2000 is right. To get this really good you're likely gonna have to go crazy tinkering with physics impulses and all that jazz to somehow make it into tight platform controls. One more simple solution might be disabling and enabling physics and platform behavior. I quickly tried this. Still less than ideal but could be something to get you started KefiRocK https://www.dropbox.com/s/vsahncfjokth2bx/Physics%20Platform%20Test%203.capx?dl=0 Good luck

  • I reckon with a lot of tinkering and some time you could get good results starting out like this? But it would be a big job and probably really frustrating. What about using custom platform behavior on an Immovable physics object instead?

  • Like dop2000 says, if you have an invisible physics sprite pinned to your platform characters movements it should work as long as you set the pinned physics object to IMMOVABLE. Know that sounds weird but the platform behavior will do all the movement for you.

    https://www.dropbox.com/s/8xnnccnv5qf7l2z/Physics%20Platform%20Test.capx?dl=0

    Try fiddling around with something like this

    It does kinda work without an extra physics sprite if you give both platform and physics behavior to your player (and set physics to immovable) like this https://www.dropbox.com/s/nfsjqu7j6sehehl/Physics%20Platform%20Test%202.capx?dl=0 but it feels a little shonky, and you will likely have more control if you pin a separate object. Physics objects can be unpredictable so you want to make sure its easy to turn it off and on again if it misbehaves

  • Didn't think family's worked quite like that? That's awesome. Do that then... Less fiddly event nonsense, simpler the better

  • Not the slickest solution but it will work. You could add a global variable called 'Objects' set to 0

    Then add a couple of events

    If Objects = 1 Create 1st Sprite

    If Objects = 2 Create 2nd Sprite

    Repeat for however many Sprites you want

    Then add an event, Every 1 Second Set Objects to Round(Random(1,2))

  • Appreciate the offer but I reckon you need to get your head around this stuff yourself. Tell you what, cos I'm having a slow work day, I'll get you started.

    I've stripped the camera down here to bare bones basic behavior. I hope the comments are detailed enough. I think this works well and its easy for you to customize to your liking.

    https://www.dropbox.com/s/mi39lte83os7arw/game%20wip%20Simplified%20Cam.capx?dl=0

    Try to simplify your work as much as possible. Sometimes the most obvious solutions are the best. Keep looking on the forums for tutorials and download example Capx's of things when you can, then pick them apart. There's a lot of talented people on here. I often get stuck yet I very rarely have to ask for help cos someone usually has had the same problem as me in the past, and has already been answered by some kind of random super genius in the forums/tutorials.

    Good luck with your game

  • Hey redeemed t

    Hope this helps https://www.dropbox.com/s/fifqc08wm39akq1/game%20wip%20CHRISTMAS%20NOTES.capx?dl=0

    Basically it detects if you are holding the Down key or not, and if you are then it detaches the camera from its designated behavior and moves it downwards. Releasing the key snaps it back to above the player. You would be better having a nice Lerp movement here to move it back smoothly, but with your current camera set up I didn't want to mess with that too much as it could break what you've done.

    I would consider simplifying your camera system to make these kind of custom camera movements easier to do, but you may have your reasons for setting up your camera this way. There's no right or wrong way to do these things, it's whatever works for you and your game.

  • Sure. Sharing a Capx is always best. Hope I can help

  • Do you have Scroll To behavior on your character? Try removing that and instead placing the Scroll To behavior on a separate camera object that you can control separately from the player.

    I had a similar problem the other day and got some really good help. Try looking at the capx examples in here https://www.scirra.com/forum/viewtopic.php?f=147&t=197672&p=1149032#p1149032

    This is basically a camera object in the center of the screen that can move back and forth from the player. You could try modifying something like this. Or simply put Scroll To and Eight Direction Movement on a camera object. Set it so the camera can only move up or down. Then have the camera pinned to the player unless the Up or Down directions are pressed. When you release Up or Down it can snap back to the players position

  • Y'know what Eindbaas? That is pretty damn slick, and the fact that you've got it down to a single variable, and labeled said single variable as the "Smoothness", wins you points for being one smoooth mother.

    You've added a few more sprite objects, but those paticular type of solid barrier objects are going to be neccasary for my finished product anyway, so that's all good as far as I'm concerned. I will say that I would be interested to see if anyone could do this without any 'camera' sprites at all, but to your credit you only used two (and the replacement for the camera shaking is excellent). This is more than enough "smoothness" for me, and a definitly 'more elegant solution' to the lovely mess that I made. Thank you very much Great stuff X

    Oh... and I'm really sorry about the plugins. I honestly thought I'd deleted any use of those plugins before I uploaded it to Dropbox. I'll check that again tomorrow and re-upload it (not that my original capx will be needed after this, but maybe something in there could be useful to someone for something, as I did try out some interesting crap).

  • Hi all, I've built a system for a camera that pans towards the players location and zooms in when you hold the Z key, then zooms out again when the key is released. It works well and does exactly what I need it to. Problem is that its not the most elegant solution and I could do with some tips on how to streamline it and get rid of some of the unnecessary events, variables and sprites.

    https://www.dropbox.com/s/m6v8l3jt48bj5wz/ZoomTest.capx?dl=0

  • Thanks so much guys. I was having some real trouble trying to do pretty much this same thing, and you've solved all my problems. Great work.