I’m working on a Dungeon Crawler type game, and I want to implement a reward system, where the player gets a reward if they step on every tile on a dungeon floor.
I’m looking for a simple way to implement this, but my head is going a little screwy thinking of it.
I don’t really want to have an event on every tile that deletes itself or flips a self switch after touching it.
That seems really inefficient.
My initial thought was maybe using an event that procs when you step on certain region ids?
It could increment a variable every time you step, but there would need to be some way not to “double count” steps.
Anyone ever implement something like this before?
EVERY tile might be ambitious, but if you are wanting to cover "Every Room" that's more manageable, with an event at the entry to every room.
Otherwise, HIP SHOT:
- Establish an array that is, essentially, a grid of the map, 1s and 0s; lets say 1 for a passable space, 0 for an unpassable space at initialization.
- Run a parallel event that collects the player X/Y position.
- If the player X/Y position on the grid array is 1, turn it to 0.
- Check the array; if there are any 1s, the map is incomplete. If there are no 1s, the map has been fully walked.
Additions;
You should be able to establish this array as a variable, and do this per-map and have the achievement for each map.
Loading the map for the first time initializes the data and stores it. Ensure your unpassable areas are set to your "walked" value. If you are manually crafting the level, you'll want to find a way to export the data when you're done with the map and prepare the data.
Throw self switch A when the level is first loaded and the array is stored.
On page 2, with switch A on, have it run parallel. Get the player position, test it against the array at variable[x][y], flip the value to your walked value if it hasn't been already. Check the array for your unwalked value; if present, do nothing new. If NOT present, throw self switch B.
On page 3, with self switch B on, run your congratulatory code, award the achievement. Throw self switch C.
On page 4, with self switch C on, just do nothing at all~ Its all done~
If you are getting creative with some kind of proc gen on the map, you should be able to use the output of that to produce the array grid at the end of the generation, and then store it to a selected variable.
Sorry, I skimmed the responses, so sorry if something like this has already been discussed;
Can this not be faked?
Like I don't know what your dungeons look like, but the image I have in my head is that there are going to be branching paths and choke points. You could just place an event at the choke point to a branching path and put another event at the end; we can safely assume that the player walked most if not all tiles from the choke point to the end without need to account for whether they did or didn't.
You also could probably even skip the choke point event and just put an event at the end of a dead end because it's basically the same thing; assuming the player walked all the tiles from the entrance to that dead end.
From a philisophical, game play stand point - and again, based on the image I have in my head - this sounds incredibly tedious to make every tile required to be stepped on. As a player I would want no part of this.
I think it would be better to just put exploration "check points" at every major room change or point of interest; and I'd probably use like an event hit box plugin so that players don't need to stand EXACTLY on the tile you deemed to be the point of interests check point, but instead the area around it.
It would probably help others to understand if they know that Etrian Odyssey was developed for the DS, a dual-screen handheld, and used the top screen as the regular game screen while the bottom screen/touchpad was used to draw the map with the pen.
The entire concept was fun, but is very difficult to reproduce if you don't have a screen that doubles as a touchpad in addition to a regular game screen.
This thread is being closed due to being solved. If you need it reopened, report it to let us know why. Thank you!