- Home /
How to move character in a grid-based area?
So, I'm working on a game that has a dungeon-crawling system similar to the Etrian Odessey series of games. I haven't been able to find a tutorial specifically for creating that system, so i'm trying to find tutorials for specific parts and then cobble them. So far, all I have that works properly is rotating the player exactly ninety-degrees on the y-axis (turning left and right). In trying to figure out how I wanted to get the forward, backward, and strafing movement (they're pretty much the same with just different applied directions) I know I need a grid to try and dictate the player's movement, so i looked up tutorials for grid-based movement, and found one that involves making a tile map, which seemed like what i wanted. However, i've gone through 5 of the 6 videos in the series, and i don't think any of the code written after the creation and rendering of the tile map itself is going to help me, as the tutorial itself is based on creating a point and click rts map. All i'm really looking for is being able to create a tile map and then use that to determine where the player can move (I'm going to build the visuals for the level over top the tile map grid), and have the movement be a single tile at a time. My coding knowledge in unity is beginner level, so i couldn't really figure out what to do to modify the code to get the grid movement via key press that i originally wanted.
tl;dr: Trying to make a dungeon crawler game, tried to make a grid/tile based movement system from a tutorial i found; wasn't quite what i wanted.
Simply put, this is what i'm trying to accomplish: - A grid-based system of determining where the player can move, - pressing a key will move the player in designated direction by one grid unit, without turning them in that direction.
For reference sake, this is the first video of the tutorial series i mentioned above: https://www.youtube.com/watch?v=kYeTW2Zr8NA
If anyone knows some good tutorials to accomplish what i'm trying to do, or can tell me what i would need to modify in the code from the tutorial series to get what i want, i'd really appreciate it.
Answer by KittenSnipes · May 19, 2018 at 12:38 PM
@YellowHedgehog65
Unity shows how to create a game with grid based movements. Here is the tutorial series link. Unity's Tutorial
Your answer
Follow this Question
Related Questions
Having trouble with grid movement 1 Answer
Making a bubble level (not a game but work tool) 1 Answer
Grid based movement in 3D environment 1 Answer
Rotate towards movement direction 1 Answer
3d grid of game objects - C# errors 1 Answer