Poll

SGDK2 - Graphic Sheets -

Help
0 (0%)
Errors
0 (0%)
FAQ
0 (0%)

Total Members Voted: 0

Author Topic: Import Graphic Sheet - How do I do this?  (Read 5948 times)

PTH

  • Visitor
  • *
  • Posts: 7
    • View Profile
    • Email
Import Graphic Sheet - How do I do this?
« on: 2011-05-10, 10:46:40 PM »
Hi Everyone,
   I want to import a graphic file as a sheet (.png) I can not figure out
how to create the necessary files. Filename: patternTile.png

Thank

PTH

Vincent

  • SGDK2 Addict
  • Expert
  • Fanatic
  • *****
  • Posts: 612
  • Legacy of Kain: Revival is completed!!!
    • View Profile
    • Chivalrous Games
    • Email
Re: Import Graphic Sheet - How do I do this?
« Reply #1 on: 2011-05-11, 04:25:37 AM »
Hi PTH!

I'm not sure I understand the part about you not knowing how to create the necessary files.  I'll explain how this works and you tell me where you get stuck. :)

First of all, you must have the png you want to import.  You can make it with Paint, Photoshop or almost any graphic editor.  When you import a png, it must fit a whole graphic sheet, not a part of it like a cell or a row of cells.
Also, your png image must respect the configurations of the graphic sheet, otherwise it will be all messed up when import is completed.
As an example, if you have a graphic sheet with:
cellheight = 32
cellwidth = 32
columns = 3
rows = 2
This means that the png to import must be of height = 64 pixels (32 cellheight * 2 rows) and of width = 96 pixels (32 cellwidth * 3 columns).
In this example you have a graphic sheet with 6 cells, so you should have 6 images into your png, each of them must fit in a cell.

When you have your png ready, go into SGDK2, in the graphics sheets folder, expand your sheet and double-click on "edit images".  This opens up the graphic editor that allows you to draw into your graphic sheets cells.  Once you are there, you can import your png by going into the menu "file" and then "import image as sheet".  Browse to find your png image and open it. 
If your png fits the configuration, it will load appropriately.  If it does not fit, you will get a message saying that your png doesn't fit the graphic sheet size.

Keep in mind that it is not advisable to make graphic sheets bigger than 1000 px * 1000 px, some graphic cards cannot handle such big images when running a game.  If you want to display an image bigger than 1000 px wide or high, it is better to separate it into many graphic sheets.

That's it!  Have fun!
Legacy of Kain: Revival completed!
http://lokrevival.webs.com

See also my company website:
http://chivalrousgames.com

PTH

  • Visitor
  • *
  • Posts: 7
    • View Profile
    • Email
Re: Import Graphic Sheet - How do I do this?
« Reply #2 on: 2011-05-13, 02:15:47 PM »
Thanks for your help. I had tried many different things. I keep forgetting to look for pull down menu changes. It would be nice if there was a way to see all the menu options and what actions is required to get a menu option to be available. Even a manual page of all the menu's and the event which activates the menu. I know it is a personal issue.

Thanks you helped me a lot


PTH

Vincent

  • SGDK2 Addict
  • Expert
  • Fanatic
  • *****
  • Posts: 612
  • Legacy of Kain: Revival is completed!!!
    • View Profile
    • Chivalrous Games
    • Email
Re: Import Graphic Sheet - How do I do this?
« Reply #3 on: 2011-05-13, 02:24:34 PM »
No problem!  If you have other questions, I'll be happy to help. :)
Legacy of Kain: Revival completed!
http://lokrevival.webs.com

See also my company website:
http://chivalrousgames.com

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Import Graphic Sheet - How do I do this?
« Reply #4 on: 2011-05-14, 08:45:26 AM »
It might be worth your while to browse the table of contents in the help file.  Each screen lists all of its menu entries (if it has any) and describes their function.  Then at least you'll know what's available.

PTH

  • Visitor
  • *
  • Posts: 7
    • View Profile
    • Email
Re: Import Graphic Sheet - How do I do this?
« Reply #5 on: 2011-05-14, 10:40:24 PM »
I must be missing something. The When I use the help feature. I have a lot of items with "?". Is the help missing? Is it a seperate down load?

Thanks

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Import Graphic Sheet - How do I do this?
« Reply #6 on: 2011-05-15, 06:10:38 AM »
If you look at the FAQ, that is one of the two main questions there:
http://gamedev.enigmadream.com/index.php?topic=1383.0

Item #2 leads to this discussion about the help file:
http://gamedev.enigmadream.com/index.php?topic=1400.0

That in turn links to a couple other articles explaining how to unblock the help file:
http://blogs.technet.com/b/seanearp/archive/2007/05/28/can-t-read-chm-compiled-help-on-vista-xp-2003.aspx
http://www.codeplex.com/ValidationFramework/Wiki/View.aspx?title=FAQ

Your symptom is a bit different, though.  If this solution doesn't work, could you post a screenshot of what you're seeing?