Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by dokisoft · Mar 20, 2017 at 12:47 AM · 2dmovementgridtilerpg

Grid Movement VS Free Movement

I'm currently in the process of creating a retro 2d map/grid consisting of tile objects each connecting to another, in 8 different directions (north, south, east, west, NW, NE, SE, SW). Player Movement would work just as old school rpg movement had, where a player moves one tile each time, and only takes up one tile. The map locations/tile types would be randomly generated in accordance to a range.

Though as I was creating this, I had a thought - with all that unity offers, why wouldn't one just create a map visually (like a background), and randomly load locations/items on to it. Always making sure two objects don't overlap, and having the player move along the map - kinda like what seems to be the case in Don't Starve.

Basically my question is - in a non tactical RPG where the player moves along a 2d map - what is the advantage to using a grid movement system vs free movement in unity? Is leveraging unity's features in the form of free movement a big toll on performance?

Thanks!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Bunny83 · Mar 20, 2017 at 04:44 AM

Grid maps basically have one advantage: Simplification! That may apply to both, the development as well as the gameplay.

It mainly simplifies "collision" detection since everything is on a fix-sized grid. In turn it makes certain character animations easier to align to other objects on the map. On an open unrestricted map you would need to use triggers to detect when the player is "near" an object. If you have an animation that interacts with map objects you have to ensure a certain alignment of the player relative to that object. Aligning and moving the player automatically would require some sort of pathfinding / collision avoidance. This can create much more edge-case problems on unrestricted maps. Pathfinding on grid maps is way simpler and 100% predictable. Possible problems on grid maps can usually be easily detected during generation of the map.

If the player movement is restricted to a grid it's usually clearer for players where you can move and where you can't.

Grid maps might use two different grid sizes at once. One larger grid for the map tiles and a smaller grid for movement / object placement. Of course the smaller grid would be a subset of the larger grid (x2, x3, x4, ...)

A lot games that provide "free movement" actually use both. The map and it's objects are usually tile-based but enemies and the player can move freely (typical Mario style).

Performance is usually not much affected by the type of map / movement used. Of course free movement would require the usage of the physics system for collision detection. This could be avoided when using a grid-based movement. However the physics system is quite fast anyways.

Rigidbodies and colliders just work out of the box while a grid system has to be created first. Even they are quite simple and straight forward it will take a while to implement properly.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image dokisoft · Mar 20, 2017 at 08:35 PM 0
Share

thank you so much, great explanation :) very much appreciated!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Object Squeezing Between Tiles 0 Answers

How to use the same tilemaps among multiple scenes (e.g. making it a prefab)? 0 Answers

Drag Rigidbody into slots? 2 Answers

Creating a 2D Movement Grid 0 Answers

Best way to spell hit a target 2D tile based game. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges