Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Tiles constructor accept tile map image as input #326

Open
quinton-ashley opened this issue Jun 18, 2024 · 0 comments
Open

Make Tiles constructor accept tile map image as input #326

quinton-ashley opened this issue Jun 18, 2024 · 0 comments

Comments

@quinton-ashley
Copy link
Owner

quinton-ashley commented Jun 18, 2024

The Tiles constructor currently only accepts tile maps in the form of a string or array of strings.

In addition, it should take an image as input. sprite.tile and group.tile could be set to a color.

Example use:

let tileMap = loadImage('tiles.png');

let groupA = new Group();
groupA.tile = '#ff0000';

new Tiles(tileMap);

New groupA sprites would be created corresponding to blue pixels in the tile map image.

Also if sprite.tile was set to a tile character it could use the default palette colorPal color corresponding to that character.

@quinton-ashley quinton-ashley changed the title Make Tiles constructor except tile map image as input Make Tiles constructor accept tile map image as input Jul 28, 2024
@quinton-ashley quinton-ashley moved this to Help Wanted in p5play Project Planning Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Help Wanted
Development

No branches or pull requests

1 participant