Share your repls and programming experiences

← Back to all posts
Online chess game - better than chess.com ;)
h
rafrafraf

take a look!

features:

  • mobile support
  • real time moves
  • drag or click to move
  • all available moves shown
  • simple emote/phrases communication
  • stores and displays move notation
  • en-passant, castles and promotions ofc

How to use it:

click the copy to clipboard button and send the url to whoever you want to play with and wait until they open it. the game will automatically start.

if you have noone to play with, just open two tabs and create game in one of them and paste the url in the second ;)


note

chess.com may have slightly inspired me lol

hope u guys like it, took me a lil bit to code it ahaha

in total its like 1100 lines of py, 900 js and 600 css lmao

Voters
YilingSun
Nathanielx3rd
crislab22
LukeShomper
Leithe
DragonKing11
AIDENBROWN8
stevenbikerider
DanielYang30
TravisRaney1
Comments
hotnewtop
QuickV

This is finally on trending!

It DESERVES to be on trending :)

EDIT: Wow so many updoots ;-;

EDIT 2: Come on guys let's try to hit 50 updoots!

ruiwenge2
ruiwenge2

@QuickV usually when a post gets to 20 upvotes within 2 days it gets on trending

QuickV

lol k :)... Sorry for the late reply, repl.it was broken yesterday... @ruiwenge2

ruiwenge2

@QuickV really?

QuickV

Well not broken, but whenever I tried to reply to a comment it would just say "Log in to comment", even though I was logged in (I checked in a new tab) @ruiwenge2

RahulChoubey1

@QuickV it does that sometimes

QuickV

lol, did that as I tried replying to this. @RahulChoubey1

QuickV

@QuickV usually when a post gets to 20 upvotes within 2 days it gets on trending.

Pretty sure that works for comments too, because mine is now stuck at the top ;-;

@ruiwenge2

plscodeinjava

butttttttttttt not better than lichess ;)

rafrafraf

@plscodeinjava ahahahha

chen2508

Definitely
@plscodeinjava

QuickV

lol as of this moment you have 404 cycles .-.

@plscodeinjava

daCynicalbOi

YOU USED THE CLASH ROYALE EMOTES AND MESSAGES

coughdrop1

@daCynicalbOi yeah lol

Bookie0

Also, for some reason I can't move anything here. I just made a game, copied and shared the link, and the game started, but I can't drag any pieces, dont' see the emotes or the notation, and can't scroll down. (I'm on FireFox, and it worked well on Edge)

rafrafraf

@Bookie0 oh damn that sucks, i dont have firefox so ive only tested with chrome:/ it could be the sound effects maybe that are making it not work in firefox as the console error could stop code from running after it in firefox maybe? Im quite busy now but ill try look into it sometime. Thanks!

Bookie0

@rafrafraf Yeah :(

No problem though, thx and gl! :)

mollthecoder

@rafrafraf I know why it happened on firefox. By default, firefox runs everything in strict mode so the way to fix the site is to put "use strict"; at the top of your javascript file (or many javascript files, seeing your javascript is modular) to simulate firefox's default state and then debug the error from there.

Whippingdot

Updoot just because you tailored the game to my needs ;)

Whippingdot

it just says waiting...waiting...waiting...waiting... :( @Whippingdot

MarcusWeinberger

Maybe a matchmaking system, or even a list of waiting games would be good. This is absolutely brazy though

sojs

ya.. maybe an option to list your game as public and have it appear in ia list on the homepage. @MarcusWeinberger

DChiltonJr

This is insane, however long it took you to do this, great work!!

QuickV

Fill the homepage with...

e

PixiGem

No it is not! The title is just a JOKE. Chess.com is way better. you can make friends, it has rating, tutorials and DUCKING more STUFF! BTW nice job, I never thought we can make a miracle using flask.

rafrafraf

@PixiGem ahahaha thanks ?

JULIODIAZ1

@PixiGem I am unable to use chess.com as i have a school chromebook so rafrafraf is my only option :D

isum1

@JULIODIAZ1 my school banned lichess but not chess.com for some reason

pzrepl

OMGGGGG pog

TheBuffzie

Amazing work, @rafrafraf 👏
But you have to fix that Firefox issue, as I tried in Firefox it DIDNT WORK! failed to work, whilst it worked well in Chrome.


LinuxBytes

@TheBuffzie therefore switch to chrome XD

TheWaterCapital

It also seems to work in MS Edge(yes i use edge)@TheBuffzie

natethemaker

@alemacoc use i explorer inter explorer gang on top

TheBuffzie

@alemacoc haha, yeah, better switch to chrome!

TheBuffzie

@LinuxBytes I use chrome! I was just checking :)

