• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Servant of the Lord

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

13 posts in this topic

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[/size])

[img]http://img715.imageshack.us/img715/3305/basicgrid.png[/img]

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

Here's one casual attempt I made:

[img]http://img204.imageshack.us/img204/386/hilla.png[/img]

Using this to multiply with the tiles, to create shadowing:
[img]http://img109.imageshack.us/img109/1851/slopeshading.png[/img]


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!
0

Share this post


Link to post
Share on other sites
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.

[b]The view angle:[/b]

[img]http://img708.imageshack.us/img708/7209/artperspective.png[/img]

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

[img]http://img94.imageshack.us/img94/3921/hilltest.png[/img]

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.
0

Share this post


Link to post
Share on other sites
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.

[url="http://www.wesnoth.org/images/sshots/wesnoth-1.9.0-4.jpg"]http://www.wesnoth.org/images/sshots/wesnoth-1.9.0-4.jpg[/url]

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.
1

Share this post


Link to post
Share on other sites
The game is a classical-style RPG, like this:
[url="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/furniture.png[/url]
[url="http://jamingrey.com/wp-content/blogs.dir/OfStrangerFlames/Uploads/Development%20pictures/2011/Village%20Scene.png"]http://jamingrey.com/wp-content/blogs.dir/OfStrangerFlames/Uploads/Development%20pictures/2011/Village%20Scene.png[/url]

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[/size]).

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).
0

Share this post


Link to post
Share on other sites
Here's another test:

Shadow mask only:
[img]http://img687.imageshack.us/img687/8782/anothertestwithout.png[/img]

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:
[img]http://img708.imageshack.us/img708/9052/anothertest.png[/img]

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.
[img]http://img39.imageshack.us/img39/4751/anothertestwithlighterh.png[/img]

And here's the shadow mask I slapped together in fifteen minutes for testing:
[img]http://img339.imageshack.us/img339/9199/anothertestmask.png[/img]

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.
0

Share this post


Link to post
Share on other sites
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.
1

Share this post


Link to post
Share on other sites
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)
1

Share this post


Link to post
Share on other sites
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. Edited by Servant of the Lord
0

Share this post


Link to post
Share on other sites
[quote name='Servant of the Lord' timestamp='1346699931' post='4976154']
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.
[/quote]
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

[img]http://www.gnoblins.net/wp-content/gallery/internal/splash_wip_1_2.png[/img]
1

Share this post


Link to post
Share on other sites
It's a tough problem. From a programmer perspective I would note that the repeating tile effect enhances the feeling of flatness. That may be one reason the offset helped. Note that on an angle in 3D, that same texture would look squished, so maybe scale the tiles in the direction of the gradient. Also note that in 3D the closer tiles would appear larger. How one would achieve effects like that in pure 2D without mismatching edges... I have no idea. ;)
1

Share this post


Link to post
Share on other sites
[quote name='Krom Stern' timestamp='1346698888' post='4976148']
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)
[/quote]
...is that a remake of knights&merchants, or something similar? oh please, do tell me that it's going to have skirmish...
0

Share this post


Link to post
Share on other sites
If the light comes from the upper-left corner, why do you darken those edges as well? they should be lighter. also, if you're perspective is a little from the front, the back edge is to be shorter than the front.

Also, I know this isn't the first thing on your mind right now, but once you've got the perspective correct, you might also want to tint the shadows a little. Because of different lightsources and their whitebalances, shadows are never just black or grey. In an earth-like atmosphere the shadows would have a little blue in them (the direct, yellow sunlight gets blocked out, but the indirect blue light, reflected in the atmosphere still reaches the shadowed area). In a very similar manner, the highlighted area would have a light yellow-orange tint.

The result would look look smth like the attached

bw,
Tobl

[attachment=11352:hill.png] [attachment=11354:hill2.png] Edited by Tobl
1

Share this post


Link to post
Share on other sites
I was shadowing the sunlit side because I just couldn't get it to look right.
That does look better, I'll keep that in mind while working on it - thanks!
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0