Page MenuHomeWildfire Games

Smooth new Kushite background
Needs ReviewPublic

Authored by Polakrity on Jan 24 2019, 5:40 AM.

Details

Reviewers
Stan
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

In the same spirit as #D982, fix something not really notifiable.

There are small slutterings when the Kushite background is scrolling.
Adding the round_coordinates attribute for all sprites fix it.

Also I move the offset of balcony a few pixels to display a bit more the guard.
(The balcony isn't fully displayed following the resolution of the user's screen maybe we can scale it a bit.)

Test Plan

Focus your attention on the elements of background like balcony, clouds.. and notice the slutterings.
Apply the patch and see the little difference.

*You can delete the others backgrounds in public\gui\pregame\backgrounds to avoid displaying them.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 6904
Build 11316: Vulcan BuildJenkins

Event Timeline

Polakrity created this revision.Jan 24 2019, 5:40 AM
Vulcan added a subscriber: Vulcan.Jan 24 2019, 5:43 AM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/pregame/backgrounds/kush.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/pregame/backgrounds/kush.js
|  16|  16| 			"tiling": true,
|  17|  17| 		},
|  18|  18| 		{
|  19|    |-			"offset": (time, width) => -55,	
|    |  19|+			"offset": (time, width) => -55,
|  20|  20| 			"sprite": "background-kush1-4",
|  21|  21| 			"tiling": false,
|  22|  22| 		},
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/991/

Polakrity edited the summary of this revision. (Show Details)Jan 24 2019, 5:47 AM
Stan added a reviewer: Stan.Jan 24 2019, 8:28 AM
Stan added a subscriber: Stan.

The reason I offsetted it a little is for 16/10 resolution and 21/9 to reduce the damage.

Did you check those resolutions as well as 1024x768 ?
Someone reported the clouds moved too fast can you check ?
Thanks for the patch !

binaries/data/mods/public/gui/pregame/backgrounds/kush.xml
30

This seemed to have no effect whatsoever' are you sure it's useful ?

Polakrity added a comment.EditedJan 24 2019, 12:11 PM

I didn't really notice the clouds move too fast but maybe its just me.

Polakrity marked an inline comment as done.Jan 24 2019, 12:12 PM
Polakrity added inline comments.
binaries/data/mods/public/gui/pregame/backgrounds/kush.xml
30

I added this without really take account of what is it.
I think this wrapping effect was useful for avoid the occurence of black border.
But since rev 16747 its use has become useless.

Stan added inline comments.Jan 24 2019, 12:50 PM
binaries/data/mods/public/gui/pregame/backgrounds/kush.xml
30

Do you know why, If I could clamp the sprite to the edge that would be way better than manually offsetting it.

Polakrity updated this revision to Diff 7383.Jan 24 2019, 2:08 PM

Update patch:
Maybe a better balcony scale.
And remove the effect.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/994/

Stan added inline comments.Jan 24 2019, 11:57 PM
binaries/data/mods/public/gui/pregame/backgrounds/kush.js
18–19

If you reduce the height of the window it will break IIRC hence why I left the guard a bit on the edge. Clamping would be nice ...

Polakrity updated this revision to Diff 7465.Feb 7 2019, 3:24 PM
Polakrity marked an inline comment as done.
Vulcan added a comment.Feb 7 2019, 3:25 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/1050/

nani added a subscriber: nani.Feb 7 2019, 3:36 PM

I can also feel the clouds move too fast relative to the city+river+desert+near mountain (looks like if the clouds are very close).

Also the parallax effect for the far distant mountains+sky doesn't feel coordinated with city+river+desert+near mountain one

Stan added a comment.Feb 7 2019, 3:51 PM

@nani Feel free to suggest values.

@Polakrity if I understand correctly the piece of code you added in mainmenu.js allows the clamping ? :) If so, maybe it would be be nice to check for the sprite's attribute instead of the offset ?

What do you mean by the sprite's attribute?

And I just visualized the kush1_1.png image.
Is it desired to not display the desert in the menu?

nani added a comment.EditedFeb 8 2019, 6:27 PM

How about this?

		{
			"offset": (time, width) => 0.07 * width * Math.cos(0.1 * time),
			"sprite": "background-kush1-1",
			"tiling": true,
		},
		{
			"offset": (time, width) => 0.05 * width * Math.cos(0.1 * time),
			"sprite": "background-kush1-2",
			"tiling": true,
		},
		{
			"offset": (time, width) => 0.04 * width * Math.cos(0.1 * time) + 0.01 * width * Math.cos(0.04 * time),
			"sprite": "background-kush1-3",
			"tiling": true,
		},
		{
			"offset": (time, width) => -40,
			"sprite": "background-kush1-4",
			"tiling": false,
		}
Stan added a reviewer: Restricted Owners Package.Sun, Feb 24, 5:02 PM

I can't review code change alone, adding the GUI guys to the queue.

Before the patch the balkon position was wrong.


Now after the patch the balkon is on the right position but stretched.