live featherless hackery
@featherletscode
A sub-account of misc hackery by @featherless
Tal vez te guste
And was able to move the .json file of the map I’d edited without too much effort as well! I couldn’t find where the .json file was on the iPad, so I had to print it out to the Swift Playgrounds console, copy it to a Note, then AirDrop that over. Now to finish up the map!
Copied the code over from the iPad into a new Catalyst-compatible project and voila! The whole thing just works :D Love how the menus get correctly adapted to the Mac with zero code changes.
New M1 MacBook Pro is finally here! Time to pick up where I left off with the Wargroove AI app. First order of business, getting it building on the Mac.
That's it for today! Next session will need to make it possible to set ownership of buildings, and then I should have all of the map/game input needed to start building an AI to help me beat this level :D
All units now representable on the map, and with a minor adjustment to how image frames are determined in each tile view, the units now draw more closely to the game's style (i.e. building and unit sprites can extend beyond their tile).
Trying very hard to resist the temptation to make the map editor auto-adjust tile assets based on surrounding tiles 😅
Unit editing! Just an extension of the building logic, but with added concept of "ownership". This will be important for the AI so that it knows which units it should be suggesting turns for (mine!)
Editing buildings on the map. Will need some way to indicate who owns a given building as well. Lots of menus inbound 😅
Building editing now working, huzzah!
Compromise is to set the terrain image as the button's image, and then manage buildings/units as separate subviews (which won't get tinted). Not ideal, but works well enough for the common case.
Ah right, but tinting only happens on the button's image view. Rarr.
...which loses the button state highlighting effect. Will need to add the image views as subviews then.
I'll just make the TileView have a stack of image views and then an empty button as the top-most view.
Tile rendering's a tiny bit more complicated now. Ideally each tile is still just a single button, so I'll need to be able to composite images together in a simple way. This would be trivial with a ZStack in SwiftUI, but in UIKit I'll have to manage subviews or draw images.
Copied the old Map struct to a new "MapV1" struct. Decode MapV1, convert it in memory to the new Map format, and then save it out. Can now delete MapV1 :D
Ah joy. Now need to build a converter from the old file format to the new one 😅
Tile was previously just an enum, but now I'll also need to be able to capture presence of a unit and/or building.
Am thinking that entity editing will be relatively infrequent, so I may just add it to the same menu as a sub-menu so that there doesn't need to be "modes" of editing.
The delete column action. If/when a delete row action is needed it'll be even simpler.
United States Tendencias
- 1. Virginia Tech 8,123 posts
- 2. James Franklin 8,080 posts
- 3. Grok 4.1 13.5K posts
- 4. Sonic 3 11.7K posts
- 5. GOTY 24.4K posts
- 6. Moana 35.5K posts
- 7. Expedition 33 37.3K posts
- 8. Zelda 62K posts
- 9. Va Tech N/A
- 10. Ted Cruz 18.7K posts
- 11. Blacksburg N/A
- 12. #TheGameAwards 44K posts
- 13. Baton Rouge 2,820 posts
- 14. Comey 35.3K posts
- 15. Hokies 1,545 posts
- 16. Kiffin 9,544 posts
- 17. #OTGala9 101K posts
- 18. Marr Chase 12.2K posts
- 19. Board of Peace 1,688 posts
- 20. #RestoreTheSnyderVerse 47.1K posts
Something went wrong.
Something went wrong.