User Tag List

Results 1 to 3 of 3

Thread: best way to create "walls" for incremental X/Y positioning actives?

  1. #1
    Clicker Fusion 2.5 DeveloperiOS Export Module

    Join Date
    May 2012
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    best way to create "walls" for incremental X/Y positioning actives?

    I'm doing a simple tilt (left-right) scroller game (something like Jetpack Joyride but vertical, like Off The Leash or Nimble Bit's Scoops) and I need "walls" on both sides of the screen.

    Thing is, I'm using the Accelerometer object and adding/subtracting X pixels to reposition the player active object and the frame is set to auto-resize accordingly to the user's device (it has a 768x1136 frame, game is running with a 640x960 window size, that expands to the iphone 5 or ipad screens).
    So I need the "walls" to stop the player from tilting out of the visible frame.

    What would be the best way to do it right?
    I tried a couple:
    - (negate) object is # pixels from left/right frame -> the player will tilt to left/right, otherwise it shouldn't, right?
    - used a hidden object on both sides that automatically position to the visible edge of the device - on overlapping the walls -> the tilting would stop

    But neither way was foolproof, the last being the most annoying - sometimes if forcing the tilting, the player object would simply jump across the wall, and whenever it "stopped", it would kinda stick to the wall (moving to the other side had a certain delay, like something that was glued and got pulled off).

    I remember back in the days that a simply bouncing object would bounce off a wall and that was it, but now using expressions with acceleration values I'm outta clue of how to do it properly...

    Any ideas? Thanks in advance!!

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export Module
    DistantJ's Avatar
    Join Date
    Jan 2008
    Location
    Gloucester, UK
    Posts
    2,144
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    The easiest way is to use:

    (Player) Y co-ordinate is less than or equal to 40: Set (player Y co-ordinate) to 40
    (Player) Y co-ordinate is greater than or equal to 600: Set (player Y co-ordinate) to 600

    Make sure it's AFTER the events you use to set the Y co-ordinate, so that it gets fixed before the next loop, but BEFORE any collision events.

    If you want to use obstacle collisions and things and you're moving more than 1 pixel at a time, I'd suggest learning how to use fastloops

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export Module

    Join Date
    May 2012
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cool DJ, thanks for that, gonna look into fast loops then... (been away from clicking for almost 10 years, got back last years)

Similar Threads

  1. Request for new type of object, "All actives"
    By AftPeakTank in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 22nd August 2013, 05:10 AM
  2. Random Chunk Generator using "Create New Objects"?
    By darkmanx_429 in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 7th August 2013, 12:42 PM
  3. INI Problem > Works only if "Create INI file in Application Data folder" is checked.
    By Hawanna in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 5th June 2012, 05:47 PM
  4. "No error message is available" when I try to create a ZIP file for xcode
    By 1234cb in forum iOS Export Module Version 2.0
    Replies: 10
    Last Post: 1st November 2011, 07:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •