User Tag List

Results 1 to 4 of 4

Thread: Pixel By Pixel Custom Platform Movement, a Bad Idea?

  1. #1
    Clicker Fusion 2.5

    Join Date
    Sep 2006
    Posts
    277
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pixel By Pixel Custom Platform Movement, a Bad Idea?

    Was going to attempt to make a custom platform movement for another game concept I was thinking of, but without using extensions since in my experience, they tend to crash.

    I came up with something that moved the player one pixel at a time, though via Fastloops, so that if it collided with a wall, it'd be pressed up against it instead of being several pixels off. (As in, if it's moving at a speed of 5 pixels per frame, and it collides with a wall, the Fastloop will have it stop against the wall instead of 4 pixels away).

    Now I'm also wanting to do that for enemies eventually, but I got to thinking. Would that kill performance if I put a bunch of enemies' movements in a bunch of Fastloops while also within For Each loops as well? Or is there an easier, extension-less example out there that'd have that kind of pixel precision?

  2. #2
    Clicker

    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    May 2015
    Posts
    120
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    This is entirely possible and as long as coded properly would have no great impact on performance. I use custom fastloop (with ForEach) movements for all of my game elements from playable characters and enemies to projectiles. There are a lot of examples in these forums and around the net. Search for "pixel perfect collision detection" here or on google to get started, but it sounds like you're on the right track. The biggest trick is limiting how often loops run and there are a variety of solutions for that around here.

  3. #3
    Clicker Fusion 2.5

    Join Date
    Sep 2006
    Posts
    277
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So I went with your advice. We'll see how things perform later on when there's lots more objects to deal with. I managed to make a player and enemy movement nearly identically (and pretty quickly too considering my experience these days!), and it's pretty much loops within loops to have it work. Thank you.

    I'll need to look around a bit more though, for a way to add in platform code that you can pass through from below, and things like moving elevators/platforms and slopes to act right.

  4. #4
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Mar 2014
    Posts
    149
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Perhaps you might like this tutorial: https://www.youtube.com/watch?v=uQ7e...&index=27&t=0s

Similar Threads

  1. Replies: 5
    Last Post: 14th July 2017, 09:18 PM
  2. How would you move an object in straight line pixel by pixel from location to another
    By Tsun in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 22nd December 2012, 11:38 PM
  3. [Request/idea]Pixel palette changer
    By VictorT in forum Extension Development
    Replies: 4
    Last Post: 5th September 2007, 09:46 AM

Posting Permissions

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