not nom
Well-Known Member
not even a week ago I thought javascript was a necessary nuisance... then I spent like 8 hours in a row listening to crockford and realized I just don't have the faintest clue about the language(not just not the faintest clue about the DOM). now everything seems like child's play, compared to what I dicked around with a while ago (C + SDL + OpenGL, which was super fun, but also harsh to learn by doing haha, and so much work for rather little results)... it's just beautiful! I <3 javascript now. suddenly, even node.js doesn't seem like a stupid idea, suddenly I want to code everything in javascript that's after not even a week of me being introduced to the basic concepts (i.e. I still am a clueless noob, but now I'm a noob having fun fun fun).
screw performance... I'd rather have 30% the performance of C, while also only having 1% of the headaches of C, and by the time this produces any meaningful results, computers will be a million times faster anyway. so everything is now an object containing a functions that create objects which have functions which create objects, and I actually love it, while OOP (well, C++) used to seem more pain- than useful. yay!! I just now realized that to make any somewhat decent particle system I *have* to go WebGL, to draw images with custom alpha and colors (not to mention all the insane shader stuff I never dared to dabble with, but which no doubt will turn out to be awesome):
hey, it's javascript, that just means having more interesting stuff to pack into functions and prototypes, and to make add awesome, automagical functionality to the rawness that are openGL and shaders it also means so much faster drawing that I can kinda afford the overhead of wrapping everything into everything, especially since I'm just derping around anyway. I cannot ******* wait.
tl;dr: this (past week) marks the time when I can hope to write maintainable code that does interesting things, and to actually have a hope to write networking stuff without going utterly insane, and all of that in any decent browser, as if the above wasn't awesome by itself. yay standards, yay for not ever bothering with flash or other proprietary BS. I knew this day would come, I just didn't think it would be so sweet.. javascript is like a weird looking fruit with a complicated (seeming) shell, but the inside, ohhhh, the inside.
^ not WebGL, but check this out, kinda the definition of what you see there:
that would make pros cringe I'm sure, but compared to the facepalms I created in C, that's a huge improvement. I still have that stuff around... the particle definitions were not pretty, believe me, and more importantly limited to a fixed number of stops... and now doing this in javascript literally has me giggling with joy at about every turn. as I said, I'm only just discovering all of this, but I lurv it muchly so far. check out javascript! learn it, love it, wear it like a funny hat
screw performance... I'd rather have 30% the performance of C, while also only having 1% of the headaches of C, and by the time this produces any meaningful results, computers will be a million times faster anyway. so everything is now an object containing a functions that create objects which have functions which create objects, and I actually love it, while OOP (well, C++) used to seem more pain- than useful. yay!! I just now realized that to make any somewhat decent particle system I *have* to go WebGL, to draw images with custom alpha and colors (not to mention all the insane shader stuff I never dared to dabble with, but which no doubt will turn out to be awesome):
hey, it's javascript, that just means having more interesting stuff to pack into functions and prototypes, and to make add awesome, automagical functionality to the rawness that are openGL and shaders it also means so much faster drawing that I can kinda afford the overhead of wrapping everything into everything, especially since I'm just derping around anyway. I cannot ******* wait.
tl;dr: this (past week) marks the time when I can hope to write maintainable code that does interesting things, and to actually have a hope to write networking stuff without going utterly insane, and all of that in any decent browser, as if the above wasn't awesome by itself. yay standards, yay for not ever bothering with flash or other proprietary BS. I knew this day would come, I just didn't think it would be so sweet.. javascript is like a weird looking fruit with a complicated (seeming) shell, but the inside, ohhhh, the inside.
^ not WebGL, but check this out, kinda the definition of what you see there:
Code:
c: MultiStopsRGBA(
{
0 : new ColorRGBA(255,255,255,1),
0.282 : new ColorRGBA(255,255,0,0.25),
0.582 : new ColorRGBA(255,0,0,0.25),
0.785 : new ColorRGBA(255,0,255,0.25),
'1.0' : new ColorRGBA(0,0,255,0.0),
}),
size: MultiStops(
{
0 : 10,
0.182 : 20,
0.382 : 5,
0.585 : 20,
'1.0' : 0,
}),
that would make pros cringe I'm sure, but compared to the facepalms I created in C, that's a huge improvement. I still have that stuff around... the particle definitions were not pretty, believe me, and more importantly limited to a fixed number of stops... and now doing this in javascript literally has me giggling with joy at about every turn. as I said, I'm only just discovering all of this, but I lurv it muchly so far. check out javascript! learn it, love it, wear it like a funny hat