Willthemost / pywright

Automatically exported from code.google.com/p/pywright
0 stars 0 forks source link

Pywright: Court-Record UI: Pixellated icons?? #153

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Evidence icons look bearable, but not the profile icons...

This greatly hurts the player experience, as it all looks garbled/squished. 
Usually when things get downsized, they get somewhat blurry don't they?

I don't know what kind of bug is this, but this is something that needs to be 
addressed, since the engine is doing this automatically, with no way for the 
author to fix by his/herself.

Attached is a screenshot of character profiles.

Original issue reported on code.google.com by mrhudd...@gmail.com on 22 Jan 2014 at 12:48

Attachments:

GoogleCodeExporter commented 8 years ago
Will check this out.

Original comment by saluk64007@gmail.com on 24 Jan 2014 at 7:48

GoogleCodeExporter commented 8 years ago
Yuck. Ok, so I want to say in the real games they either are having two 
different images for evidence/profiles - one for the zoomed in view and one 
that is smaller - in order to avoid ugly scaling. I'm not sure if this is 
entirely accurate. I can use a smoother scale to scale the images down, which 
should help quite a bit, but supporting different images for each view might be 
nice too.

Original comment by saluk64007@gmail.com on 24 Jan 2014 at 7:55

GoogleCodeExporter commented 8 years ago
Fixed in #879. I changed a couple image.scale into image.smoothscale and it 
looks decent enough. At least the icons are the same amount of pixellated as 
the rest of the graphics are :)

I'm not going to put in different images for small or zoom, as I think few 
people would actually use it for the effort to support the feature. If I ever 
redo the court record coding (which I hope to do at some point) I'll rethink 
things.

Original comment by saluk64007@gmail.com on 24 Jan 2014 at 8:06

GoogleCodeExporter commented 8 years ago
In the games, I think they use just one image. They use the smaller icons 
without the borders for the regular CR and the regular ev icons WITH the 
borders added on zoom. For showing evidence, they use two layers: the icon 
template with the border and the evidence on top. You can see it's two layers 
when the screen is shaking that the icon shakes but the evidence does not. 
However, even PWLib and AAO can't emulate this correctly, so this kind of 
emulation can be scrapped.

However, what cannot be scrapped is the resizing of the actual evidence. It 
seems to be resized incorrectly on the CR, as the cursor does not fit correctly 
with the evidence icon. Any attempts to fix either mean it will definitely look 
wonky. I tried this with both evidence and the cursor icon, and nope.

In this attachment, you can see how the cursor and the evidence are not in 
sync. I don't believe we should change the cursor. That works well. It's the 
evidence that's not aligning well and reduced in size way too much. The cursor 
is 42*42. With two borders inside, it leaves with a 36*36 area inside. However, 
the evidence is resized to 35*35, flush with the lower right side. It creates 
problems for people who want to  customize their UI.

Original comment by earlAcda...@gmail.com on 2 Feb 2014 at 4:01

Attachments:

GoogleCodeExporter commented 8 years ago
Yeah as per my last comment I fixed it from 35x35 to 36x36. Was off by one.

Original comment by saluk64007@gmail.com on 2 Feb 2014 at 4:09

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hmm, the cursor is still not fitting snugly over the evidence icon. Because 
either the evidence is aligned wrong or the cursor is not aligning it 
correctly. I think the positioning regarding the cursor is wrong. It's offset 1 
pixel to the left and 1 pixel up. The evidence is positioned at the correct 
position, which lead me to believe it's the cursor. Also, I may have to redo 
the assets for the CR in general. The boxes are 35*35 but now the evidence is 
resized to 36*36, I'll have to redo these.

So basically, cursor alignment needs fixing. I'll take care of the art assets.

Original comment by earlAcda...@gmail.com on 9 Feb 2014 at 11:29

GoogleCodeExporter commented 8 years ago
Yeah I see that. I think I drew the boxes originally myself, so maybe I got it 
wrong at the beginning. You can modify the scaling in core.py, line 1728:

        try:
            self.small = pygame.transform.smoothscale(self.img,[36,36])
            self.scaled = pygame.transform.smoothscale(self.img,[70,70])
        except:
            self.small = pygame.transform.scale(self.img,[36,36])
            self.scaled = pygame.transform.scale(self.img,[70,70])

Change both [36,36] to whatever you end up needing.

The positioning and spacing is in core/macros/court_record_vars.mcro

Thanks!

Original comment by saluk64007@gmail.com on 9 Feb 2014 at 11:35

GoogleCodeExporter commented 8 years ago
I found the solution to the misaligned ev over the icons. Thanks to your coding 
hint, I found the actual problem with them. And I also got the standard CR 
evidence fixed as a result.

on core.py go to line 3589 and replace the following code:
    if not self.back and not self.switch and self.sx == cx and self.sy == cy:
        dest.blit(self.cursor,[x-4,y-4])

with this:
    if not self.back and not self.switch and self.sx == cx and self.sy == cy:
        dest.blit(self.cursor,[x-3,y-3])

I've fixed up the visual assets related to this. So now the emulation should 
work perfectly.

Original comment by earlAcda...@gmail.com on 10 Feb 2014 at 12:32

Attachments: