Jump to content


Photo

Problem With Large Images? Help


  • Please log in to reply
11 replies to this topic

#1 adamsmith145

adamsmith145

    GMC Member

  • GMC Member
  • 40 posts
  • Version:Unknown

Posted 10 March 2012 - 04:51 AM

I am having quite the problem with a single image in my Studio game. I created the game in 8.1, and everything else works just fine in Studio, except for this single image in the game.

The game is a simple racing game, and uses a simple track. The resolution of the game is 480x800. The image used to create the sprite/object is 480x5600, and then it just scrolls down to create the effect of driving. You can see in the 8.1 version how clear the track looks, but how distorted it appears in Studio. I have run it as html 5, c++, and android... same problem every time.

Any tips or ideas on how to fix this? Thanks in advance!

Posted Image

Edited by adamsmith145, 10 March 2012 - 04:52 AM.

  • 0

#2 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14446 posts
  • Version:GM:Studio

Posted 10 March 2012 - 05:01 AM

use a smaller image (5000 pixel tall is way too big) and use code to tile a series of the same image one above the other.
  • 0

#3 fireblade212

fireblade212

    GMC Member

  • GMC Member
  • 325 posts
  • Version:GM8

Posted 10 March 2012 - 05:01 AM

it doesnt appear to be distorted, but using a anti-aliasing effect. is the sprite like this in the sprite editor on studio?
  • 0

#4 cotycrg

cotycrg

    GMC Member

  • GMC Member
  • 852 posts
  • Version:GM:Studio

Posted 10 March 2012 - 07:32 PM

"480x5600"
DEAR GOD WHY. It's probably being compressed because of how large it is!! Just make it "480x100" or something and loop it.
  • 0

#5 King Tetiro

King Tetiro

    King of Orenna

  • GMC Member
  • 2193 posts
  • Version:GM8

Posted 10 March 2012 - 08:15 PM

"480x5600"
DEAR GOD WHY. It's probably being compressed because of how large it is!! Just make it "480x100" or something and loop it.

480x5600... *Facepalm*

You can't have that size in GMStudio. 1024 pixels or less
  • 0

#6 TerraFriedSheep

TerraFriedSheep

    GMC Member

  • GMC Member
  • 2846 posts
  • Version:GM:Studio

Posted 11 March 2012 - 11:25 AM

Edit 2nd April 2013:

 

It seems this post is outdated now, check further through the topic for more recent replies :)

 

I quote this from the "Designing Successful iPhone Games" document by Overmars:

Texture sheets

On iOS and Android the sprites, background images, and fonts you use must be packed into texture sheets. These are 1024x1024 images. Our system does this automatically for you. It is clever in the sense that it crops the images by removing all transparent pixels around it. This does mean that no image should by higher or wider than 1024 pixels! If you really need something larger, split it in different images.

What you should also realize is that only 5 texture sheets are available. All your sprites, fonts, and backgrounds must fit into this. So dont use large sprite images or backgrounds unless this is strictly necessary. Dont use many different fonts and limit the range of characters to the ones you need. Sometimes you can break up a large image into smaller ones that use less space. (E.g. when you have a nice border around the play area dont use one large image that is transparent in the center, but split it up into four images.) Or you can reuse parts of the image at different places. When you have a large animation, you might be able to use a single image for the stationary part and only a large number of sub-images for the part that changes. (E.g. separate the feet from the rest of the body for a walking animation.)

Currently it is not possible to load background during game play. So all backgrounds must be included in the game itself, and must fit in the texture sheets. As indicated above you can load sprites. But they must still fit in the video memory.



So basically, you have 5 x 1024x1024 sheets in which all your graphics need to squeeze into.

Edited by TerraFriedSheep, 02 April 2013 - 10:34 PM.

  • 0

#7 King Tetiro

King Tetiro

    King of Orenna

  • GMC Member
  • 2193 posts
  • Version:GM8

Posted 11 March 2012 - 11:39 AM

You know what? I'm going to make an excel spreadsheet so people can make sure they keep with the texture page limits
  • 0

#8 sin_of_nature

sin_of_nature

    GMC Member

  • GMC Member
  • 87 posts
  • Version:Unknown

Posted 01 April 2013 - 02:07 PM

Is the 5 sheets of 1024x1024 still true?  I'm sure I've put more in than that.  Tablets are up in the 2000x whatever resolutions so surely they can handle more than that.  Backgrounds alone could take more than that in a project.

 

I cant seem to find any definitive answer on the limitations.  Tried help, wiki and google and they all conflict.

 

Anyone know the current limitations in GMS 1.1.872?


  • 0

#9 Tarik

Tarik

    GMC Member

  • GMC Member
  • 2483 posts
  • Version:GM:Studio

Posted 01 April 2013 - 09:30 PM

The 5 sheets of 1024x1024 isn't true anymore. However, most projects have a 2048x2048 texture page size by default. This means anything bigger than that is not going to come out pixel-perfect. Creating a background-image with a height of 5000 pixels is not practical, the solution is usually to tile it vertically and use a few small additional sprites/tiles for any unique variations of the background.


  • 0

#10 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14446 posts
  • Version:GM:Studio

Posted 02 April 2013 - 12:23 AM

Have you Unchecked the Interpolate Color Between Pixels in Studio's Game Option?


  • 0

#11 sin_of_nature

sin_of_nature

    GMC Member

  • GMC Member
  • 87 posts
  • Version:Unknown

Posted 02 April 2013 - 06:53 AM

Thanks, my own fault for looking at old doc's found by google (where TerraFriedSheep found his quote from).  Brilliant news.

 

 

The 5 sheets of 1024x1024 isn't true anymore. However, most projects have a 2048x2048 texture page size by default. This means anything bigger than that is not going to come out pixel-perfect. Creating a background-image with a height of 5000 pixels is not practical, the solution is usually to tile it vertically and use a few small additional sprites/tiles for any unique variations of the background.


Edited by sin_of_nature, 02 April 2013 - 06:53 AM.

  • 0

#12 TerraFriedSheep

TerraFriedSheep

    GMC Member

  • GMC Member
  • 2846 posts
  • Version:GM:Studio

Posted 02 April 2013 - 10:36 PM

Thanks, my own fault for looking at old doc's found by google (where TerraFriedSheep found his quote from).  Brilliant news.

 

 

The 5 sheets of 1024x1024 isn't true anymore. However, most projects have a 2048x2048 texture page size by default. This means anything bigger than that is not going to come out pixel-perfect. Creating a background-image with a height of 5000 pixels is not practical, the solution is usually to tile it vertically and use a few small additional sprites/tiles for any unique variations of the background.

 

I've edited my post so hopefully anyone else who reads it won't get mislead, as I expect google will direct more people here in the future. Thanks for bringing it to my attention!


  • 1




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users