LittleStain's Forum Posts

  • To get this to work with as much controlability as possible i would use these third party plugins:

    LiteTween

    and

    Tween to effect

  • By far my favorite way to do this is put the events in groups and activating/de-activating the groups when needed..

    So all clicks/touches concerning anything other than the menu-clicks would be in a de-activated group..

  • on mouse click? following the pointer? using the mouse-wheel? following only when button is down?

    probably you'd want to compare mouse.x to character.x and 8 direction simulate actions..

    pretty simple, actually..

  • yes..

    How would you like to control it with the mouse..

    What actions would you like to do with the mouse?

  • I can see no reason why this app should have cpu issues.. (some minor things could be improved event-wise, but won't make much difference)

    Try playing it as a web app through the internet and you'll see it works just fine..

    The problem seems to be with the wrapper "The Developers" are using.. (Do you know which one they use?)

    Could be you'll get better results when exporting without minifying, but the problem seems not to be in your app..

  • Very simple example..

    Not very cpu efficient, though:

  • Bullet behaviour is already framerate-independant..

    It's impossible for us to see what is causing the issue, without seeing the events and/or the capx..

    Try opening the app in debug mode to see what is using the most cpu..

    Look at the amount of collision-checks..

    See how many objects there are..

    (The debugger should be your best friend if you have these kind of issues)

    Look if you don't have unnecessary every tick events..

  • Simple question:

    Might you have forgotten about destroying the sprites when they've left the bottom of the screen?

    If you have, the object count will constantly increase, which might be the reason of the overload..

    A simple game like this shouldn't be a problem..

  • A quick and dirty way that should work, would be to have two global variables

    let's call them:

    PlayerPosX and PlayerPosY

    every tick set PlayerPosX to Player.x and set PlayerPosY to player.y

    On start of layout - Player set position x:PlayerPosX y:PlayerposY

    This is ofcourse not a neat and tidy way to do it and all other suggestions are actually better than this one, but just thought I'd mention it..

  • Should be entirely possible..

    It's just a matter of choosing your way to fake the distance..

    This would obviously involve scaling (either the sprite or the layer)..

    One way would be to "shoot" sprites with the bullet behaviour from the center and scaling them based on distance to the center..

    for the trail effect you could spawn sprites with fade out behaviour at the bullet position..

    This would create a lot of sprites onscreen though, so you might want to get creative and think of other ways to achieve a similar effect..

  • Yeah you could do something similar in C2..

    Not sure if this is just setting angles or a combination of setting angles and animation..

    It's probably based on the movement speed of the character and while overlapping they don't seem to return to their old position.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Something like this should work:

    on touch

    system compare two values: touch.x>player.x

    • player 8 direction - simulate pressing right

    on touch

    system compare two values: touch.x<player.x

    • player 8 direction - simulate pressing left
  • Although I'm probably just to tired to think of an easier solution:

    Would it be possible to use the bounding box of the hitbox-object?

    If so you could check if object.imagepointx(0) (the x coordinate of the default imagepoint) is greater than the hitbox.bboxleft and smaller than hitbox.bboxright and the same for the object.imagepointy(0) with bboxtop and bboxbottom..

  • Short answer: you don't..

    Just add a new event for the touch controls you want..

    Using an "or"-block would probably be too much of a hassle here, because the touch event probably needs conditions to work as expected and this would then conflict with the keyboard event..

    You could add the browser object to check if on mobile and put the controls in seperate groups and activate/de-activate when needed, but the way you explain your controls, this wouldn't really help except for making your event-sheet more readable..

  • Although you got it working, here's my version..

    (Made it, so why not show it?)