Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Many vertical or horizontal 1-pixel gaps in Sonic Demo.
Started by ouguolin2013 Sep 13 2015 05:39 AM

6 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

ouguolin2013

[GLOBAL: userInfoPane.html]
ouguolin2013
  • Observer

  • 22 posts
  • Corona SDK

I found many gaps in Sonic Demo in MTE v0.99, How to get ride of this? See attachment.

Attached Files



[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,641 posts
  • Corona SDK

In the simulator or on the device?  I'm not really familiar with MTE, but I'm familiar with the issue of  gaps when working on the simulator.  (Don't worry too much about gaps while running on the simulator.)

 

If you haven't checked yet, try this on a device.

 

If you have, you should give more details about your test platforms and setup:

  1. Device
  2. Resolution Of Device
  3. Did you modify the Sonic Demo or is it 'factory' set.
  4. Corona SDK version (Always tell us this when asking a question) Ex: 2015.2707 is a full Corona version number.
  5. Using OSX or Windows for dev and testing?  Also which version (Ex Windows 7/8/10)

 

Finally, if you're getting gaps on the device, you're experience scaling precision issues, where the scaling is at such a value that you sometimes lose a pixel on scaled images.  You'll need to adjust your scaling to be pixel aware or perfect.

 

Sergey Lerg did a great post on this and has a solution here:

 

http://spiralcodestudio.com/corona-sdk-pro-tip-of-the-day-36/


Edited by roaminggamer, 13 September 2015 - 12:14 PM.


[TOPIC: post.html]
#3

ouguolin2013

[GLOBAL: userInfoPane.html]
ouguolin2013
  • Observer

  • 22 posts
  • Corona SDK

Hi,

 

1.I tested it on my iPad 2, 

2.Resolution is 1024x768

3.No, I didn't. 

4.version number is: 2015.2576

5.OSX 10.10.3 



[TOPIC: post.html]
#4

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,641 posts
  • Corona SDK

1. I'd use a newer version of the SDK, but that's just me. (2015.2705 is trouble free right now as far as I can tell.  Later than that has a widget issue that is showing up for some folks.)

 

2. I'd use a pixel perfect scaling (as per my Sergey Suggestion):

 

3. I just got the code and am looking at it.  You are referring to this sample right?: "Platformer - Sonic Finale 0v990"

 

I'll assume #3 is yes.



[TOPIC: post.html]
#5

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,641 posts
  • Corona SDK

Well I tried it and that doesn't solve the problem.

 

I do see that the issue happens when the camera zooms in and out.  I would expect this actually.  If you use tiles and zoom the group they are in just right, you'll get artifacts (lines).

 

I'm afraid I don't have a good answer for you.

 

@all,

 

If anyone else has a suggestion, please share!



[TOPIC: post.html]
#6

thomas6

[GLOBAL: userInfoPane.html]
thomas6
  • Contributor

  • 983 posts
  • Corona SDK

Hi all,

 

I'm seeing all sorts of supercomplicated fixes, so I'll just chime in here: I've had tremendous success in some of my tile-based project by setting the scale of my tiles to 1.001 or something like that. It's not a perfect solution, but for many projects it will do just fine.

 

For the record: experiment with the size yourself, but the general rule is that you make the tile a fraction bigger than exactly 1.



[TOPIC: post.html]
#7

ouguolin2013

[GLOBAL: userInfoPane.html]
ouguolin2013
  • Observer

  • 22 posts
  • Corona SDK

thanks, roaminggamer and thomas!




[topic_controls]
[/topic_controls]