silverua / slay-the-spire-map-in-unity

Implementation of the Slay the Spire Map in Unity3d
MIT License
297 stars 71 forks source link

Some Questions #34

Open SCOOTKAPTAIN opened 4 days ago

SCOOTKAPTAIN commented 4 days ago

Hello, I'm a newbie game developer and I've been using your script to create the map on my game and I have few questions if you're still active and do not mind.

  1. How do I Install NewtonJSON, then i imported the files it says that it's missing but the link to the Unity store page leads to a blank page, I know that it's used to save the map layout but if it's unavailable now, I would like to know an alternative way to save the map layout, not for a save file but for when changing scenes because once someone picked a node an encounter will play which makes the game switches scenes and i don't want to lose the current map layout

  2. My game has an unique resource meter that is used as the core mechanic, I want to make it so players can move upwards on downwards on a layer instead of going up a floor by spending said resource as some sort of "detour" mechanic, so I want to ask if there's a way to make the map code allow for such movement by linking nodes on the same layer

  3. With said resources in mind, i want to make the map darker the lower it gets like if its 75%, 3/4 of the map is covered by darkness and if it goes to 0% the map regenerates itself but the player stays in the same layer and player's cant see what node they're going to

  4. If I change some icons in the map, do i need to take account for the DOTween animations kicking in, like the circle animation or do i just replace the sprites normally and it'll not mess up anything.

Those are the current questions I have, thank you for reading.

silverua commented 2 days ago

Hey.

Thanks for expressing your interest in the project.

  1. We installed it from the Package Manager if I am not mistaken. You can try going to Window/PackageManager and checking there. As for saving and switching scenes. The map saves its layout and player's position into Player Prefs, so if you go to a different scene to do an encounter, then return to the map scene, you will have both your progress and the map layout saved and looking exactly the same way as they did before you left. It does not re-generate each time you leave and re-enter the scene.
  2. I have pushed a branch called "free-movement-on-layer-example". It illustrates how you can implement free moment across a single map layer in addition to moving to the next layer.
  3. It sounds interesting, but I think, it's up to you to decide how you want to add this element to your game. Look up various resources about implementing fog of war. You may find something useful there.
  4. Hard to predict what's gonna happen. My suggestion - try replacing the sprites and see if it provides desired results. If you run into something particular that is hard to solve, ask another question and I will try to help.

Cheers!

SCOOTKAPTAIN commented 1 day ago

Thank you replying!

I cant seem to find NewtonJSON anywhere on my package manager so i cant install it and forced to comment every line that related to it, but I want to know if Newton only handles the "savefile" to save when people quit or the "saves its layout and player's position into Player Prefs" is independent from it, because im fine with having no savefile when closing but the layout saving when changing scenes is essential.

As for the moving up and down part, it looks like i can pick any node on the layer instead of the ones adjacent to them as well as being able go back and forth once i pick the other nodes to the previous nodes that they moved from. image image I want so that when players move up and down a layer, the node that they moved from is counted as "finished" and cant be returned to. If you're busy and unable to make more changes, could you please explain what part of the code that manages this connection, im not programmer but i think i can do some basic changes with a but of elbow grease

Im also a bit confused on the difference between normal sample and the UI version, is there some sort of special compatibility that makes them different?