Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource bar (new example) #378

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
Draft

Resource bar (new example) #378

wants to merge 24 commits into from

Conversation

tristanbob
Copy link
Contributor

Draw a bar that displays a resource like health, shield, or any value.

@tristanbob tristanbob added the 🚧 Work In Progress This example is a work in progress label Aug 29, 2022
@tristanbob tristanbob self-assigned this Aug 29, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Aug 29, 2022

@github-actions
Copy link
Contributor

Images automagically compressed by Calibre's image-actions

Compression reduced images by 28.3%, saving 21.38 KB.

Filename Before After Improvement Visual comparison
examples/resource-bar/assets/Blue laser (01).png 744 bytes 708 bytes -4.8% View diff
examples/resource-bar/assets/Fly_1.png 4.13 KB 3.30 KB -20.2% View diff
examples/resource-bar/assets/Fly_10.png 4.25 KB 3.30 KB -22.2% View diff
examples/resource-bar/assets/Fly_2.png 4.13 KB 3.24 KB -21.5% View diff
examples/resource-bar/assets/Fly_3.png 4.35 KB 3.32 KB -23.7% View diff
examples/resource-bar/assets/Fly_4.png 4.35 KB 3.33 KB -23.5% View diff
examples/resource-bar/assets/Fly_5.png 4.28 KB 3.34 KB -22.1% View diff
examples/resource-bar/assets/Fly_6.png 4.41 KB 3.36 KB -23.7% View diff
examples/resource-bar/assets/Fly_7.png 4.45 KB 3.36 KB -24.4% View diff
examples/resource-bar/assets/Fly_8.png 4.39 KB 3.32 KB -24.5% View diff
examples/resource-bar/assets/Fly_9.png 4.34 KB 3.29 KB -24.3% View diff
examples/resource-bar/assets/Moon.png 3.25 KB 2.00 KB -38.5% View diff
examples/resource-bar/assets/Ranger_Carry_1.png 325 bytes 242 bytes -25.5% View diff
examples/resource-bar/assets/Ranger_Carry_2.png 295 bytes 224 bytes -24.1% View diff
examples/resource-bar/assets/Ranger_Carry_3.png 312 bytes 243 bytes -22.1% View diff
examples/resource-bar/assets/Ranger_Carry_4.png 295 bytes 224 bytes -24.1% View diff
examples/resource-bar/assets/Ranger_Climb_1.png 288 bytes 213 bytes -26.0% View diff
examples/resource-bar/assets/Ranger_Climb_2.png 305 bytes 230 bytes -24.6% View diff
examples/resource-bar/assets/Ranger_Climb_3.png 288 bytes 213 bytes -26.0% View diff
examples/resource-bar/assets/Ranger_Climb_4.png 299 bytes 232 bytes -22.4% View diff
examples/resource-bar/assets/Ranger_Daze_1.png 295 bytes 238 bytes -19.3% View diff
examples/resource-bar/assets/Ranger_Daze_2.png 303 bytes 244 bytes -19.5% View diff
examples/resource-bar/assets/Ranger_Daze_3.png 295 bytes 238 bytes -19.3% View diff
examples/resource-bar/assets/Ranger_Daze_4.png 303 bytes 238 bytes -21.5% View diff
examples/resource-bar/assets/Ranger_Dead.png 254 bytes 220 bytes -13.4% View diff
examples/resource-bar/assets/Ranger_Get Up.png 289 bytes 217 bytes -24.9% View diff
examples/resource-bar/assets/Ranger_Headbutt_1.png 335 bytes 262 bytes -21.8% View diff
examples/resource-bar/assets/Ranger_Headbutt_2.png 333 bytes 259 bytes -22.2% View diff
examples/resource-bar/assets/Ranger_Hurt.png 339 bytes 240 bytes -29.2% View diff
examples/resource-bar/assets/Ranger_Idle 1_1.png 321 bytes 247 bytes -23.1% View diff
examples/resource-bar/assets/Ranger_Idle 1_2.png 320 bytes 248 bytes -22.5% View diff
examples/resource-bar/assets/Ranger_Idle 1_3.png 316 bytes 245 bytes -22.5% View diff
examples/resource-bar/assets/Ranger_Idle 1_4.png 322 bytes 247 bytes -23.3% View diff
examples/resource-bar/assets/Ranger_Idle 2_1.png 291 bytes 230 bytes -21.0% View diff
examples/resource-bar/assets/Ranger_Idle 2_2.png 292 bytes 232 bytes -20.5% View diff
examples/resource-bar/assets/Ranger_Idle 2_3.png 285 bytes 227 bytes -20.4% View diff
examples/resource-bar/assets/Ranger_Idle 2_4.png 291 bytes 231 bytes -20.6% View diff
examples/resource-bar/assets/Ranger_Jump Kick_1.png 304 bytes 243 bytes -20.1% View diff
examples/resource-bar/assets/Ranger_Jump Kick_2.png 330 bytes 257 bytes -22.1% View diff
examples/resource-bar/assets/Ranger_Jump Kick_3.png 307 bytes 259 bytes -15.6% View diff
examples/resource-bar/assets/Ranger_Jump Kick_4.png 304 bytes 243 bytes -20.1% View diff
examples/resource-bar/assets/Ranger_Kick 1.png 357 bytes 261 bytes -26.9% View diff
examples/resource-bar/assets/Ranger_Kick 2.png 354 bytes 265 bytes -25.1% View diff
examples/resource-bar/assets/Ranger_Knockdown.png 333 bytes 250 bytes -24.9% View diff
examples/resource-bar/assets/Ranger_Over Throw_1.png 297 bytes 244 bytes -17.8% View diff
examples/resource-bar/assets/Ranger_Over Throw_2.png 310 bytes 253 bytes -18.4% View diff
examples/resource-bar/assets/Ranger_Pick Up 2.png 321 bytes 228 bytes -29.0% View diff
examples/resource-bar/assets/Ranger_Pick Up.png 320 bytes 238 bytes -25.6% View diff
examples/resource-bar/assets/Ranger_Punch 1.png 336 bytes 240 bytes -28.6% View diff
examples/resource-bar/assets/Ranger_Punch 2.png 363 bytes 258 bytes -28.9% View diff
examples/resource-bar/assets/Ranger_Run_1.png 299 bytes 239 bytes -20.1% View diff
examples/resource-bar/assets/Ranger_Run_2.png 315 bytes 244 bytes -22.5% View diff
examples/resource-bar/assets/Ranger_Run_3.png 302 bytes 243 bytes -19.5% View diff
examples/resource-bar/assets/Ranger_Run_4.png 309 bytes 246 bytes -20.4% View diff
examples/resource-bar/assets/Ranger_Stab.png 337 bytes 245 bytes -27.3% View diff
examples/resource-bar/assets/Ranger_Strafe 1_1.png 324 bytes 247 bytes -23.8% View diff
examples/resource-bar/assets/Ranger_Strafe 1_2.png 291 bytes 230 bytes -21.0% View diff
examples/resource-bar/assets/Ranger_Strafe 1_3.png 324 bytes 247 bytes -23.8% View diff
examples/resource-bar/assets/Ranger_Strafe 1_4.png 291 bytes 230 bytes -21.0% View diff
examples/resource-bar/assets/Ranger_Strafe 2_1.png 320 bytes 253 bytes -20.9% View diff
examples/resource-bar/assets/Ranger_Strafe 2_2.png 294 bytes 229 bytes -22.1% View diff
examples/resource-bar/assets/Ranger_Strafe 2_3.png 320 bytes 253 bytes -20.9% View diff
examples/resource-bar/assets/Ranger_Strafe 2_4.png 294 bytes 229 bytes -22.1% View diff
examples/resource-bar/assets/Ranger_Walk 1_1.png 321 bytes 245 bytes -23.7% View diff
examples/resource-bar/assets/Ranger_Walk 1_2.png 291 bytes 232 bytes -20.3% View diff
examples/resource-bar/assets/Ranger_Walk 1_3.png 308 bytes 246 bytes -20.1% View diff
examples/resource-bar/assets/Ranger_Walk 1_4.png 291 bytes 232 bytes -20.3% View diff
examples/resource-bar/assets/Ranger_Walk 2_1.png 294 bytes 229 bytes -22.1% View diff
examples/resource-bar/assets/Ranger_Walk 2_2.png 309 bytes 243 bytes -21.4% View diff
examples/resource-bar/assets/Ranger_Walk 2_3.png 294 bytes 229 bytes -22.1% View diff
examples/resource-bar/assets/Ranger_Walk 2_4.png 286 bytes 233 bytes -18.5% View diff
examples/resource-bar/assets/Ranger_Walk 3_1.png 315 bytes 244 bytes -22.5% View diff
examples/resource-bar/assets/Ranger_Walk 3_2.png 291 bytes 230 bytes -21.0% View diff
examples/resource-bar/assets/Ranger_Walk 3_3.png 316 bytes 248 bytes -21.5% View diff
examples/resource-bar/assets/Ranger_Walk 3_4.png 294 bytes 242 bytes -17.7% View diff
examples/resource-bar/assets/Silver shield.png 781 bytes 745 bytes -4.6% View diff
examples/resource-bar/assets/Star_LargeNarrow.png 707 bytes 630 bytes -10.9% View diff
examples/resource-bar/assets/Star_LargeWide.png 641 bytes 587 bytes -8.4% View diff
examples/resource-bar/assets/Star_Medium.png 386 bytes 354 bytes -8.3% View diff
examples/resource-bar/assets/Star_Small.png 294 bytes 270 bytes -8.2% View diff
examples/resource-bar/assets/Upgraded Potion Blue_No Shadow.png 3.26 KB 438 bytes -86.9% View diff
examples/resource-bar/assets/Upgraded Potion Blue_Shadow.png 3.37 KB 503 bytes -85.4% View diff

