Ninjadoodle Posted November 26, 2014 Share Posted November 26, 2014 Hi guys I'm planning a game where you control a character (zelda style movement). For this, I need to utilise tiles and I know there is a tiled plugin at early stages of development. What I'm wondering about the most is collisions. I feel using physics is a little overkill for this case. What would be the performance drawbacks of using tweens for movement + math to check whether there is a wall in the way. This would have to be done for every tile on update. If you have any suggestions / ideas on how to approach this, that would be awesome Thank you in advance! Quote Link to comment Share on other sites More sharing options...
enpu Posted November 26, 2014 Share Posted November 26, 2014 I would do movement with tween, and then just check that tile where player is moving to. Quote Link to comment Share on other sites More sharing options...
ambidex Posted November 26, 2014 Share Posted November 26, 2014 I think this'll depend a lot on what you specifically want to detect with "walls in the way"? If you're plotting out a complete path, you'd have to go ahead and do path finding (I've done a JS setup before based on A*, interesting and fun to say the least!). If you're simply trying to detect, can entity at [10, 14] go to the next tile [10, 15], you'll have to simply check the registry on that tile. In both situations, it would be safe to say, you need to really think your game world's registry system through from A to Z before starting anything else. (how to fetch entities occupying tile [x, y] and doing this in an efficient way) I love making tile-based games Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.