Hills on 2D tile grid (axis-aligned / non-isometric)

Started by
12 comments, last by Servant of the Lord 11 years, 7 months ago
This is a tough challenge: How can I have good looking hills in a 2D tile-based game?

My tile grid looks like this: ([size=2]without the 1 pixel line between each tile; placeholder tile)

basicgrid.png

The lighting comes from the upper-left corner of the screen.

Here's one casual attempt I made:

hilla.png

Using this to multiply with the tiles, to create shadowing:
slopeshading.png


I mean, it's not bad (well, yes the image is - but the basic idea isn't bad), but I'm thinking I'm going to need better than that. Maybe some yellow tinting on the sides facing the sun, and blueish tinting on the sides facing away.

I'm looking at some photos of hills on Google, but I want real artists' perspectives on it, myself being more of a programmer than designer or artist, and so less in tune with visual trickery.
I'd like to be able to multiply or blend other "mask" images onto regular tiles to create the correct illusion of depth and slope and lighting.

I'm not yet ready to fully start producing the art for this part of my project, but I do need to knock up a few test examples to see whether I can actually create something passable - as I need to know whether hills are actually possible or not in my game, as it'll effect the layout of my game world.

Any wisdom and tips you can give me is much apreciated!
Advertisement
Without the tinting, how does it look when you brighten the hill-side facing the light source?
Part of the problem I'm having (which I forgot to mention in the previous post) is making the hill look natural (shadow-wise), and not square-ish. Another problem is getting the correct perspective and not being directly overhead or directly in front.

The view angle:

artperspective.png

Here's another attempt: (These are put together in PaintShopPro, by the way)

hilltest.png

It looks too overhead, like you are looking down at a circle.

I want to make masks/layers I can combine to make the hills (2D Flat tiles + 2D Shadow mask + 2D Coloration mask = Nice 2D hill).
I can handle the programming side of it for applying the 2D masks for shadowing and coloration in my engine, but I can't actually visually distort or move the pixels themselves (only lighten/darken or colorize).

I'm looking for advice and examples of how a 2D artist might draw the hill, in terms of shadowing and lighting, if they were doing it manually in photoshop.
Most 2D games just avoid slopes by having cliffs. Cliffs are easy - they are just like indoor walls. Slopes / slanted ground is rather harder, in my opinion.
Do you need a few tiles to be 'uphill' (for game bonuses), or do you just need a hilly region?

If you just need hilly area, you can do more of a rolling hills effect - showing a number of round-topped, individual hills on the tile. eg: I sometimes use "Battle for Wesnoth" as a good guide to tile graphics.

http://www.wesnoth.org/images/sshots/wesnoth-1.9.0-4.jpg

At the top of this image there's a few steep mountains, but around them are some lower hills. Perhaps if you copied this effect (and made them green) it would be easier.
The game is a classical-style RPG, like this:
http://jamingrey.com/wp-content/blogs.dir/OfStrangerFlames/Uploads/Development%20pictures/2011/furniture.png
http://jamingrey.com/wp-content/blogs.dir/OfStrangerFlames/Uploads/Development%20pictures/2011/Village%20Scene.png

Except with better, more-detailed, graphics ([size=2]Those are early test shots from over a year ago - I don't have any more recent screenshots though).

The graphical style isn't "one mountain = one tile". I'm thinking of an entire area, maybe 400 tiles by 400 tiles (or more) of hilly terrain.
Cliffs I can handle, cities and towns even more so. Forests are doable, farms I can manage. But hills... I definitely have a problem with. I can't think of any game like this that has real hills (and not just ledges).
Here's another test:

Shadow mask only:
anothertestwithout.png

Shadow mask + some coloration (light yellow on west slope, light purple on south) + shifted the tiles on the hill a few pixels off-center from the tiles not on the hill:
anothertest.png

And here's the same thing (shadow + coloration + shifted tiles) with the top of the hill being slightly yellowed and lightened and not just the side.
anothertestwithlighterh.png

And here's the shadow mask I slapped together in fifteen minutes for testing:
anothertestmask.png

Couple observations: I think the subtle coloration (warmer yellow coloration + cooler purple coloration) adds quite a bit of importance. I think the offsetting the pixels helps a little, especially with such obviously tiling placeholder tiles; it helped more than I expected. Making the south-facing slope wider than the west-facing slope seems to have helped as well. Brightening and yellowing the top of the hill also helped. All of these helped in subtle ways, and each added a little bit more to trick my eyes into seeing a hill (instead of seeing, as someone else mentioned to me about the previous post's picture, "A coffee cup ring staining a carpet").

What do you think the ratio of the thickness of the sides should be? I'm thinking maybe South = 1, East/West = 2/3rds, North = 1/3rd.
What colors should I best use for ambient outdoor shadows and highlights for the hill? Should I use darker yellow or lighter? Light blue, dark blue, light purple, or deep purple for shadowing?
What should I use for the top of the hill? The same yellow as the west slope, or brighter, or less of it?

What are some other artistic tricks I can use to further help the illusion of perspective and depth? I can't have any vanishing points - the tiles must remain a square axis-aligned grid.
I think that last attempt doesn't look so bad. As for the perspective issue you highlighted with the circle, you want the front-facing slope to be wider than the back-facing slope. That' how some of the Zelda games do it, and how I've done it in the past as well.

throw table_exception("(? ???)? ? ???");

Not sure if this is ontopic, so please ignore if it is. Did you thought about non-rectangular tiles? They are still in 2D, but Y axis is affected by vertices "height". Ligh'n'shadow does the rest of the magic. Thats how we do it in our game (see attachment)
Interesting idea, but I'd prefer to keep fully square axis-aligned 2D tiles. My game doesn't have dynamic lighting or shadows, just shadowmaps and lightmaps applied to tiles.

One possibility is perhaps creating 3D models of hills with proper lighting, and then rendering them to an image, and breaking that up into tiles and tilesets. It's something I might look into.

One possibility is perhaps creating 3D models of hills with proper lighting, and then rendering them to an image, and breaking that up into tiles and tilesets. It's something I might look into.

I would sugguest it this way. I've done it to paint my splash/title screen (see below), if you need some basic blender file and help send me an email. You need 15 mins to setup a basic scene with a simple hill, one light source, ortho camera, AO

splash_wip_1_2.png

This topic is closed to new replies.

Advertisement