4339 images did not require optimisation.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2022

Images automagically compressed by Calibre's image-actions

Compression reduced images by 6.4%, saving 17 bytes.

Filename Before After Improvement Visual comparison
examples/resource-bar/assets/Emote Heart.png 265 bytes 248 bytes -6.4% View diff

4486 images did not require optimisation.

All three behaviors working (partially)
Sprites have 3 ways to change (opacity, tint, animation)
@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2022

Images automagically compressed by Calibre's image-actions

Compression reduced images by 10.7%, saving 43 bytes.

Filename Before After Improvement Visual comparison
examples/resource-bar/assets/tiled_Tiled Empty UI Heart.png 237 bytes 202 bytes -14.8% View diff
examples/resource-bar/assets/tiled_Tiled Filler UI Heart.png 166 bytes 158 bytes -4.8% View diff

4487 images did not require optimisation.

github-actions bot and others added 5 commits November 8, 2022 05:19
- Experimenting with new functions for extensions
- Fixed sprite creation
- Added max quantity to tiled resource
TODO: Change "value" to "quantity" everywhere?
@github-actions
Copy link
Contributor

Images automagically compressed by Calibre's image-actions

Compression reduced images by 79.8%, saving 8.64 KB.

Filename Before After Improvement Visual comparison
examples/resource-bar/assets/Health Bar Box.png 2.91 KB 246 bytes -91.8% View diff
examples/resource-bar/assets/Health Bar.png 1.43 KB 945 bytes -35.5% View diff
examples/resource-bar/assets/Health Indicator_Black Outline Empty.png 109 bytes 107 bytes -1.8% View diff
examples/resource-bar/assets/Health Indicator_Black Outline Heart.png 185 bytes 143 bytes -22.7% View diff
examples/resource-bar/assets/Health Indicator_White Outline Empty.png 110 bytes 107 bytes -2.7% View diff
examples/resource-bar/assets/Health Indicator_White Outline Heart.png 171 bytes 132 bytes -22.8% View diff
examples/resource-bar/assets/Heart.png 372 bytes 283 bytes -23.9% View diff
examples/resource-bar/assets/tiled_Energy Bar Fill.png 2.77 KB 127 bytes -95.5% View diff
examples/resource-bar/assets/tiled_Health Bar Fill.png 2.78 KB 143 bytes -95.0% View diff

