EDIT: There is now a test version over on RPG Maker Web: https://forums.rpgmakerweb.com/index.php?threads/altimit-pixel-movement-0-02α.85408/
Give it a whirl, report back any problems so they can be added to the GitHub bug tracker.
Most of the thread below is discussion of old test ideas and no longer applies to this alpha test
Click to see longer video
Motivation
The idea behind this Plugin is to take the first step towards a complete 3D maps Plugin. Originally, I was working on 3D maps, but there's so many smaller problems to solve first, so I've decided to spend my weekends solving these problems as individual Plugins on their own.
Pixel-accurate (and sub-pixel!) collision detection is one of these features.
Research
The first thing I did was check out if other, similar Plugins already exist. I found Super Orange Movement, an abandoned Plugin that's rather buggy and restricted.
I was unable to find any other MV Plugins that allow pixel-movement, which is surprising as pixel-movement scripts in older RPG Maker versions were very popular. If anyone knows of any MV Plugins for pixel movement, please tell me of them.
Features
Colliders
The collision physics are not handled by the Game_Character; any Game_Character with pixel movement enabled can have a collider object attached to them; when moving with pixel movement the collider itself is what calculates the movement, not the Game_Character.
This means that different types of colliders can be used. At the moment I have a "box collider", which allows a single bounding-box of any size to be used for calculating the collision.
You can even have large colliders, so a Game_Character can be two tiles wide and unable to move down paths that are one tile wide, perfect for large-sprites or perhaps even if the player is inside a large-vehicle.
This also allows colliders to be created of varying shapes. I plan on creating a circle collider, which will allow the collision detection to slide and "guide" the player into gaps if they are slightly misaligned (will make moving around easier). I also plan on supporting multiple colliders on a single Game_Character.
Toggling
This Plugin can be enabled/disabled at will. When disabled, the Game_Character will slide back onto the grid and revert to default movement, which is going to be helpful for choreographing cut-scenes (disable pixel-movement, move the player along tiles, enable pixel-movement, move the player along pixels).
This Plugin can target any Game_Character, which means the player can have pixel movement, as-well as events and vehicles.
Collision debug mode
This is an additional Plugin right now, but it is very useful. This renders the colliders as shapes on the map, so you can see for yourself exactly how the collision is working.
Any feature suggestions are entirely welcome!
Considered features
There are a few nice-to-have features that I am thinking about, but have no plans to develop at the moment.
Map collision
At the moment, I'm planning on sticking to the regular old grid for the map movement. Map collisions will be difficult (how would you define the colliders for map tiles?). There's a lot to think about with this one.
For now, I think events should be the only ones that can have custom colliders, which means that events with map-tiles can be used for complex geometry on the map.
Bitmap collision masks
Javascript sucks for this one due to performance. There's a lot to think about, especially if you want the collision masks to "guide" the player, similar to the circle collider.
If I were to do this, it would need a lot of development to find a suitable method (Right now I'm thinking about using polygon colliders that generate at a fixed resolution around the bitmap, but there's a lot of problems to solve here).
Current progress
I spent a couple of weekends investigating the most ideal way for me to implement this Plugin, which resulted in a lot of experiments being done and general discovery of what the challenges and problems are.
I'm now building a working (not-test) version that uses my findings and ideas. I want this to be as clean as possible, so I am going to take my time and make sure everything works fine.
Right now, pixel-movement can be toggled for any Game_Character and they can move off-grid and collide correctly with the map's grid. Events are not working at the moment, that is the next thing for me to work on (event collision and event triggers).
Vehicles and followers are also not working. My idea is to re-write followers to use a different method of following the player (I'm thinking distance-based).
Give it a whirl, report back any problems so they can be added to the GitHub bug tracker.
Most of the thread below is discussion of old test ideas and no longer applies to this alpha test

Click to see longer video
Motivation
The idea behind this Plugin is to take the first step towards a complete 3D maps Plugin. Originally, I was working on 3D maps, but there's so many smaller problems to solve first, so I've decided to spend my weekends solving these problems as individual Plugins on their own.
Pixel-accurate (and sub-pixel!) collision detection is one of these features.
Research
The first thing I did was check out if other, similar Plugins already exist. I found Super Orange Movement, an abandoned Plugin that's rather buggy and restricted.
I was unable to find any other MV Plugins that allow pixel-movement, which is surprising as pixel-movement scripts in older RPG Maker versions were very popular. If anyone knows of any MV Plugins for pixel movement, please tell me of them.
Features
Colliders
The collision physics are not handled by the Game_Character; any Game_Character with pixel movement enabled can have a collider object attached to them; when moving with pixel movement the collider itself is what calculates the movement, not the Game_Character.
This means that different types of colliders can be used. At the moment I have a "box collider", which allows a single bounding-box of any size to be used for calculating the collision.
You can even have large colliders, so a Game_Character can be two tiles wide and unable to move down paths that are one tile wide, perfect for large-sprites or perhaps even if the player is inside a large-vehicle.
This also allows colliders to be created of varying shapes. I plan on creating a circle collider, which will allow the collision detection to slide and "guide" the player into gaps if they are slightly misaligned (will make moving around easier). I also plan on supporting multiple colliders on a single Game_Character.
Toggling
This Plugin can be enabled/disabled at will. When disabled, the Game_Character will slide back onto the grid and revert to default movement, which is going to be helpful for choreographing cut-scenes (disable pixel-movement, move the player along tiles, enable pixel-movement, move the player along pixels).
This Plugin can target any Game_Character, which means the player can have pixel movement, as-well as events and vehicles.
Collision debug mode
This is an additional Plugin right now, but it is very useful. This renders the colliders as shapes on the map, so you can see for yourself exactly how the collision is working.

Any feature suggestions are entirely welcome!
Considered features
There are a few nice-to-have features that I am thinking about, but have no plans to develop at the moment.
Map collision
At the moment, I'm planning on sticking to the regular old grid for the map movement. Map collisions will be difficult (how would you define the colliders for map tiles?). There's a lot to think about with this one.
For now, I think events should be the only ones that can have custom colliders, which means that events with map-tiles can be used for complex geometry on the map.
Bitmap collision masks
Javascript sucks for this one due to performance. There's a lot to think about, especially if you want the collision masks to "guide" the player, similar to the circle collider.
If I were to do this, it would need a lot of development to find a suitable method (Right now I'm thinking about using polygon colliders that generate at a fixed resolution around the bitmap, but there's a lot of problems to solve here).
Current progress
I spent a couple of weekends investigating the most ideal way for me to implement this Plugin, which resulted in a lot of experiments being done and general discovery of what the challenges and problems are.
I'm now building a working (not-test) version that uses my findings and ideas. I want this to be as clean as possible, so I am going to take my time and make sure everything works fine.
Right now, pixel-movement can be toggled for any Game_Character and they can move off-grid and collide correctly with the map's grid. Events are not working at the moment, that is the next thing for me to work on (event collision and event triggers).
Vehicles and followers are also not working. My idea is to re-write followers to use a different method of following the player (I'm thinking distance-based).
Last edited: