![]() |
Shield Math Question
Would anyone happen to know a formula for working which part of a shield image would go where on the character?
I am asking because I am going to make a shield viewer just for fun but I am not sure on how to determine which parts are what? |
iirc it went by a ratio D:
edit- found this: http://forums.graalonline.com/forums...1&postcount=15 Quote:
|
Thanks!
Just in case it helps anyone here is some data I have acquired. Overall Dimensions: 38x20 Up: 6x20 Up: 15.789473684210526 % Left: 8x20 Left: 21.052631578947366 % Down: 17x20 Down: 44.73684210526316 % Right 8x20 Right: 21.052631578947366 % Now I just need to work out a formula to figure out how many pixels any given shield part would be xD I am not good at mathematics but I shall give it a crack ;) Well I failed miserably.. Hers was my attempt. PHP Code:
|
Quote:
|
I know how it works but I am trying to figure out a formula.
|
All you do is maintain the same pixel ratio.
Ratio: 1 Width: 38 * ratio Height: 20 * ratio Up: 6 * ratio Left: 8 * ratio Down: 17 * ratio Right: 8 * ratio Heights for each shield: 20 * ratio There's no complicated formula, for simplicity sake avoid ratios that result in decimal points. For an in-game shield viewer you can simply use a gani. |
This is regarding an external viewer in VB.
I'm making it so iClassic players can see their shields on a character before uploading them. Thanks for that though, I guess i'm half asleep lol |
Ok, now say that is for a 38x20px shield.
Say the user selects a 147x40px shield. How would it work? would the ratio be like pixelwidth/38? |
Quote:
Also yes, the ratio would be given from pixelwidth/38. |
All times are GMT +2. The time now is 04:43 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.