Share your repls and programming experiences

← Back to all posts
Pokémon Battle Game


Hello Guys, This is my game for GameJam.
I just started learning python and thought I should participate in this event too. :)
This was all I could do in the given time and oh thanks to the school for giving me such free time, I had more plans but nevermind. It's still a lot better than before.

About the game

Main Goal
The idea is to defeat the gym leaders, collect the badges, win the pokemon championship league and rise.
The game has a difficulty level set for each level. The enemy Pokémon now appear based on the gym leader. For example, Misty only has a water type pokemon. This may seem easy in the beginning but the game gets pretty hard as you level up. This game is not just about the moves, it's pretty much about the tactics too. The damage done by each move is not defined and hence the user has to choose the most suitable move for that time.
Each pokemon comes with different evolution and with each evolution gets a power boost. The user also earns coins per fight. After reaching a certain evolution and having enough coins, the user can purchase attacks from the shop.
You can also purchase Pokémon from the store though purchasing a pokemon can be expensive. :p

  • Attack Damage depends upon the type of Pokémon. This is included with the help file


There are 3 modes in this game

Story Mode

This will follow the main goal.
You fight trainers, get items and progress in the game.

Free Roam

Now, this mode is created only for the purpose of earning extra money.
In free roam mode, you will encounter 2 type of enemies, team rocket or random trainers. You will get 50 Poké per match.
There is a surprise after you beat Cerulean City Gym Trainer. :D

Random Trainers:

  • You will encounter random players, their pokemon level will be based on your pokemon level.

Team Rocket:

  • Their Pokemon are exclusive to them, they are not made available for purchase.

Survival Mode

  • Play to see it for yourself. :p


Almost Everything is available for purchase here, from pokemon to their health and even their attacks

I spent most of the time here so please do check all items.


Today is the day you are going to get your first pokemon but wait, ARE YOU SLEEPING ?!
You woke up late on the day you were going to get your first pokemon and now you are left with only 3 choices.

  • Pichu(Yes not even Pikachu. )
  • Charmander
  • Squirtle
    You choose one pokemon and embark on your journey to become the best Pokémon trainer. You fight gym leaders in order to acquire 'Gym Badges'. These gym badges are required to enter Pokémon Championship League.


Images used in the post, belong to their respective owners.
Thanks to Amelia Blackwell and leon332157 for the amazing json store library idea.

If you guys find any bugs please comment down below.
Also, if you like the game, don't forget to upvote it. :)
I recommend playing in a new tab as this game use ascii art
Click Here to Play


It is showing a 404 error


This game will not work anymore because jsonstore has discontinued its service.
All the user data is lost and currently, I've no plans to continue supporting it. Hope you guys will understand and for a quick note:
Visit My Programming Blog:


doesn't work


@DogeNinja68 Its the server error, I have reported the error to the developer. He may fix it soon. Till then I have an offline version of this game if you'd like to try.


Thank You @SuyashAgarwal I appreciate it!


I tried to play and this happened

Traceback (most recent call last):
File "/home/runner/.local/share/virtualenvs/python3/lib/python3.8/site-packages/urllib3/", line 421, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/home/runner/.local/share/virtualenvs/python3/lib/python3.8/site-packages/urllib3/", line 416, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.8/http/", line 1322, in getresponse
File "/usr/local/lib/python3.8/http/", line 303, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.8/http/", line 264, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/local/lib/python3.8/", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/local/lib/python3.8/", line 1241, in recv_into
return, buffer)
File "/usr/local/lib/python3.8/", line 1099, in read
return, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/runner/.local/share/virtualenvs/python3/lib/python3.8/site-packages/requests/", line 439, in send
resp = conn.urlopen(
File "/home/runner/.local/share/virtualenvs/python3/lib/python3.8/site-packages/urllib3/", line 719, in urlopen
retries = retries.increment(
File "/home/runner/.local/share/virtualenvs/python3/lib/python3.8/site-packages/urllib3/util/", line 400, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/home/runner/.local/share/virtualenvs/python3/lib/python3.8/site-packages/urllib3/packages/", line 735, in reraise
raise value
File "/home/runner/.local/share/virtualenvs/python3/lib/python3.8/site-packages/urllib3/", line 665, in urlopen
httplib_response = self._make_request(
File "/home/runner/.local/share/virtualenvs/python3/lib/python3.8/site-packages/urllib3/", line 423, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/home/runner/.local/share/virtualenvs/python3/lib/python3.8/site-packages/urllib3/", line 330, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='', port=443): Read timed out. (read timeout=5)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 27, in <module>
from mechanism import *
File "/home/runner/4e1itqtbyqm/", line 829, in <module>
File "/home/runner/4e1itqtbyqm/", line 343, in userinfo
data = client.retrieve(username)
File "/home/runner/.local/share/virtualenvs/python3/lib/python3.8/site-packages/json_store_client/", line 68, in retrieve
resp = self.session.get(url, timeout=timeout)
File "/home/runner/.local/share/virtualenvs/python3/lib/python3.8/site-packages/requests/", line 546, in get
return self.request('GET', url, kwargs)
File "/home/runner/.local/share/virtualenvs/python3/lib/python3.8/site-packages/requests/", line 533, in request
resp = self.send(prep,
File "/home/runner/.local/share/virtualenvs/python3/lib/python3.8/site-packages/requests/", line 646, in send
r = adapter.send(request, **kwargs)
File "/home/runner/.local/share/virtualenvs/python3/lib/python3.8/site-packages/requests/", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='', port=443): Read timed out. (read timeout=5)


@BobTheTomatoPie server error, I'm trying to reach the developer of this server but I'll try looking at other alternatives.
Thanks for showing your interest in this game. :D


how did you move it to a different tab and also erase past things, good game trying adding like animations like my rpg i made


@spiderchi4, I don't really understand what you are trying to say "move it to a different tab" but I guess you are referring to the clear() function, it is a built-in function here.
Alternatively, you can import os and then clear screen.
About animations, you can't really use animations in the terminal, it's just ASCII Art and I've used it in the shop(the shop in the game). I don't like too much ASCII art. Thanks for the suggestion though.

Feel free to message me if you have any other queries. :D
Hope that helps.


Hey, I've looked into the code and it looks great but I have a few things you should check on

1) this happened twice but Gary sometimes doesn't have a Pokemon when I fight so I can just do the same attack over and over again and can win.
2) I would play till misty and something screws up and I can't play anymore.

otherwise this looks good. Keep up the good work


@JoshuaYeatman oh, I'm sorry, what you saw was a very old version of this game,
I was experimenting something so I had reverted back to that version.
Please try again, everything should work perfectly fine now.
Btw, I've made some changes in design. :D




@MatthewDoan1 Thanks a lot :D


@SuyashAgarwal psyduck is broken, it wont let me use any of his attacks, it pops up an error and quits the repl


@Nanowrimoijk thanks for reporting the error, i'll look into it


@SuyashAgarwal also i was having the same problem with certain trainers though i cant recall their names


dang, misty acts like Undyne. great. game btw! also you say there are 4 badges but list 5


Why no Bulbasaur?!?!


@ReshiramWolfu, Bulbasaur is in game if you follow storyline. I just didn’t make him an option in starting.


game's pretty interesting but cant defeat lt. surge


@HassaanArshad, you won’t play a game that’s too easy to beat, would you? By the way, you can defeat Lt. Surge but it all depends upon the choices you make.
Hint: You need a fully evolved pokemon + health potion + high level attack to beat him.


oh nvm you just have to hit enter to go to the next step


Everything looks cool but the game crashes when you signup .


I had just started, it was quite interesting, but I ran into an error

Also, I noticed I was able to buy the same "attack" multiple times.
And, the "heal" option in combat, it was not really good enough, at least in the early game. It healed so little compared to the attack damage even in the earliest of battles. Maybe you should improve the "heal", make it more balanced, or prevent attacks while healing, or something like that.


@AkhilGupta thanks for the info.
1- This error is not from my side, it must either be the repl server or the json store server.

2- About buying the same attack multiple times, I’ll fix it on a new repl(as i can’t make changes to this one). I was so focused on adding new things i hardly had any time left for testing. 😝

3- The heal option yeah, I also thought it should heal more but...... i forgot😶. I’ll fix it.

So, thanks again for testing the game, i really needed guys like you who could do the bug testing.
But nvm.


1 - If you think this is on Repl's end, I really think you should report it. This will help them make a better IDE, and also, might prevent the judges running into the same error. You can report it here:

2 - No worries. I understand, I was the same way. And when I finally did test my game, luckily a few days before the deadline, I realized it had so many bugs, some major ones.

3 - This is the only thing I wished you had tested/fixed before submission. I tried to keep testing the "Heal" move, thinking that I was doing something wrong. lol.


Guess there’s no point in trying now. If people like it or want to see it evolving in future then I will make changes/add more things otherwise I’ll just leave this one as it is.


So goooooooooooood


@DhairyaSHAH1 Thanks a lot, i really worked so hard on this one.


Game Updated, Check it :D


There is a bug that occurs when you press enter without choosing your pokemon.


@SaptarshiHalder Yeah, i was aware of that, i have fixed that problem, will release the update tomorrow. Thanks for the info btw. :D


Good job man, it was pretty fun.
Played until I got Mew.


@Night_Shadow wait a while man, i'll be updating the game within a few minutes.
I've changed the whole storyline, and new things are added.
And Thanks.


@SuyashAgarwal With mewtwo the and dragonite. The Game is BORING.


@SuyashAgarwal With mewtwo and dragonite. The Game is boring.


@SaptarshiHalder Make mew and dragonite costlier and make Sabrina use weaker Psychic Pokemons like Psyduck and Gold Duck.


Correction for the description: It is not "Pokemons", it is Pokemon.


@Night_Shadow , Thanks for the info, i'll edit it.


This is great! Minor glitch though, you start with 10 coins, when you start, you get 10 coins rather the necessary 15 to buy the first pokemon
Great game though!


@GreenOtterKid I did it on purpose because user receives 1 pokemon from Professor Oak. If you win the first fight, you get 5 coins from which you can buy a pokemon.


@SuyashAgarwal Oh right. My bad


game no w ork


@KobeBeyer Can you please post the screenshot of error?


Wow! You just started learning Python? This is really advanced! Only a few minor suggestions:

  • allow more time to read each line in the introduction by increasing your t.sleep() value to 4
  • allow more time to read after choosing your primary Pokemon
  • change username to name so that Professor Oak doesn't call you something like bobc1234, etc.
  • place print("") elements between important lines such as the help file confirmation and the Weak Pokemons line.
  • use clear tool more
  • avoid spaghetti code! it makes the program hard to edit and interpret.

since these are just minor OCD things, you're getting an upvote from me anyway!


@itbarsoum Thanks a lot man, I’ll definitely work on these.


where's the homie bulbasaur tho


@bigjosh I have some different plans for bulbasaur, i’m trying to make a storyline here. It will definitely be added in the next update.


its called tic tac toe with bots


also check out mine


what do we do


Hey! Is this an updated version?


No, this is the first one i made.