4489 images did not require optimisation.

tristanbob and others added 3 commits November 26, 2022 15:38
- And deleted unused assets
- Removed old extension versions
- Removed unused files
- Added new images for sprite resource bars
@github-actions
Copy link
Contributor

Images automagically compressed by Calibre's image-actions

Compression reduced images by 39.3%, saving 169.65 KB.

Filename Before After Improvement Visual comparison
examples/resource-bar/assets/Arrow.png 2.98 KB 271 bytes -91.1% View diff
examples/resource-bar/assets/Arrow2.png 2.98 KB 277 bytes -90.9% View diff
examples/resource-bar/assets/Bomb_No Shadow.png 3.07 KB 354 bytes -88.7% View diff
examples/resource-bar/assets/Bomb_Shadow.png 3.09 KB 371 bytes -88.3% View diff
examples/resource-bar/assets/Heart-1-1.png 375 bytes 259 bytes -30.9% View diff
examples/resource-bar/assets/Heart-1.png 369 bytes 258 bytes -30.1% View diff
examples/resource-bar/assets/Minus Key.png 1.20 KB 893 bytes -27.1% View diff
examples/resource-bar/assets/Playing Card_Back Blue 1.png 25.26 KB 13.93 KB -44.8% View diff
examples/resource-bar/assets/Playing Card_Back Blue 2.png 27.00 KB 13.30 KB -50.8% View diff
examples/resource-bar/assets/Playing Card_Back Brown 1.png 26.66 KB 13.38 KB -49.8% View diff
examples/resource-bar/assets/Playing Card_Back Brown 2.png 27.67 KB 13.12 KB -52.6% View diff
examples/resource-bar/assets/Playing Card_Back Red 1.png 24.03 KB 13.78 KB -42.7% View diff
examples/resource-bar/assets/Playing Card_Back Red 2.png 25.37 KB 14.00 KB -44.8% View diff
examples/resource-bar/assets/Playing Card_Clubs 02.png 3.56 KB 2.50 KB -29.7% View diff
examples/resource-bar/assets/Playing Card_Clubs 03.png 4.19 KB 2.92 KB -30.4% View diff
examples/resource-bar/assets/Playing Card_Clubs 04.png 4.10 KB 2.93 KB -28.5% View diff
examples/resource-bar/assets/Playing Card_Clubs 05.png 4.94 KB 3.41 KB -31.0% View diff
examples/resource-bar/assets/Playing Card_Clubs 06.png 5.14 KB 3.66 KB -28.9% View diff
examples/resource-bar/assets/Playing Card_Clubs 07.png 5.44 KB 3.90 KB -28.3% View diff
examples/resource-bar/assets/Playing Card_Clubs 08.png 6.03 KB 4.16 KB -31.1% View diff
examples/resource-bar/assets/Playing Card_Clubs 09.png 6.27 KB 4.25 KB -32.3% View diff
examples/resource-bar/assets/Playing Card_Clubs 10.png 6.53 KB 4.40 KB -32.7% View diff
examples/resource-bar/assets/Playing Card_Clubs A.png 3.58 KB 2.63 KB -26.6% View diff
examples/resource-bar/assets/Playing Card_Clubs J.png 4.54 KB 3.13 KB -30.9% View diff
examples/resource-bar/assets/Playing Card_Clubs K.png 5.93 KB 4.01 KB -32.3% View diff
examples/resource-bar/assets/Playing Card_Clubs Q.png 4.69 KB 3.26 KB -30.4% View diff
examples/resource-bar/assets/Playing Card_Diamond 02.png 3.16 KB 2.15 KB -31.7% View diff
examples/resource-bar/assets/Playing Card_Diamond 03.png 3.62 KB 2.48 KB -31.5% View diff
examples/resource-bar/assets/Playing Card_Diamond 04.png 3.55 KB 2.40 KB -32.5% View diff
examples/resource-bar/assets/Playing Card_Diamond 05.png 4.26 KB 2.80 KB -34.2% View diff
examples/resource-bar/assets/Playing Card_Diamond 06.png 4.81 KB 3.23 KB -32.9% View diff
examples/resource-bar/assets/Playing Card_Diamond 07.png 4.94 KB 3.42 KB -30.8% View diff
examples/resource-bar/assets/Playing Card_Diamond 08.png 5.50 KB 3.62 KB -34.2% View diff
examples/resource-bar/assets/Playing Card_Diamond 09.png 5.69 KB 3.40 KB -40.2% View diff
examples/resource-bar/assets/Playing Card_Diamond 10.png 5.82 KB 3.41 KB -41.5% View diff
examples/resource-bar/assets/Playing Card_Diamond A.png 3.10 KB 2.33 KB -24.9% View diff
examples/resource-bar/assets/Playing Card_Diamond J.png 4.43 KB 3.03 KB -31.6% View diff
examples/resource-bar/assets/Playing Card_Diamond K.png 5.99 KB 4.16 KB -30.5% View diff
examples/resource-bar/assets/Playing Card_Diamond Q.png 4.75 KB 3.23 KB -32.1% View diff
examples/resource-bar/assets/Playing Card_Hearts 02.png 3.29 KB 2.22 KB -32.5% View diff
examples/resource-bar/assets/Playing Card_Hearts 03.png 3.90 KB 2.59 KB -33.6% View diff
examples/resource-bar/assets/Playing Card_Hearts 04.png 3.78 KB 2.59 KB -31.6% View diff
examples/resource-bar/assets/Playing Card_Hearts 05.png 4.53 KB 3.00 KB -33.9% View diff
examples/resource-bar/assets/Playing Card_Hearts 06.png 4.94 KB 3.28 KB -33.7% View diff
examples/resource-bar/assets/Playing Card_Hearts 07.png 5.14 KB 3.57 KB -30.6% View diff
examples/resource-bar/assets/Playing Card_Hearts 08.png 5.69 KB 3.75 KB -34.2% View diff
examples/resource-bar/assets/Playing Card_Hearts 09.png 5.95 KB 3.90 KB -34.5% View diff
examples/resource-bar/assets/Playing Card_Hearts 10.png 6.18 KB 4.03 KB -34.7% View diff
examples/resource-bar/assets/Playing Card_Hearts A.png 3.40 KB 2.46 KB -27.7% View diff
examples/resource-bar/assets/Playing Card_Hearts J.png 4.46 KB 3.08 KB -31.0% View diff
examples/resource-bar/assets/Playing Card_Hearts K.png 6.01 KB 4.17 KB -30.6% View diff
examples/resource-bar/assets/Playing Card_Hearts Q.png 4.79 KB 3.26 KB -32.0% View diff
examples/resource-bar/assets/Playing Card_Joker Black.png 5.49 KB 3.59 KB -34.6% View diff
examples/resource-bar/assets/Playing Card_Joker Red.png 5.49 KB 3.65 KB -33.6% View diff
examples/resource-bar/assets/Playing Card_Spades 02.png 3.39 KB 2.30 KB -32.3% View diff
examples/resource-bar/assets/Playing Card_Spades 03.png 3.96 KB 2.64 KB -33.3% View diff
examples/resource-bar/assets/Playing Card_Spades 04.png 3.70 KB 2.73 KB -26.2% View diff
examples/resource-bar/assets/Playing Card_Spades 05.png 4.59 KB 3.15 KB -31.3% View diff
examples/resource-bar/assets/Playing Card_Spades 06.png 5.10 KB 3.41 KB -33.1% View diff
examples/resource-bar/assets/Playing Card_Spades 07.png 5.30 KB 3.69 KB -30.4% View diff
examples/resource-bar/assets/Playing Card_Spades 08.png 5.77 KB 3.95 KB -31.5% View diff
examples/resource-bar/assets/Playing Card_Spades 09.png 6.09 KB 4.13 KB -32.2% View diff
examples/resource-bar/assets/Playing Card_Spades 10.png 6.46 KB 4.32 KB -33.1% View diff
examples/resource-bar/assets/Playing Card_Spades A.png 3.49 KB 2.48 KB -28.9% View diff
examples/resource-bar/assets/Playing Card_Spades J.png 4.42 KB 3.05 KB -31.0% View diff
examples/resource-bar/assets/Playing Card_Spades K.png 5.79 KB 3.95 KB -31.8% View diff
examples/resource-bar/assets/Playing Card_Spades Q.png 4.66 KB 3.23 KB -30.6% View diff
examples/resource-bar/assets/Plus Key.png 1.31 KB 943 bytes -29.5% View diff

4475 images did not require optimisation.

- TODO:  Sprite without maximum show an extra unit when removing units.
@github-actions
Copy link
Contributor

Images automagically compressed by Calibre's image-actions

Compression reduced images by 50.5%, saving 10.29 KB.

Filename Before After Improvement Visual comparison
examples/resource-bar/assets/Bar Frame_No Shadow.png 3.90 KB 3.09 KB -20.8% View diff
examples/resource-bar/assets/Bar Frame_Shadow.png 4.19 KB 3.41 KB -18.7% View diff
examples/resource-bar/assets/Blue bar.png 2.84 KB 2.45 KB -13.8% View diff
examples/resource-bar/assets/Energy Bar.png 3.01 KB 263 bytes -91.5% View diff
examples/resource-bar/assets/Health Bar Box2.png 2.91 KB 246 bytes -91.8% View diff
examples/resource-bar/assets/Health Bar2.png 2.78 KB 134 bytes -95.3% View diff
examples/resource-bar/assets/Heart-1-0.png 375 bytes 259 bytes -30.9% View diff
examples/resource-bar/assets/Heart-1-2.png 375 bytes 259 bytes -30.9% View diff

4543 images did not require optimisation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚧 Work In Progress This example is a work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant