1
\$\begingroup\$

I am new to game development and I would like to make a 2D scrolling game with a tile based engine. If you want an idea, it should resemble the Legend of Zelda: A Link to the Past like in the image: enter image description here

Maybe not so "fancy" but you get the idea. For my game, I am planning to use DirectX 11 2D in C++ because am quite familiar with that language. However, I am not quite sure how to make the tile engine:
Should I create an image of the entire map and render depending on the coordinates of the character or should I create a matrix of each tile and render each tile separately depending on its position?

Also, how can have animated tiles?
Thanks for any help.

\$\endgroup\$
  • \$\begingroup\$ On modern hardware, either of those are viable strategies. What have you tried so far and where did you get stuck? \$\endgroup\$ – DMGregory Dec 13 '18 at 1:32
  • \$\begingroup\$ Actually, I have quite a lot of compile time errors now and I can't even render an image lol :) I am just wondering which method I should choose because of speed or other factors. \$\endgroup\$ – Luke the Geek Dec 13 '18 at 1:34
  • 5
    \$\begingroup\$ The example you show above won't tax modern hardware even if you draw every tile separately, so if you're still struggling with drawing an image I wouldn't worry about doing this in the "optimal" way just yet. Do it in the way that makes the most sense to you and lets you get something playable quickly. Then you can refine your approach and solve performance problems that arise once you can actually test and see which parts are actually real problems. \$\endgroup\$ – DMGregory Dec 13 '18 at 1:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.