Get user input to determine an action and apply it to a specific Item
I’m working on making a basic text game.
I’m trying to allow a player to type what they want to do and what they want to do it to.
if the player wants to pickup shovel a shovel I want to check the action pickup then apply it to the item shovel.
Problem with horizontal collision in tile-based platformer
I’m developing a tile-based game. I encountered some unexpected behaviour in my collision code.
I don’t want to post the whole code here. Because it’s too long and might be painful to read (I am very sorry).
Taking tuples from text file python 3.11.2
I’m making a game where the level loads in via a txt file but a can’t take the lines out of the file so my program can read it.
taking tuppels from txt file python 3.11.2
i’m making a game where the level loads in via a txt file but a can’t take the lines out of the file so my program can read it
Why can’t I implement this equation to my game?
SoI’m trying to code a game that renders in the terminal. It is a grid-based system, which uses list[int, int] (vector) for positions, directions etc. my map is a 5×5 and I’m basically trying to implement an equation I’ve come up with so that the player won’t be able to move beyond the borders. For example, if the player prompts to move 7 (6, 0) positions to the right from the starting position (0, 0), the player shall not move that far, but will move at least 5 positions to reach the border (4, 0).
How do I fix: AttributeError: ‘set’ object has no attribute ‘append’
I am, trying to make blackjack in python and whenever i go max bet (which is 5000) the game works perfectly but when i enter something other than 5000 it gives me this error.
Python help for a beginner
I’m new to coding in terms of experience in general but I am wanting to create a small game in Python.