Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to build backgammon game. I have successfully built the board using primitives such as lines, triangles and circles. I'm curious whether it's possible to draw the board using images which will make the board look much nicer. Is it possible to have images of triangle and then to put on top of it tiles? How is this achieved?

For example, let's say I have 100x80 image of a triangle and a 100x20 tile image of tile. What theoretically needs to be done in order for the tile image to be shown on top of the triangle image? (each have different colors, and the width of both is the same).

P.S I'm currently programming this in Objective C for the iOS, but I don't think it's important, as this is more of a general question.


share|improve this question

closed as not a real question by Nathan Reed, bummzack, doppelgreener, Byte56, John McDonald Sep 17 '12 at 17:22

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Yes, it's possible. – Hackworth Aug 17 '12 at 17:10
Essentially this would be done by drawing a rectangle and applying a texture of your game board to it. – Byte56 Aug 17 '12 at 18:22
what do you mean applying texture? – Anonymous Aug 17 '12 at 18:57
You should use cocos2d and read a tutorial. If you follow this advise you WILL save a lot of time. Unless this is a learning experience. – Joey Green Aug 17 '12 at 23:16
up vote 0 down vote accepted

The answer is that it's simply a matter of the pictures you use. It turns out that .png files have no background which means you can create layers. I created such files using Pixelmator and here is a quick tutorial on the subject:

I'm developing for the iphone so if anyone is interested, I used UIImageView and added subview to the master UIImageView and it works very nicely.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.