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

Support for only drawing one layer at a time? #15

Open
githubaccount256 opened this issue Mar 30, 2021 · 2 comments
Open

Support for only drawing one layer at a time? #15

githubaccount256 opened this issue Mar 30, 2021 · 2 comments

Comments

@githubaccount256
Copy link

As with many other games, my player and other monster sprites are in the middle of the map layers. That is, the game rendering logic is something like this:

renderMap() {
  drawMapLayer(0);
  drawMapLayer(1);
  drawMapLayer(2);

  drawSprites();

  drawMapLayer(3);
  drawMapLayer(4);
  drawMapLayer(5);
}

Is it possible to do something like this with your library? So that I can have parts of the map drawn over the player and other monsters.

@englercj
Copy link
Owner

englercj commented Apr 7, 2021

It'd be more expensive than drawing all the layers at once, but shouldn't be too hard to break up the tilemap draw function. PRs welcome.

@githubaccount256
Copy link
Author

githubaccount256 commented Apr 7, 2021

Sure, I think I can figure it out. I just need to get the power-of-two issue fixed first, and then I can make a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants