1.5x Setting jaggy

Ninjadoodle

  • Posts: 313
Hi guys, I know it has been mentioned before that the 1.5x setting is missing, but I just wanted to ask when it is likely to be implemented.

I'm starting on a game and need to know if I can design for 480x320 or workaround it by using a camera workaround (my target is Flash and 480x320 is too small, so 1.5x would be perfect).

Thank you in advance!

« Last Edit: June 08, 2013, 04:24:37 pm by Jon »
It's all fun and games until somebody get's a shuriken in their eye!

Legendary Hoamaru

  • *
  • Posts: 1088
Today, doing it now.

Legendary Hoamaru

  • *
  • Posts: 1088
From my tests this should be good for everyone else or at least all new games.

@Jon On my desktop though (and possibly existing games) it seems there is an issue with the automatic conversion if the files for the scale doesn't exist?  It generates an invisible image for all missing scales (even before the change).

When I import a sprite and save I don't have this issue, so maybe it's an issue with reading in the png file?

I'm referring to this code in EditableAnimation Line 365:

Code: [Select]
if(scale > 1 && !new File(Locations.getGameDirectory(G.getGame()) + url).exists())
{
//Make one on the spot, do not add to memory unless actor opened
String standard = folder + File.separator + getParentID() + "-" + getID() + ".png";

InputStream is = Game.getResourceAsStream(standard);
BufferedImage source = FileUtil.readImage(is);

source = ImageUtil.scale
(
source,
(int) (source.getWidth() * scale),
(int) (source.getHeight() * scale),
FrameImportDialog.getResizeType()
);
FileUtil.writeToPNG(Locations.getGameDirectory(G.getGame()) + url, source);

Debug.error("Missing " + scale + "x size animation image. Wrote it to " + url);

if (!fullLoad)
{
return;
}
}

The code for scaling and writing works everywhere else for me, so why is this one failing?  Wonder if I have to update java for this desktop.  Need other people to test this one for sure to see if it's just me.

Ninjadoodle

  • Posts: 313
Hi! Thank you for adding the mode :)

I've tested it and on an existing unfinished 3.0 game and I get a black screen with the 1.5x setting (the game runs in the background - I can hear the sounds).

On a new game, the 1.5x setting works, but the smoothing on 4x graphics is really bad (it's fine with at 2x Scale)

Is there something you can do about the smoothing?

« Last Edit: January 10, 2013, 01:08:26 am by Ninjadoodle »
It's all fun and games until somebody get's a shuriken in their eye!

Legendary Hoamaru

  • *
  • Posts: 1088
You can change the resize interpolation when you are importing graphics to something other than Bicubic to fix the later.  Check top right corner of frame importing.

I have work so can't work on anything till later.  I'm going to revert the changes and try again.

To retest when I recommit these changes later, you have to delete the 1.5x graphics from the folder.

Ninjadoodle

  • Posts: 313
Hi, yup I tried the different resize settings (bicubic and biliniear) but still looks really bad/jaggy.

I will test when you have a new version up :)

Thank you!
It's all fun and games until somebody get's a shuriken in their eye!

Jon

  • *
  • Posts: 17524
@Mike - try to read it in a more routine way, via a File / URL, rather than the legacy Pulpcore reader which it currently does.

Legendary Hoamaru

  • *
  • Posts: 1088
Ended up having to draw the loaded graphic onto another BufferedImage, then pass that to the scaler.  Fixed.  Not sure what is up with file loaded images with the scaler.

To retest:

1. Close Game
2. Delete the invisible 1.5x graphics from the resource folder of your existing game.
3. (For no smoothing) Change default resize settings to no smoothing in preferences.  See attachment.
4. Open the game.

Jon

  • *
  • Posts: 17524
Ninjadoodle - please test this out and let us know if it's fixed.

mzxstosch

  • Posts: 96
for me it's absolutely not solved. I've attached an image; from left to right.

1: Stencyl's conversion to 1x | 2: Stencyl's conversions to 1.5x | 3: Stencyl's image import at 2x
                                         
                                          4: Photoshop's conversion to 1.5x

notice the blur on the second image.

Legendary Hoamaru

  • *
  • Posts: 1088
I'm not having this issue at all, can someone else take a look at this?  You're positive the resize setting is set to "No Smoothing" in your preferences?

Edit: Actually could you pass me that image you're testing with?

Jon

  • *
  • Posts: 17524
As Mike says, check the Resize Method setting being used when you import the graphics. If it's set to No Smoothing, that may be your problem.

mzxstosch

  • Posts: 96
mmm. Before my first post I deleted the graphics in the game-generated folder and then let them be re-generated resulting in the 'blur' even with stencyl set to 'no smoothing'.

However, when I deleted also the graphics from the game's folder and stencyl again set to 'no smoothing' the result is even worse.

I have attached both the original graphic and a screenshot of the latest result.

MacMowl

  • Posts: 65
Hi,

I have exactly the same problem as mzxstosch.

I tried all resize methods but my graphics recently (since last stencyl download) imported still not smooth.

Bye

Jon

  • *
  • Posts: 17524
This keeps getting reported as happening. I'm going to point all the new topics here and reopen this under your queue.