ELIZOU

Sorry for this disclaimer, there are no insufficient mating material and three-fold repetition draws. Did you implement other draws like stalemate?

ELIZOU

Overall it is a very cool project. I would really like to learn how to make games like these.

FlaminHotValdez

@ELIZOU and perpetual check

ELIZOU

@FlaminHotValdez yeah i think that is threefold repetition/ repetition position

FlaminHotValdez

@ELIZOU no repetition is when the same exact position happens 3 times in a game, and perpetual check is when one side can endlessly check the other.

EmilyYe4

kewl

sojs

wow! Cool game!

Inte

It has en passant! Finally a chess app that gets that part right

OlauPla

Impressive! I hope this gets min 1000 upvotes! Really hard work put in to this.

IN12

nice kekw lol

AbotLife

This is really cool!

EpicGamer007

SO GOOD

blahthingy

cool

Bookie0

Really cool!!! I love those Clash Royale emotes lmao

rafrafraf

@Bookie0 thank you!!

cuber1515

Cool!

SudhanshuMishra

awesome

Yoplayer1py

Why did you make it? I am a very big loser in chess idk how to play lol

rafrafraf

@Yoplayer1py you want the truth? Ahahha well i was stuck isolating in a hotel for a few days and needed to get a new coding project out of my system so that i could carry on with my urrent work in progress project for a few months - dogemail.😂 so yeah i smashed chess out in 4 days of over 10 hour sprees of coding

Yoplayer1py
VulcanWM

this is amazing!
maybe you can do a tutorial on flask_socketio?

PixiGem

So it uses uuid library or just the normal ID?

rafrafraf
InvisibleOne

Very well done as usual

rafrafraf

@InvisibleOne thanks!!

DSAIroha20

Best thing ever! so cool

rafrafraf

@DSAIroha20 thank you hahaha

JBloves27

epik :3

OldWizard209

@rafrafraf, you always come back with a bang, and actually, I was surprised this wasn't made in one line lmao.. And BTW, how did you get the country flag I m in ? are you using tracking?

Besides that, great game, waiting for chess.com to run out of business. :D

rafrafraf

@OldWizard209 hahaha thank you!! And yup i use the user ip address to get the country code 👍

OldWizard209

woah, how do you get the IP adress. and are you asking the user's consent to release their IP, because giving an IP is quite vulnerable. I know that there are loads of apps we use all the time which have our IP, but those situations are unavoidable..... @rafrafraf

rafrafraf

@OldWizard209 i dont store or see the ip address so consent isnt needed, and every website you go on has access to your ip btw! I just have a function that gets the country code out of the ip address lmao

OldWizard209

ok ok i was just making sure. forgive my small brain qquestion. @rafrafraf

rafrafraf

@OldWizard209 ahahah dont worry i looked into this stuff a while back when i worked on dupl analytics and was actually storing user data ahaha

Valid question

pzrepl

@OldWizard209 you can literally grab it anytime even with js onload (window.onload = function() {})

minishxp

@rafrafraf you should hash the ips smh

Infiniti20

@minishxp Why? It's not stored anywhere, and hashing is useless, as now he can't even tell what country the user's in. So why even use the IP's anymore. It's not being broadcast to your opponent, it's just sending the country.