Usman Haq's Forum Posts

  • SoldjahBoy, Thank you!

    This is amazing, this is exactly what I had imagined. I will definitely play with this and see how far I can take it.

    Thanks again!

  • Hi Usman, sorry I have been super busy with work. I will make something for you as soon as possible, or I will at least try. I'm not 100% sure my idea will work but I think it should.

    *EDIT*

    Did you need the sprites to travel left AND right or just one direction only?

    ~Sol

    Left and Right.

    Thanks for your help, even with being super busy!

  • Yeah I'll see if I can make an example of this a little later today when I get some time. I have a few things on today, but later on I should be able to throw something together

    ~Sol

    Hey there,

    Any luck with an example?

  • What are you using to build your app?

    Intel XDK or Cocoon.IO

  • Will they always be traveling to the right or will they also be going left sometimes as well?

    I have an idea how to make it work - and should even work with terrain that's moving up or down, but implementation will be a bit different depending which way the sprites are moving. If always to the right it will be a bit easier, but if they need to go both ways it will be a little more tricky.

    Basically you will need an instance variable for each sprite, let's call it "direction". You will then need to set this instance variable to either "up" "down" "left" or "right" (or 1,2,3 or 4) using conditions - then set the movement in the desired direction based on the variable value. You will need a second variable for which *general* direction it's heading (left or right) if the sprites can move both ways. This second variable will act as a secondary condition check.

    Pseudo code:

    ----------------------

    [condition]

    --- sub event

    --- sub event

    ----------------------

    (these vents would handle the "flat" sides of your sprite collision polygon)

    [sprite is overlapping terrain at offset.x +1] (or x-1 if moving left)

    --- Set Sprite.DirectionVariable to "up"

    [sprite is overlapping terrain at offset.y +1]

    --- Set Sprite.DirectionVariable to "right" (or left)

    [sprite is overlapping terrain at offset.x -1]

    --- Set Sprite.DirectionVariable to "down"

    (Diagonals would be a little trickier)

    [sprite is overlapping terrain at offset.x+1 AND offest.y+1] (upper left corner of your terrain object)

    --- Set Sprite.DirectionVariable to "right" (if moving RIGHT, or set to DOWN here if moving LEFT - this is what I meant by it being a bit trickier with multiple directions)

    [sprite is overlapping terrain at offset.x-1 AND offest.y+1] (upper right corner)

    --- Set Sprite.DirectionVariable to "down" (if moving RIGHT, or set to LEFT here if moving LEFT)

    (Then finally the movement itself)

    [sprite.DirectionVariable = "up"]

    --- Move sprite and angle 270 at speed X (bullet behaviour - customer movement - however you're moving them)

    [sprite.DirectionVariable = "right"]

    --- Move sprite and angle 0 at speed X

    [sprite.DirectionVariable = "down"]

    --- Move sprite and angle 90 at speed X

    [sprite.DirectionVariable = "left"]

    --- Move sprite and angle 180 at speed X

    I hope that made sense. I can't make an example right now - but hopefully that helps a little?

    ~Sol

    SoldjahBoy, thank you for the text examples but I'm still quite confused on how to go about implementing this. Can you please provide a example? I'm not too good with working with surfaces currently and things on them but I'm really interested in the movement and terrain that the sprites traverse on.

    Again, thank you for taking your time to assist me.

  • bump

  • Happy hopping.

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

    Wow! Thanks but that's not exactly how the sprites should move along the terrain.

    Let's see if this clears things up:

    The sprite goes straight until it reaches a tiles that is either taller or shorter than the one it's currently on. If it's taller, then the sprite climbs up it to scale it. If it's shorter, then the sprite climbs down it and continues straight until it goes to another tile that is not leveled.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • does cocoon result in smaller apk than xdk?

    Yes.

  • I recommend purchasing the Personal License from Scirra itself because people have had problems in the past with it by purchasing it from Steam.

    Once you purchase the Personal License it is yours forever.

  • I Have these tiles and sprites. The sprites have to traverse these tiles that vary in height, so the sprites have to travel up and down these tiles but I've got no clue how to fully put them over a tile or how I would make them abide next to the tile if they were going down. They could just fall down but the main problem is having them go up, something like a ladder but this is a wall kind of ladder.

    Here's an example image of what I mean:

    And here's the Capx:

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

  • Can't see an image

  • Yeah... The showcase section needs a little bit of a refresh since those game are somewhat old now...

  • Hey there,

    So you mostly have two choices just as glerikud mentioned.

    Cocoon.IO is faster performance oriented but can have its fair of trial and error when exporting it and getting a working APK.

    Intel XDK, from what I have heard is that it's really easy and compliant with Construct 2 but the performance is not good as Cocoon.IO

    Here's a guide on how to export using Cocoon.IO:

    https://shatter-box.com/knowledgebase/c ... nstruct-2/

    Here's the website of Cocoon.IO:

    http://cocoon.io/

  • Just use Application Loader.

    All you do is upload the file that Cocoon.IO comes out with.

  • Wait what? Wii U is on its way out? Where to? From what?

    Care to update me please?