0
\$\begingroup\$

When making a 2D Pokémon game, I just faked elevation by putting mountain tiles underneath the land. Now my tiles are 3D models, so I'm using layer properties to define their elevation. What I don't know though is how to generate a 'mountain' around them.

The tilemap is kinda' like this:

Layer 1: Layer 2: Layer 3:
....     \\\\     \\\\
....     \..\     \\.\
....     \..\     \\\\
....     \\\\     \\\\

Layer 2 has y-offset set to 1, and Layer 3 has y-offset set to 2. All they do right now is float in the air. What I'm trying to do is render a mountain around them.

\$\endgroup\$
2
  • \$\begingroup\$ What have you tried? What does it mean to "add mountains?" Do you just need to know how to put them in your sprite sheet? How to generate them in a level? Et cetera. \$\endgroup\$ Commented Jan 11, 2015 at 17:29
  • \$\begingroup\$ Sorry! I made some progress, but I'm stuck again. \$\endgroup\$ Commented Jan 14, 2015 at 5:25

1 Answer 1

0
\$\begingroup\$

You can create 3D ""tile"" objects.

During Loading read your 2D tile map and wherever there's a mountain tile paste your 3D mountain object over it.

You can make this very fancy and detect the size of mountainous areas pasting various large mountains objects.

\$\endgroup\$
5
  • \$\begingroup\$ Yes, that's what I'm doing right now =). I have a tilemap, and for each tile, I place an object that whose size and vertical offset in the obj file. What I meant was - how could I put, say, a "grass" tile on that mountain? \$\endgroup\$ Commented Jan 10, 2015 at 16:35
  • \$\begingroup\$ You'll have to use multiple tile layers then. \$\endgroup\$ Commented Jan 10, 2015 at 16:44
  • \$\begingroup\$ Any idea how I'd go about making the mountain underneath the grass? =) \$\endgroup\$ Commented Jan 14, 2015 at 5:28
  • \$\begingroup\$ You'll need to change the texture on the mountain for this or make 2 mountain "tiles". \$\endgroup\$ Commented Jan 14, 2015 at 15:43
  • \$\begingroup\$ Okay so I just ended up using some basic array manipulation to get the corners of the 'mountain' and change the model for those. Thanks for the answer and elaboration! \$\endgroup\$ Commented Jan 15, 2015 at 15:13

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.