Version 0.20.0
Yes, ladies and gentlemen, despite my being silent for a while, I do still do work on the pink engine.
Mouse-based Movement
This update brings a much-requested feature to the engine: Using a mouse to control your character. You can click on the map to move your player character to that location, or hold your mouse button to move your player character in a certain direction.
Here's how it works under the hood: The pink engine has two different 'states' of mouse movement. Click-based movement uses the go_to_smart algorithm to determine which route your character should take to the given location. So if you click a location, but don't hold the mouse, the PC will pathfind their way to the target square. If you hold the mouse button, it will switch from click-based movement to hold-based movement. In hold-based movement, the PC will move in the direction of the mouse cursor, but will stop moving when you let go.
Under the hood, mouse-based movement is governed by three new variables in pink_config.rpy:
- pink_otm_mouse_click_move: Determines whether there is click-based movement. If you turn this to False, but leave pink_otm_mouse_held_move on True, then every click will be interpreted as a very brief hold, so will not trigger pathfinding.
- pink_otm_mouse_held_move: Determines whether there is hold-based movement. If you turn this to True, but leavepink_otm_mouse_click_move on True, then holding the mouse button will simply change the end-point for the smart movement, and the player character won't stop moving when you let go of the mouse button.
- pink_otm_hold_delay: The time the mouse button needs to be held before switching from click-based movement to hold-based movement.
If you want to disable mouse-based movement, you can set both pink_otm_mouse_click_move and pink_otm_mouse_held_move to False.
Other changes
There have also been a small number of other changes, hotfixes applied on request of users on our discord:
- Smooth zooming near the edge of a large map has been made significantly smoother.
- You can now check in events if a character is currently moving through the is_moving attribute.
- Fixed a bug that would occur when using the pink_otm_movement_wait standard event.
Files
Get Pink Engine
Pink Engine
A framework for using Tiled-created orthogonal maps in Ren'py.
Status | In development |
Category | Tool |
Author | pink productions |
Tags | framework, Ren'Py |
More posts
- Version 0.19.0Dec 13, 2023
- Version 0.18.0Aug 02, 2023
- Version 0.17.0Apr 23, 2023
- Version 0.16.1Feb 01, 2023
- Version 0.16.0Jan 01, 2023
- Version 0.15.2Nov 02, 2022
- Version 0.15.1Sep 18, 2022
- Version 0.15.0Aug 29, 2022
- Version 0.14.0May 24, 2022
Comments
Log in with itch.io to leave a comment.
hi! due to the addition of mouse based movement, its possible to build pink engine games into android apks - however i've gotten an issue when the game tries to load the .json files for the tilesets whenever playing the apk! the same issue occurs when you put the jsons into the .rpa on a PC build.
![](https://img.itch.zone/aW1nLzE3MzkzNTU3LmpwZw==/original/zHtOcZ.jpg)
I'd love to build an android version of my game but i can't figure out how to solve this - any help? attached is the exact error message when the game tries to load into a pink engine section.
Howdy,
Unfortunately, mobile games still are not currently supported for the pink engine. If you're willing and have the time to join on the discord, we can have a back and forth to work out all the issues (there's presumably more than just this one), and put out a 0.21.0 that does cover basic android support.
I'm happy to try do that if its not a hassle! Thank you for your response :)