r/PythonLearning • • Mar 14 '26

LEARNING PYTHON

Well I have decided i want to start learning python.

I am planning to self learn it to a level I can code a single game.

Any advice?🙃

3 Upvotes

24 comments sorted by

View all comments

3

u/Atsoc1993 Mar 14 '26

Know that no game on Steam or anywhere else was ever played was built with Pygame or Pyxel — Python is not the go-to language for serious game development.

Aside from that, start with a text based game.

class Character:
    def __init__(self, type: str, hp: int = 10) -> None:
        self.type = type
        self.hp = hp

    def get_title(self) -> str:
        return “The Great “ + self.type

selection = input(‘Choose a class: \n A. Warrior \n B. Mage’
if selection.lower() == “a”:
    character = Character(type=warrior)
    print(f’Character is {character.get_title()}; Character health points is {character.hp)’)