nkzw-tech / athena-crisis

Athena Crisis is an Advance Wars inspired modern-retro turn-based tactical strategy game. Athena Crisis is open core technology.
https://athenacrisis.com/open-source
Other
1.37k stars 105 forks source link

[Open Source] Add share link to the Map Editor #13

Closed cpojer closed 1 month ago

cpojer commented 1 month ago

For the Open Source website, it would be great if the Map Editor Playground supported "saving" and loading maps. Let's store a map in the URL. When loading the playground, the URL can be decoded to load a map.

Steps

*Note: The Map Editor might not re-render with new state if the mapObject that gets passed in changes. It may be necessary to set the key prop to wipe away map editor state.

Links

Funding

Fund with Polar

connorlindsey commented 1 month ago

Super excited you're open sourcing so much of the game! Could I pick this issue up?

cpojer commented 1 month ago

Yes, please give it a try! Feel free to ping me on the #tech channel on Discord if you have questions.

connorlindsey commented 1 month ago

@cpojer Got a basic version working, but wanted to clarify how some of the MapObject properties should be handled, specifically:

Thanks!

cpojer commented 1 month ago

For slug, please call toSlug on the map name.

The other suggestions sound good to me.

I bumped up the funding to $50 since you are the first contributor.

connorlindsey commented 1 month ago

Thank you! Just excited to learn more about the codebase and making games with web tech, but that's super nice!

I set my PR as ready for review for when you're free to take a first pass. Obviously still getting used to the codebase, so let me know what feedback you have! Also let me know if you'd like me to include tests. Definitely can to be thorough and include them but I also feel like it's not as necessary compared to something that updates the map editor, core unit logic, etc.

cpojer commented 1 month ago

Thanks for contributing, $50 were sent to you!

connorlindsey commented 1 month ago

Thanks! Appreciate the review and for open sourcing this 🎉