It is currently Sun Dec 08, 2019 12:57 am

All times are UTC




Post new topic Reply to topic  [ 100 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
PostPosted: Fri Aug 29, 2014 2:54 pm 
Offline

Joined: Tue Jan 11, 2011 9:26 pm
Posts: 2484
Location: Ontario, Canada
WOW criptic message, you might as well said 'there will be delays'. Well keep at it, your work is allways alsome!

_________________
-------------------
-Jamie Marchant
If I don't respond it's because email notification is down again and
I forgot to return to the thread.


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 29, 2014 4:32 pm 
Offline
Obduction Backer

Joined: Thu Mar 15, 2007 6:14 pm
Posts: 4250
Location: Digging around in the dusty archives, uncovering Uru history.
OHB is like a fun relative that we don't see very often (presumably, he's traveling the world; possibly hitching rides on freight trains), but when he comes for a visit, he's almost always bearing gifts. :)

_________________
Explorers Memorial * In Memoriam


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 29, 2014 5:14 pm 
Offline

Joined: Tue Jan 11, 2011 9:26 pm
Posts: 2484
Location: Ontario, Canada
Nicely said :D

_________________
-------------------
-Jamie Marchant
If I don't respond it's because email notification is down again and
I forgot to return to the thread.


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 29, 2014 5:44 pm 
Offline

Joined: Sun Apr 24, 2011 12:36 am
Posts: 318
Location: Outer Space
Tai'lahr wrote:
(presumably, he's traveling the world; possibly hitching rides on freight trains)

You mean like a hOHBo?

_________________
Equal amongst others in the Guild of Sleepers


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 31, 2014 1:04 am 
Offline

Joined: Fri Nov 10, 2006 5:30 pm
Posts: 83
Location: ||CityofNO
OHB,

Sent Applications to you in Forum PM

Thanks,
Goren

_________________
Image


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 31, 2014 4:52 am 
Offline
Obduction Backer

Joined: Wed Feb 10, 2010 12:28 am
Posts: 1247
Thanks, Goren!

So...about that major roadblock I discovered the other day...

I think I have it as under control as is possible. I feel like I want to explain the issue entirely but at the same time I don't want to spoil the surprise! So, I will just say that everyone will fall into a different category. If you're in category C, you'll be fine. If you're in category F, you'll be mostly fine. And those of you in category S or E will be out of luck.

That being said, not only will it be possible to support other categories in time, it will be possible to change your category...it just requires a little bit of effort :)

The reasons for all of this will be spelled out clearly when this thing goes live and it will all make sense too :)

_________________
Image
Click here to change my signature!


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 31, 2014 11:51 am 
Offline
Obduction Backer

Joined: Thu Mar 15, 2007 6:14 pm
Posts: 4250
Location: Digging around in the dusty archives, uncovering Uru history.
I think it's pretty obvious what C, F, S, & E stand for.

_________________
Explorers Memorial * In Memoriam


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 31, 2014 12:52 pm 
Offline

Joined: Mon Mar 15, 2010 2:36 am
Posts: 1303
Location: Back to the surface!
yeah like Tai'lahr said :lol:

I should be mostly fine... :wink:

_________________
Annabelle 47907 - New avatar


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 01, 2014 6:03 am 
Offline
Obduction Backer

Joined: Wed Feb 10, 2010 12:28 am
Posts: 1247
Today I got to experience once of the joys of programming!

So, I needed to overlay a bunch of transparent layers. Each layer was white but the opacity would be variable. As the layers stacked they became progressively smaller such that the was an gradient of opacity surrounding the final layer in the middle.

Originally I had created an image. As a PNG, it was 17K. But, I figured there must be a way to do it better. So, I wrote some markup to create the image which could be rendered by the client. The biggest challenge was figuring out what the opacity for each layer should be such that the gradient was linear. I toyed with the math and Googled for the answer but I wasn't entirely sure how to describe what I was doing and I couldn't find anything. So, layer by layer, I manually picked opacities until I had the desired result.
[Reveal] Spoiler: If you're curious about the alpha levels I came up with
Code:
[
    0,      0.0175, 0.02,   0.0225, 0.025,  0.02,   0.02,   0.025,  0.02,   0.02,   0.0275,
    0.025,  0.025,  0.0275, 0.025,  0.025,  0.0275, 0.025,  0.025,  0.0325, 0.03,   0.03,
    0.0375, 0.03,   0.035,  0.04,   0.035,  0.035,  0.04,   0.04,   0.04,   0.045,  0.0475,
    0.045,  0.045,  0.055,  0.05,   0.05,   0.06,   0.06,   0.06,   0.08,   0.07,   0.07,
    0.085,  0.08,   0.08,   0.11,   0.1,    0.12,   0.14,   0.14,   0.15,   0.19,   0.21,
    0.24,   0.35,   0.42,   0.5, 1
]

