jayderyu's Recent Forum Activity

  • oops. that's right. be sure to flag it once it executes :D

  • Actually thinking about it while walking my son to school I had another thought.

    If your using the controls for some kind of main menu or options(ie volume control). Then you don't need to prepare for multi touch input. Instead you can make it a little easier.

    Here is a sample of all 3 ways I suggested.

    dl.dropbox.com/u/14087254/lineardragsprite.capx

  • Yeah. I found using the Drag and Drop behaviour works poorly when your trying to use it with setPosition() when limiting area.

    I have a thought on how you can do this

    Don't Drag and Drop your slider icon.

    Create an invisible drag and drop object over your up/down slider sprite.

    set Y position of your slider to the Y of your Drag Box.

    This will limit your slider sprite to the Y axis.

    You will also need to check for Y minimum and maximum ranges. You can do this with a heavy inline if statement or 2 extra sub events.

    slider.y = ( (drag.y < min) || (drag.y > max) ? (drag.y < min ? min : max) : drag.y )

    don't forget to reset your drag box on drop :)

    here is a tutorial. Overkill for you needs but you never know what helpful information you can find.

    scirra.com/tutorials/398/touch-stick-controllers/page-1

    Now if there is a way to limit an particular objects axis. That would be cool, but I have no idea if that exists. Still a noob here :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well if your using the beta for C2 then

    --onTouch of Object

    -> call foo function

    --on some other condition

    -> call foo function

    --foo function

    -> do stuff

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

    If your using the last stable build

    var action = 0

    --onTouch of Object

    -> action = 1

    --on some other condition

    -> action = 1

    --condition: compare action = 1

    -> do stuff

    Personally I like functions. They make like easier and they are less condition checks in the main loop :)

  • I would like to see this sample too please :)

  • That won't work or at least doesn't for me. C2 has/had a clause in 108.2 that if the game is not being properly viewed from a webserver. The game will just give an warning error.

    "Exported games won't work until you upload them"

    I got myself a portable webserver(mowes) to handle this.

    The other alternative is to put the game onto a webserver and ready it with the offline.appcache. Go to the game with your portable browser and make sure the cache is set to your flash drive and hope for the best :D

  • That's right. The level rotated a lot with your character. :D

  • I'm jaw dropping on this project. For 100 events I think this game is amazing. Personally I think metroidvania this game up a bit. Maybe do a small kickstarted project to let you get more time to work on it. Then sell this bad boy on various devices :D

    I still find the controls difficult. Mostly in that I find having my "jump" button on the left side to be unintuitive. I think this is far more me though than the game :D I would like it if I could swap Z and C around.

  • I've had a thought about creating a large game world. What I am wondering is about the performance of handling position that way. Instead of moving player by X/Y. Instead object(containing large sums of pinned objects) is moved. If player turns right, world rotates left?

    Would this have a significant effect on performance.

    Also what kind of impact would designing the game around this model and such difficulties

    finally would there be a problem with translating physics if wanting to use vehicles or other such things.

    Now of course the only reason I would want to move the word. Would be that I can load and unload sections of the world at a time for very large worlds. I'm not working on a game like this yet and am unsure if I will ever get there, but I am wondering about the design and the how it would be done.

  • I have personally found that comparing same family/instance objects takes a little more work.

    Every object has a UID(Unique ID related to all objects in the game) and an IID(instance ID related to those of the same object).

    You will need either of those values(not both). At this point however I don't know how your game works. So I am only going to give you a relation as if your hex game was similar to a memory match style game.

    Memory match is about choosing 2 "cards". So let's go with that.

    var selected = 0

    var iidHex = -1

    var compare = ""

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

    cnd: Touch on touched Hex

    ->sub event-cnd: selcted = 0

    ->action: iid = Hex.iid

    ->action:selected = 1

    ->sub event-cnd: selcted = 1

    ->action: compare = hex.variable

    ->sub event pick Nth instance of Hex

    ->action: compare two values(compare, Hex.variable)

    Now I'm sure a master can do this better, but this is the idea your going for.

  • Others will appreciate a capx of your project or at least the relevant parts in an image.

  • I haven't developed far enough, but Arima's point 1 is super important. When dealing with any long term touch your far better off using a sprite. Even at 1x1.

    Sprite with Drag and Drop behaviour.(don't put this D&D into a folder for sorting)

    On Touch -> dragbox set position to touch.x touch.y

    if your only doing a button then no worries.

    Anyways that's my experience :

jayderyu's avatar

jayderyu

Member since 11 Apr, 2012

Twitter
jayderyu has 1 followers

Connect with jayderyu

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies