To learn Socket.io I made a shitty Club Penguin-esque game. It's unsecured and written like a pile of shit... should be easy for a haxxor like u to break it.
It has chat, a whiteboard, a playlist system with voting and more dumb shit.
https://cunt.fatdu.de
update
>using Socket.io instead of uWebSockets
Enjoy the backbone of your game being slow as shit I guess
>>59006179
also die u cuck
bump niggers
>>59006090
bumpin
what did they mean by this?
>>59007134
3d tic-tac-toe :)
People found out how to do massive changes to the background.
I'm just waiting for some faggot to figure out how to make a javascript infinite loop run on each client.
I'd rather play this: It's pretty darn close to the original game, unlike your shitty CP clone
RIP sweet prince
lmao
I'm making an IP ban function. Y'all will regret this
>>59008667
nice
>>59008667
fag
that music playlist is great lol
Douglas
Can't draw on mobile bro
>>59006090
honestly interested in the source code for this, I'd like to start socket.io
It's dead
rip
fuck I tried to draw Mr. Dink again
It's back up (not for long xd)
EVERYONE GET ON ITS BACK
bumpity
I think I did a good job, come bottom left :)
>>59009742
I would but we're telling stories on the top left
>>59009858
nah mate we're making shitting males cumming on apple consumers faces
>get the fuck over here
Whoever is DDOSing it has autism.
>should be easy for a haxxor like u to break it.
Indeed, you should put your shit in closures.
this shit got me in a drawing mood and I ended up cleaning up the Mr Dink drawing that got wiped twice
come back
you faggots killed it again
it's back up
Okay admin, socket.emit(1) crashes your shit because your backend is retarded. Don't do type conversions on the client side.
t. FizzBuzz
I fixed one of the exploits. While I'm not asking you to try more, I think the main one should be fixed.
the art is amazing
the jew is surrounded
>>59010725
good work anon
>>59010736
Here's the code for it for anyone who wants to see how to draw programatically: http://pastebin.com/GMnLnyxu
I did want to try writing a bitmap painter but sadly I'm not autistic enough, this will have to do
very nice. the drawing code is really inefficient server-side, so it has to store everything until you clear it. you caused quite a bit of ram to be filled up bro :)
>>59010829
>>59010806
meant to reply to that
>>59010994
>>59006090
Anyone have any tuts/resources for this?
>>59011268
tuts/resources? for what?
>>59011345
for making io games with uwebsockets/socketio
>>59011359
it's not really that hard bro, just look at the client code for my game
is it rip?
~anon who was drawing shit at the end.
>>59011427
still up
>>59011437
clubcunt is down for me, just getting a blank frame when I open it.
>>59011458
You were IP banned with me, probably.
>>59011458
>>59011458
When there's a lot of art in the world it takes fucking ages to load. Pardon the Heroku hosting, but just be a bit patient.
>>59011472
>>59011475
oh yeah, that too. slow fizzbuzz is ok, fast fizzbuzz is not.
>>59011490
aight well im out
heres a better qual pic of >>59011437
It fucking freezes on my phone (M8).
Is JS worth learning?
Gallery implemented niggers. Also, everyone who was IP banned has now been unbanned. Just don't be fucking annoying.
>>59011558
it's the only good programming langiuage
>>59011832
fuck off
Thousands of hours on paint.io
pretty good anon i found it funny and entertaining
>>59011974
Will be added to gallery.
Goodnight everyone, it's been fun!
any wacom tablet fags?
YOU HAVE TEN SECOND TO PUT THIS IN GALLERY OR THIS KNIFED BIRD WILL KILL YOU
>>59012251
yeah me look at my art
>>59012255
>>59012263
Nice
well this was a nice distraction
hacked your shit bruh
xDDDD i make creeperface
OP make more colors
>>59013209
ask somenoe about the inspect element trick
used here >>59012746
add to gallery plox
>>59013264
>https://cunt.fatdu.de
what the fuck, why is my "apple cumming on customers" not added to the gallery?
Come and hang out in your designated color area."
no yellows allowed.
Awake now, will update gallery soon
>>59013408
& I didn't manage to get a screenshot of it
>>59007174
You need 3 people for that or player 1 always wins.
>>59009251
Here is the Mr Dink
More fun than Club Penguin
fucked the update, restarting again
Here's some FOSS
>>59018166
New user handles
You can now change names with
!changename:The Name You Want
This is pretty entertaining. thanks for filling my evening with retarded shit.
>>59018731
no u
Filled with bots now. Kinda boring.
I love you admin, thanks for the $lamz
>>59019435
Is OP a faggot?
romantic dinner with thinkpads
>>59006090(function () {
function line(sx, sy, tx, ty, color) {
lastDrawingPoint.x = sx,
lastDrawingPoint.y = sy,
drawingMouseDown = !0;
selectedColour = color;
selectedSize = "medium";
var b = 0;
"small" == selectedSize ? b = 5 : "medium" == selectedSize ? b = 10 : "large" == selectedSize && (b = 20), players[localId].drawing.graphics.ss(b, "round").s(selectedColour), players[localId].drawing.graphics.mt(lastDrawingPoint.x, lastDrawingPoint.y);
var c = { x: tx, y: ty };
players[localId].drawing.graphics.lt(c.x, c.y);
var d = new EncodePath;
d.moveTo(lastDrawingPoint.x, lastDrawingPoint.y).lineTo(c.x, c.y), encodedPathBuffer.push(d.code), lastDrawingPoint.x = c.x, lastDrawingPoint.y = c.y;
var e = "#fff" == selectedColour;
players[localId].drawingContainer.updateCache(e ? "destination-out" : "source-over"), players[localId].drawing.graphics.clear()
emitDrawing(!0);
}
function componentToHex(c) {
var hex = c.toString(16);
return hex.length == 1 ? "0" + hex : hex;
}
function rgbToHex(r, g, b) {
return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b);
}
var img = $('<img id="picture" style="display: none" src="{{INSERT BASE64image here}}">')[0];
var canvas = $('<canvas />')[0];
canvas.width = img.width;
canvas.height = img.height;
canvas.getContext('2d').drawImage(img, 0, 0, img.width, img.height);
var pixelData = canvas.getContext('2d').getImageData(0, 0, img.width, img.height).data;
var offset_x = 0, offset_y = 800;
var x = 0, y = 0;
var step = 8;
for(x = 0; x < img.width; x += step) {
for(y = 0; y < img.height; y += step) {
line(x + offset_x, y + offset_y, x + offset_x, y + offset_y, rgbToHex(pixelData[(x + y*img.width)*4], pixelData[(x + y*img.width)*4 + 1], pixelData[(x + y*img.width)*4+2]));
}
}
return pixelData;
})()
Use http://dataurl.net/#dataurlmaker to generate the images. Sometimes you get disconnected with large images. I have no idea why.
>>59020249
Change selectedSize = "medium"; to "small", "medium" or "large" to set the brush size.
Change step = 8 means render every 8th pixel. step = 1 means render every pixel.
>>59020249
pretty fucking cool
Dude, I just owned your server. It got owned.
>>59020518
You didn't lol, I'm breaking it myself
>>59008278
Please no
I don't want any more of you fags fucking up the 4chan steam group
Mass drawing scriptfag problem fixed
>>59020900
I can't even draw a line without getting disconnected.
>>59020953
Nah that's fixed
>>59020967
uh
guess it is
op, the game runs like shit here. the console can be dealt with (console.log = function() {}), but that websocket goes through polling, which nukes performance and puts ton of load on node.js.
you can either
1) pay shekels to CF kikes, so they stop shutting it down
2) connect ws directly, inb4 DDoS
3) use my autismal WS library which bypasses CF faggotry
https://github.com/katlogic/tws
you still need to POST xhr for each client->server message, but server->client will stream through CF
general protip for browser side, avoid socket.io, just use ws api directly. much easier to troubleshoot performance bugs. That polling POST fallback is something you don't generally want for games its for more app-apper stuff.
Other than that, excellent job.
>>59021086
Wasn't aware there was a better way. I'll look into it. Meanwhile, antispam has been implemented.
>>59021349
I'm kind memeing, the demo is self-contained proof of concept to test it, but not terribly useful as a module.
Coffeeshit aside, the problem is it does not dispatch the 'request' upwards if the request is not a ws one, but instead fires its own event which is incompatible with express/whatever you're using. This can be fixed by instead of firing custom event, looking up the next event chain (bleh), the way socket.io does it.
Basically replace https://github.com/katlogic/tws/blob/master/tws.coffee#L131
with code from
https://github.com/socketio/socket.io/blob/master/lib/index.js#L292
With that, whatever else is waiting for 'request' event in line (all these html app frameworks) will work.
>>59021477
For now there hasn't really been that need since the server hasn't been raided yet. As soon as it gets raided by /b/ and i have over 100 users, I'll see if I can implement some changes. Thanks for the advice anon.
>>59021832
>thanks for advice
na, just autism.
>planning to stage samefagged /b/ raid
Didn't actually mean that, but server latency as it is now.
I'm not sure the lack of websocket is the only cause of the jerky movement. The interactive event round-trip now for me is like 200ms (slavlands). Other ws games (agario) were generally far more fluid than that.
>>59022024
Server is hosted somewhere in Europe. Heroku won't tell you where. Transitioning to WebSockets would be slightly too much effort for something developed almost entirely ironically, but I'll see what I can do.
>>59022024
read, faggot:
>Here are some things which should make the server's CPU sweat (this is hosted on a shitty Heroku "Dyno"):
It will be hitting herokus 50 pending req/route limits long before it even touches cpu.
tried to draw pepe
>>59022306
>>59022286
Oh, didn't know he's on heroku.
>>59022286
Why not just disable cloudflare (simply direct the ws endpoint url directly at heroku?) The CF benefit is dubious here.
>>59020249
what does this do? i tried to run in console but it gave me error
'getImageData' on 'CanvasRenderingContext2D': The source width is 0
>>59006090
CYA NOOB
RIP
a bunch of circles joined and it crashed
>>59006090
RIP cunt.fatde.de
>>59022559
>>59022565
Did not crash, just lagged lmao
this shit is lagging my pc
Killing duplicate IPs
>>59006090
How is this even remotely like Club Penguin?
>>59022704
Click to move, snowballs coming in a future update
>>59022707
Still nothing like Club Penguin.
>:]
Same IP connections now disabled.
Chat sound can now be disabled.
Secret feature for hackers added.
>>59011601
If you're interested in the web, yes.
Just for fun? Fuck no.
>>59023031
What's there to hack? I see nothing that would be worth hacking.
>>59023149
The feature got discovered pretty quick. Also ur gay
>>59006090
>>59020711
join chat faget
>>59023447
beautiful
144Hz now supported faggots!
>>59024476
Will defo be added to gallery
>>59006090
Why do you do this shit to me, RNG?
>>59024681
The name generation never lies, faggot.
admin is a fag
>>59024681
>>59024728
He's right you know?
Why is a fucking indian man talking out of my fucking speakers??
>>59025605
:^)
>>59025619
Seriously, any video on the internet and you pick that shit?
>>59025629
It was voted on.
>>59025632
Again, why
>>59025637
Democracy
>>59025637
Do you know what site you're on?
>>59025899
Saved
Nobody online?
>>59026803
It's sleepy time, anon. Don't you want to go to bed?
>>59026829
Not in murica
Morning, fags
noice
>>59028812
Thanks
Not bad
>>59022490var img = $('<img id="picture" style="display: none" src="{{INSERT BASE64image here}}">')[0]
You have to insert a image converted to base64 and you may have to reload the page if you want to run the script again.
By the way the OP implemented rate limiting because some nigger covered the entire canvas with randomly colored lines. You will get kicked if you use the script.
>>59022490
Here is an example.
http://pastebin.com/raw/PMDkFSPW
>>59030990
That's v nice
Bump for more banter
holy fuck is this bad
you bloated this shit so fucking much, holy fuck my browser nearly crashed.
sage
>>59031483
Ur pc bad bro, I'm playing on a shitty chromebook fine
Bompf
>>59030990
works like a charm
Playing racist tunes
I tried to make a lovely house for me and my buddies but the tax man took it all
>>59030990
>AutisticSlutSJW123
>HomoCuckHater
This is just great
>>59032287
The name generation is the best feature
120 hours hand drawing
Saving this thread
>>59031749
wo how you do that
unban pls
>>59035038
I can't without rebooting. Shouldn't have spammed :)
This is good stuff OP
A simple time killer to dick around with
You should be proud
>>59035183
Thank :DDD
feels bad when one guy has to downvote every song, but that's where he gets his satisfaction from
>>59035574
That's democracy for ya
nice songs
>>59035574
Kill yourself, you dumb fucking shit stain.
>>>/reddit/
>obesepussylover
>>59035810
hey pal
no mom its just a popup
>>59036367
High quality shitpost bro
>>59032403
completely agree
>>59006090
Isn't Club Penguin more like MS Paint Chat or a graphical 2D MUD client?
This seems more like a canvas.
>>59037038
the penguin sprites are in the works senpai
hold ur horses
Comfy campfire :) It's 2005 again
You heard it here first /g/, there will be a /ccg/ (ClubCuntGeneral) soon. See you there.
!speak: to do tts
!colossal: to do bigtext
!tiny: to do tinytext
This website is unsafe for those easily spooked, be warned. Infested with specters and NodeJS fags.