7 Replies - 277 Views - Last Post: 06 April 2013 - 10:05 AM Rate Topic: -----

#1 lifeinbinary  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 158
  • Joined: 15-February 11

Positioning sprites

Posted 05 April 2013 - 07:07 PM

I have made a world map using photoshop where every territory is in a separate layer. Is there a good way to save each layer as a smaller image and then know where to display the images such that the final view will look like the original entire photoshop image?
Is This A Good Question/Topic? 0
  • +

Replies To: Positioning sprites

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9220
  • View blog
  • Posts: 34,624
  • Joined: 12-June 08

Re: Positioning sprites

Posted 05 April 2013 - 07:08 PM

What's the game language in?
Was This Post Helpful? 0
  • +
  • -

#3 lifeinbinary  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 158
  • Joined: 15-February 11

Re: Positioning sprites

Posted 05 April 2013 - 07:13 PM

Objective-C...
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9220
  • View blog
  • Posts: 34,624
  • Joined: 12-June 08

Re: Positioning sprites

Posted 05 April 2013 - 07:16 PM

I am not sure what you exactly mean by 'every territory is in a separate layer', but the webdesign's "slice" tool should get decent edges (after the image is flattened).
Was This Post Helpful? 0
  • +
  • -

#5 lifeinbinary  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 158
  • Joined: 15-February 11

Re: Positioning sprites

Posted 05 April 2013 - 07:19 PM

I'm using Texture Packer to pack my pngs and then using CCSprite to retrieve the individual sprites. I've turned off triming in Texture Packer so that my rectangular sprites (with transparent background) retain the original cut size I used in photoshop. I then use the info panel in photoshop to tell me where the center of my crop is relative to the entire image and then use that point as my position for CCSprite but it doesnt display like the original (about 7 pixels difference)
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9220
  • View blog
  • Posts: 34,624
  • Joined: 12-June 08

Re: Positioning sprites

Posted 05 April 2013 - 07:21 PM

Ahuh.
Was This Post Helpful? 0
  • +
  • -

#7 lifeinbinary  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 158
  • Joined: 15-February 11

Re: Positioning sprites

Posted 05 April 2013 - 07:37 PM

Here I've attached a few screen shots so you can visualize what I'm saying... so how would I display lesotho.png exactly where it is on Map-1024x768.png

By the way i'm using the cocos2d framework...

Attached image(s)

  • Attached Image
  • Attached Image
  • Attached Image

Was This Post Helpful? 0
  • +
  • -

#8 anonymous26  Icon User is offline

  • D.I.C Lover

Reputation: 0
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: Positioning sprites

Posted 06 April 2013 - 10:05 AM

Be careful with the number of layers you are using, you are reducing your options for further layers to place the UI and other assets, for instance. I'm assuming this is for iDevice given what you are saying.

Surfaces should be updated with the latest content over creating a new surface for each additional item.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1