This was great, and instead of a 17K image I had 8K of markup. Looking at the opacities I could tell there was a pattern but I I wasn't entirely sure. Starts tiny, ends big. But it's not just divide by 2 from the end otherwise that 0.42 would be 0.25 and that can't be right, can it?

So, I fired up my ever-trusty Excel and plugged in the numbers to get a graph.

Image

YES...I was on to something! That totally looks like something. But what? Perhaps I was right about the divide by two thing?

Image

No...that's not it. What if we do 1 / (<total> - <current>)?

Image

TRIUMPH!!! I plugged in the resulting numbers just to check the end result and it looked fantastic! And with that, I was able to write some code that would generate the markup using that math formula. The end result: 450 bytes. From beginning to end, a savings of like 4000%.

I realize many of you won't really understand why this is cool. And, that's a shame because for me it's an I AM PROGRAMMER HEAR ME ROAR kind of moment. And it's these rare moments that keep me going :)

tl;dr for a programmer it feels amazing when you realize your mess of code can be rewritten into a tiny algorithm.

[Reveal] Spoiler: Also...
...I feel like I may have started using this thread as a blog.
[Reveal] Spoiler: Also...
I'm fine with that. :)

_________________
Image
Click here to change my signature!


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 01, 2014 8:40 am 
Offline
Obduction Backer

Joined: Mon Oct 22, 2012 6:07 pm
Posts: 1281
Location: Central Europe
Great :D

_________________
KI #46116. Donate to help the Cavern stay open!
Want to know what’s going on in the Cavern? Visit the GoMe site.

MacOS wrappers, D’ni Lessons, DniTools, goodies.


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 01, 2014 2:57 pm 
Offline

Joined: Tue Jan 11, 2011 9:26 pm
Posts: 2484
Location: Ontario, Canada
I hope I have the correct requirements to join your thing. I suppose I can get an avaitar to the correct state with the internal client if needed.

_________________
-------------------
-Jamie Marchant
If I don't respond it's because email notification is down again and
I forgot to return to the thread.


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 01, 2014 6:24 pm 
Offline

Joined: Wed Dec 18, 2013 2:56 am
Posts: 10
OHB wrote:
I AM PROGRAMMER HEAR ME ROAR
As a fellow programmer, I hearby steal this as my new sig :) (With OHB's permission, of course...but then I guess it's not stealing if I have permission...)

_________________
dybs KI#: 362988


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 01, 2014 6:48 pm 
Offline

Joined: Tue Jan 11, 2011 9:26 pm
Posts: 2484
Location: Ontario, Canada
Since I was thinking about OHBs 'C, F, S, & E' thing and responding to that I didn't pay that much attention to what OHB had done with PNGs. Great job! But why not just use Scalable Vector Graphics?

_________________
-------------------
-Jamie Marchant
If I don't respond it's because email notification is down again and
I forgot to return to the thread.


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 01, 2014 10:37 pm 
Offline
Obduction Backer

Joined: Wed Feb 10, 2010 12:28 am
Posts: 1247
dybs wrote:
OHB wrote:
I AM PROGRAMMER HEAR ME ROAR
As a fellow programmer, I hearby steal this as my new sig :) (With OHB's permission, of course...but then I guess it's not stealing if I have permission...)

Knock yourself out :)

Jamie Marchant wrote:
Since I was thinking about OHBs 'C, F, S, & E' thing and responding to that I didn't pay that much attention to what OHB had done with PNGs. Great job! But why not just use Scalable Vector Graphics?

[Reveal] Spoiler: I did :)
Code:
i="<svg>";for(e=59;e>=0;e-=1)t=59-e,n=724-2*t,o=766-2*t,i+='<path fill="rgba(255,255,255,'+1/(60-t)+')" stroke="0" d="M'+(159+t)+" "+(7+t)+"l"+n+" 0c200 0 200 "+o+" 0 "+o+"l-"+n+" 0c-200 0 -200 -"+o+" 0 -"+o+'z"></path>';i+="</svg>";

_________________
Image
Click here to change my signature!


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 03, 2014 6:15 pm 
Offline

Joined: Tue Jan 11, 2011 9:26 pm
Posts: 2484
Location: Ontario, Canada
WOW Pngs and SVGS coo :).

_________________
-------------------
-Jamie Marchant
If I don't respond it's because email notification is down again and
I forgot to return to the thread.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 100 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to: