Share your repls and programming experiences

← Back to all posts
AlexanderTarn (288)

Spoiler Alert: terrible graphics
I made a snake game in the terminal, it's not very good because it's laggy, but I think this is one of the most hardest programs I made, mainly because I had to ask for help a lot. Hope you enjoy!

2009k (11)

doesn't work on chromebook

AlexanderTarn (288)

@2009k why not? What errors are you getting?

V3rmillionNet (53)

@AlexanderTarn It does, i am testing right now, but after 1 movement the game completely stops working. Not output errors. just that.

V3rmillionNet (53)

@AlexanderTarn It works on embed terminal the best, not on full terminal

CalebCarlson (31)

@2009k It does, Its just super slow, you press a button and it just sits there for 5 minuets and then goes

CalebCarlson (31)

@V3rmillionNet it doesn't stop working, if you wait a while it goes

xolyon (346)

Can you tell me how you made your mapping/printing/moving system as I have been struggling for ages to make such a system

xolyon (346)

This is amazing , great game

AlexanderTarn (288)

@xolyon I already put it in the comments

JamesGregory2 (1)

I mean, its is snake

slickassassin03 (99)

Quick little tip, when adding long lists with the same value, use a multiplier:

list = [0]*amount


test = [0]*10

[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
OathOfCode (27)

This is one of the better versions of snake I've seen without using Python Turtle or Pygame! Also, to reduce some of the lag when you clear the screen, import replit and use replit.clear(). It clears the screen much faster with much less lag!

Hope To see more of your projects soon!

  • Sincerely OathofCode
xolyon (346)

Great , I always wondered how you make GUI in text based console (please explain I always wanted to know)

AlexanderTarn (288)

@xolyon you first create a map with lists, then create another list that has all the lists, after that you print it (I used a range loop to create a string and print it). Then you do whatever and based on the outcome of whatever you change the lists. clear the terminal and repeat.

xolyon (346)

@AlexanderTarn great but how do you change the lists?

AlexanderTarn (288)

@xolyon you get the spot you want to change and make it equal to something else
((List with all lists)[index for y])[index for x]

xie21 (12)

kind of slow.... but good