« first day (1487 days earlier)      last day (3444 days later) » 
00:00 - 20:0020:00 - 23:00

8:07 PM
@towc what kind of question is this :S
 
@BartekBanachewicz for a tiny minigame which only had you click on rect-like stuff
 
@towc uh still. Implementation detail that should be abstracted
I'd think you'd have your own library for that by now
 
dom is ugly, but easy to use. Canvas is cool and managed to make it quite readable, but could be too much for the little think I'm doing
@BartekBanachewicz haven't perfectioned my ways yet, prefer to still do it manually to practice
 
> dom
> easy to use
> pick one
@towc well then write that as a library and improve it gradually :F
 
could do that
 
@BartekBanachewicz isn't that just a drawing library?
 
@towc well what else do you need?
 
effectively if I'd use canvas I'd just use rectangles, and ideally I'd only have a function call once the fillRect, and call that function for every 'cell', so a drawing library wouldn't make any difference I think
 
@towc uh, so the function you want is "drawRectangle"
that's a drawing library.
 
@BartekBanachewicz this is 2d js canvas brah :P
ctx.fillRect
only 4 arguments and you're done with your rect
ctx.fillRect(posX, posY, width, height)
much much easier than webgl or whatever you had there
 
8:24 PM
@towc well then
I don't see what's the problem
also canvas is stateful abomination so you can encapsulate setFillStyle and fillRect in one function vOv
 
@BartekBanachewicz because I only need to set the fillStyle (btw, it's ctx.fillStyle = 'colorHere') before drawing any rectangle, not at every call, meaning that it would actually be slower to re-set the fillStyle at every fillRect, since my color is always the same in this case
 
@towc how much slower would it be?
 
@BartekBanachewicz not much, but still completely unneded
 
@towc how much is not much
and more importantly, why do you care.
 
@BartekBanachewicz less than 1ms every 100 calls probably
 
8:27 PM
then why are you even talking about performance
 
@BartekBanachewicz why would I have the program do something that it doesn't need and just makes the code look worse?
 
@towc no, it doesn't make the code look worse
 
here's what we do with canvas:
 
stateful APIs are what makes the code look worse
 
//set colorstyle
for... //iterating over cells
    //drawing rectangles for each cell
 
8:29 PM
@towc also lol, "have the program do something that it doesn't need" and talking about javascript is hell of a joke
 
here's what you would have wanted me to do, if I understood correctly
 
cells.forEach(draw);
 
for... //iterating over cells
      rect(x, y) // call a function to do stuff

function rect(x, y){
   //set colorstyle
   //draw the cell
}
@BartekBanachewicz it's not really important the way you do it
 
yes. That's cells.forEach(drawCell);
@towc it kinda is.
what's not important is whether resetting fillStyle has performance penalty
Stateful API is why OpenGL is as bad as it is.
And despite DSA has been there forever, they've decided to make Canvas API retarded
actually I think webGL is a bit saner in that regard
 
@BartekBanachewicz that would be good in some cases, in others, like most of mine, a for is usually much more useful and easier
 
8:32 PM
@towc no, it's not.
it's what you think, but it's not.
your approach is mostly contributing to tightly coupling logic with drawing at the very least
Basically avoid for loops whenever you can.
also avoid doing stuff because you think it might be more performant
 
@BartekBanachewicz again: performance really is not my problem, it's just that thanks to the way canvas was built there's no use in re-specifying the color style for every drawing
 
@towc my point is exactly that specifying this every time is how it should ultimately be done, at least conceptually, in such a simple example.
if you don't have to worry about perfomance, you can structure the code in a much cleaner way
avoid variables, avoid mutable state.
make each draw take an immutable game state, and draw it using subcomponent draw commands
 
@BartekBanachewicz I've done what I saw other good people (also from this room, who are quite experienced with canvas) do, so I guess that's there's just a structural difference for who programs in webGL and canvas, just 2 different ways of doing things
this is going nowhere
 
@towc no, it's not about that
@towc well if you intend on continuing to not listen to what I'm trying to tell you, sure.
After all, I'm just a professional game programmer, and you're a JS newbie; I can't see how I could potentially know all that.
nevermind, sorry I interrupted you.
 
@BartekBanachewicz Wow; that's a really assholish way to make a point.
 
8:41 PM
@Retsam I'm not making a point; I'm backing from this discussion.
lol
who the fuck flagged that
please don't abuse flags TIA
 
not me
 
if (typeof flag == 'butthurt'){ ignoreUserCount++; return true; }
 
@BartekBanachewicz I'm just saying, if you want to convince someone don't pull out the "I'm an expert, and you're not" card
 
@Retsam yes, that implies I wanted to convince someone, while I didn't.
 
@Retsam you're not from around these parts are you?
 
8:44 PM
I think he's one of the "bartek-is-so-terrible-and-assholish" folks
IIRC.
 
Okay, let me amend: 'if you want to behave like not an asshole, don't pull out the "I'm an expert and you're not" card.'
 
I would never show my mother these rooms with the shit said in them.
 
I don't like the tone of your text, Bartek.
 
@ChrisBaker of which one.
what the hell is going on here today
 
All of them. Your tone, it's all wrong.
 
8:45 PM
@ChrisBaker well I suppose you're entitled to not liking it.
 
@BartekBanachewicz You're entitled to not get Christopher Walken references.
 
I suspect I can't befriend the whole planet.
 
guys, bartek used to be a regular here and he do is quite an expert and surely he has much more programming experience than me and probably all 3 of you. I wasn't offended by that at all
 
Also.. how does text have a "tone"?
I could be using sarcasm.
 
@towc FTR that was a shitty thing to say (what I said)
 
8:46 PM
shitty but correct
 
Your tone is all wrong: youtube.com/watch?v=jWsFbybkgHM
 
Ask that thing on gamedev.se and send me a link someday, and I might take my time and outline my reasoning properly.
 
@crypticツ Yes, I'm aware of how the internet works, people are assholes more often than not; doesn't mean I can't point it out when I see it.
 
It must feel good, eh?
Pointing out weaknesses of others.
(that was a Clerks reference)
@ChrisBaker "obscure quotes"
 
That's a top-5 Christopher Walken quote, a meme even.
Anyway... go on wit'chyer flags, I'm going back to talking crap about Code Ignighter.
 
8:56 PM
I'll go back to writing my compiler :S
 
9:14 PM
@BartekBanachewicz I don't like your ruse
 
user1804599
Bartek stop trolling rooms pl0x.
 
user1804599
I told you before in the C room.
 
9:50 PM
eats some popcorn reading through chat logs
 
@taco - some juicy morsels recently
 
lol, you ain't kidding
Bartek has to be a troll
 
Anyone here know kineticJs?
 
sorry not it
Bartek looks like the matrix nerd in the movie, "Grandma's Boy".
who coincidentally was a video game programmer
uptime
16:56:42 up 1805 days, 19:42, 1 user, load average: 0.00, 0.03, 0.10
geez, that's almost five years for this box
I guess I missed all of the fun? Later @TravisJ
 
o/
 
10:18 PM
@taco Omg
 
00:00 - 20:0020:00 - 23:00

« first day (1487 days earlier)      last day (3444 days later) »