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

Add tiled background rendering #853

Closed
wants to merge 5 commits into from

Conversation

Lojemiru
Copy link
Contributor

@Lojemiru Lojemiru commented Mar 7, 2023

Resolves #852.

Adds a "repeat" option to the "Bg image" field on the "Current Level" tab. Repeat rendering works across all background layer rendering contexts, including exporting to PNGs.

This all works by changing the underlying Bitmap for level backgrounds to a TiledTexture instead and adding some functionality to the TiledTexture in deepnightLibs. Info on that functionality is contained in deepnight/deepnightLibs#45

This does involve a constructor signature change for TiledTexture, which I've applied across LDtk.

This also requires an API change to introduce the Repeat member to the BgImagePos enum: deepnight/ldtk-haxe-api#26

Actions failures stem from mismatching deepnightLibs and LDtk API versions as per the above two PRs.

Images:

image

image

image

@Lojemiru Lojemiru marked this pull request as ready for review March 7, 2023 10:51
Lojemiru and others added 2 commits March 7, 2023 14:40
* Initial changes for flips

* Add EntityDefs integration, add rough visuals

* Cleanup, add hotkeys, add cursor display

* Cleanup, UI polish.

* Fix cover bounds and full size cropped Entity renders

* Update pivot display for flipped Entities

* docs: Fix hotkey hint in platformer sample (deepnight#821)

* Base pivot flipping changes, start visual rollout

* Fix issue 826 (deepnight#827)

* Revert "Base pivot flipping changes, start visual rollout"

This reverts commit 5af2126.

* Revert "Update pivot display for flipped Entities"

This reverts commit 29ce77a.

* Revert broken tile flipping in Repeat mode

* Revert errant change to setup.hxml

* Final cleanup

* Re-add initial pivot flips

* Revert "Revert "Update pivot display for flipped Entities""

This reverts commit ae17777.

* Add entitydef toggle for flip style, fix placement visual bugs

* Make flipped pivots take pivot flipping into account

* Fix field display for flipped Entities

* Somewhat fix resizing (actual fix in new branch)

* Update test-windows.yml

* Update test-windows.yml

* Entity flips pivots - rebase to dev-1.2.6 (#1)

* Fixed reset buttons in field forms

* Updated version to 1.2.6

* Changelog

* Updated checklist

* Cleanup

* Added test map

* Added comments

* Updated test map

* Added dummyWorldIid

* Updated test map

* Updated entities map

* Docs

* Changelog

* Updated lab map

* Initial changes for flips

* Add EntityDefs integration, add rough visuals

* Cleanup, add hotkeys, add cursor display

* Cleanup, UI polish.

* Fix cover bounds and full size cropped Entity renders

* Update pivot display for flipped Entities

* Base pivot flipping changes, start visual rollout

* Revert "Base pivot flipping changes, start visual rollout"

This reverts commit 5af2126.

* Revert "Update pivot display for flipped Entities"

This reverts commit 29ce77a.

* docs: Fix hotkey hint in platformer sample (deepnight#821)

* Fix issue 826 (deepnight#827)

* Revert broken tile flipping in Repeat mode

* Revert errant change to setup.hxml

* Final cleanup

* Re-add initial pivot flips

* Revert "Revert "Update pivot display for flipped Entities""

This reverts commit ae17777.

* Add entitydef toggle for flip style, fix placement visual bugs

* Make flipped pivots take pivot flipping into account

* Fix field display for flipped Entities

* Somewhat fix resizing (actual fix in new branch)

* Update test-windows.yml

* Update test-windows.yml

---------

Co-authored-by: Sebastien Benard <github@deepnight.net>
Co-authored-by: Johan Klokkhammer Helsing <johanhelsing@gmail.com>
Co-authored-by: Midyan Hamdoun <midyan.hamdoun@gmail.com>

* Revert "Entity flips pivots - rebase to dev-1.2.6 (#1)"

This reverts commit 59fb849.

* Revert changes that should not have been included

---------

Co-authored-by: Johan Klokkhammer Helsing <johanhelsing@gmail.com>
Co-authored-by: Midyan Hamdoun <midyan.hamdoun@gmail.com>
Co-authored-by: Sebastien Benard <github@deepnight.net>
@Lojemiru
Copy link
Contributor Author

How the HECK did I merge those into this branch!? Reverting, ugh.

@deepnight
Copy link
Owner

Merged in 1.3.0

@deepnight deepnight closed this Apr 25, 2023
@deepnight
Copy link
Owner

Thanks for your PR :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants