Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Unity 3D - Tile Based Movement [How ?]

Hey guys ... I want a little help if you could give it of course ...

I have these pimps :

[Image: ikHeB3k.png]


And I want them to move with Tile Based Movement or Grid Based Movement if you want . But how can I do that in a proffesional way ?

I have a Player.cs ... nothing written in it .

Characteristics :
  • They can move up/down/left/right

  • They can move diagonal

  • Searching for a Movement system, don't know if it's gonna be a Grid framework or something like that

  • I want your help on how to implement that and how to gain the general thought of this


How do you have the tiles set up? That's extremely important in this. Have a grid (that's how you should be drawing and collissions anyway), then simply check the grid space before moving to it. You didn't really describe where you're having trouble or where you're trying to go with this, can they only move up down left or right? Check one block to the left of them, if it's empty, move there, if not, make it red or something to show they can't.
(May 10, 2015 08:35 AM)Corios Wrote:  How do you have the tiles set up? That's extremely important in this. Have a grid (that's how you should be drawing and collissions anyway), then simply check the grid space before moving to it. You didn't really describe where you're having trouble or where you're trying to go with this, can they only move up down left or right? Check one block to the left of them, if it's empty, move there, if not, make it red or something to show they can't.

I'm sorry ... check the description again in a minute ...
What you could do, is create a tile class for your grid that can move etc. and then make more classes that just inherit that tile class and add extra functionalities.
(May 10, 2015 11:48 AM)backshifted Wrote:  What you could do, is create a tile class for your grid that can move etc. and then make more classes that just inherit that tile class and add extra functionalities.

A tile class and attach it where ? I mean as I can see at least even you don't know what do you mean ... (friendly, I'm just saying 🙂 )

Firstly what do you mean "for your grid that can move", to make a visual movable grid ? That requires a whole framework for the Unity 3D ...
If you meant just a tile class, yes it's possible but what I want is the basic thought of the class, not the skeleton of the project

I'm just a beginner at Game Development and I want something more than "Create this class and this one and inherit" ... this is something that everyone can think anyway, thank you for your suggestion very much but it's useless 🙂


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Java] by OneHalfFeb 2, 2018 03:36 PM 21 899 Feb 2, 2018 03:36 PM
Last Post: CAFEEFAC
[.NET] by _UnderDogAug 27, 2017 09:28 AM 13 613 Aug 27, 2017 09:28 AM
Last Post: 0xDEAD10CC
[.NET] by Protótype_Mar 19, 2017 07:16 AM 9 466 Mar 19, 2017 07:16 AM
Last Post: AnarchyCoder