Skip to content
New issue

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

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

Already on GitHub? # to your account

Added rudimentary hexagonal renderer #76

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

AndreRenaud
Copy link

@AndreRenaud AndreRenaud commented Jun 5, 2023

This is very simplistic, and due to the limited rendering order options at the moment it has some visual artifacts. However it does render things in a reasonable manner to the screen.

@lafriks
Copy link
Owner

lafriks commented Jun 5, 2023

Can you add some small sample map to test this with?

@AndreRenaud
Copy link
Author

I've pushed a map, which made me realise that I'd only done the Y orientation. There are some caveats here, and this is very simplistic, but hopefully sufficient to start with.

@AndreRenaud
Copy link
Author

Hey - just pinging this PR to see if theres anything more you'd like me to do to hopefully get it merged?

@lafriks
Copy link
Owner

lafriks commented Jul 16, 2023

I had not yet time to test it, will do it soon

func (r *Renderer) _renderLayer(layer *tiled.Layer) error {

var xs, xe, xi, ys, ye, yi int
if r.m.RenderOrder == "" || r.m.RenderOrder == "right-down" {
var odd bool
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can introduce some strategy pattern here already? these if's will become hard to maintain

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants