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

SpringBoard-ZK replacement candidate #423

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Dave-tB
Copy link

@Dave-tB Dave-tB commented Dec 5, 2021

This is just SpringBoard-Core, souped up a bit for ZK. Putting it as a draft pull-request here, because I think that is more meaningful than trying to create something at SpringBoard-ZK, as I have made additions to some files.

Summary:
Metal Spot and Startbox add, edit, importing, exporting, save, load etc.
-Additional states, classes and commands to make this possible as well as some edits to existing scripts.
Also a custom infoPath for ZK, and exporting of heightmaps only.

…anges are needed to implement a populate function that works on groupfields.
… added to player window. mex, startbox added to model.lua.
…startboxes lua files. Also added an option to only export heightmap. *Done through a button the info tab in misc **done through export menu options, did not yet add to export spring archive option.
…, unpathable = red), so that heightmap can be viewed and smoothed more usefully from SpringBoard.
@gajop
Copy link
Member

gajop commented Dec 9, 2021

I haven't had the time to take a detailed look at this yet, need a bit of time due to the size of the PR.

I did notice that the indent/formatting was quite a bit off in some places. Can you run luacheck on this?
luacheck scen_edit triggers libs_sb/utils libs_sb/savetable.lua --enable 1

I also did a quick CI fix yesterday, removing Travis in favor of GitHub actions. Can you merge those changes in to ensure your PR runs on the CI as well?

I'll take a proper look as soon as I have some time!

@Dave-tB
Copy link
Author

Dave-tB commented Dec 9, 2021

roger that, will fix in the next few days

@gajop
Copy link
Member

gajop commented Dec 18, 2021

A look at some of the features:

Metal spot editing

  • Adding a metal spot removes the Add state. It should keep it for consistency with other operations.
  • Clicking on a metal spot shouldn't make it draggable, it should just select it.
  • Dragging should display it being dragged. (this is something I never did!)
  • A selected metal spot should be editable like other objects within the Properties tab
  • Mirror X and Z are mutually exclusive but you can check them both in the UI
  • Pressing escape closes/hides all the metal spots which feels odd

Btw, here's what I made some time ago: https://www.youtube.com/watch?v=Afav3o8Z5oY&ab_channel=GajoPetrovi%C4%87

Start box editing

  • Much of the issues are similar to metal spots
  • Doesn't seem to integrate with the Teams panel that well. Would like to be able to specify the start position as one of the areas there.

Other

  • Not sure what glVolumes or infoPath is doing?

After this my next step will be to take a look a detailed look at the code, but from what I can suggest now is a refactor of managers (mex_manager, startbox_manager) to s11n object bridge.
I'd also display these things all the time, not only when in the specific states (states -> views)

PS: This PR feels a bit large and might take a while to merge. Maybe it would be better to split it into smaller ones?
I definitely think this could be merged in SB-C, simply because most other games do indeed use metal spots. I wonder if it would be compatible with BAR too.
But I definitely want both of these two major features in SB or its family of repos. Quite useful additions.

@Dave-tB
Copy link
Author

Dave-tB commented Dec 21, 2021

--Mex and Startbox
I had tried to implement both as s11n, but got some errors I couldn't crack -- I'll give it another go using some of the manager stuff I've already defined. I think that replacing ZK dependencies now should be quite easy, now that I have more of a handle on the code.

X-Mirror and Z-Mirror aren't be mutually exclusive -- although if you click both I suppose it becomes a 180 degree rotation instead. I could add something separately where you can define what kind of symmetry you want, as you would almost always want the same type of symmetry for all the metal spots. The other issues make sense.

--Other
glVolumes just adds drawGroundTriangle in order to display the startbox polygons, and ground lines when making the polygons. infoPath is a replacement for path traversability (unique to ZK) that shows vehicle(green) bots(yellow) and all terrain(red), for me this just makes it a really nice way to view the heightmap and fix any pathing inconsistencies there might be.

Thank you for the detailed reply. I'm sorry I didn't get to the code yet -- I have installed luacheck now and it should work hopefully, and should have time on wednesday/thursday to fix those issues at least. If I can get the s11n stuff working I will split it into multiple PRs as I do so.

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.

2 participants