A downloadable game

A terraria inspired game, its my first game that i feel proud enough of to post online :D

made with pygame :)

Download

Download
cozyworld.zip 28 kB

Install instructions

Cozy World

This project is a 2D sandbox-style crafting and exploration game built with Pygame. Players can explore a procedurally generated world, gather resources, craft items, and build structures.

Features

Procedural World Generation:

The world is divided into chunks.

Includes dirt, stone, grass, and various ores.

Trees (with wood and leaves) are randomly generated on grass blocks.

Crafting System:

Players can craft items using a recipe system.

The crafting interface displays required materials and uses sprites for visuals.

Inventory System:

A fixed 9-slot inventory to store collected materials.

Players can select items for crafting or block placement.

Block Placement and Breaking:

Break blocks to gather materials.

Place blocks from the inventory to build structures.

Gravity and Movement:

Player movement includes jumping and falling mechanics with collision detection.

Saving and Loading:

Save the current game state (inventory and chunks).

Reload saved game data.

Controls:

UP ARROW:

Jump

LEFT ARROW:

Move Left

RIGHT ARROW:

Move Right

SPACE:

Break blocks

Mouse:

Place blocks or interact with the UI

I:

Open/Close inventory

S:

Save the game

L:

Load a saved game

ESC:

Close the inventory

Installation

Install Pygame:

pip install pygame

Clone the Repository:

git clone <repository_url>

cd <repository_directory>

Ensure Required Assets:

Place the following sprites in the img/ folder:

player.png

dirt.png

grass.png

stone.png

ruby.png

emerald.png

gold.png

dirt_bricks.png

stone_bricks.png

ruby_bricks.png

emerald_bricks.png

gold_bricks.png

wood.png

wood_planks.png

leaves.png

Run the Game:

python main.py

How to Play

Explore:

Use movement controls to explore the procedurally generated world.

Gather Resources:

Break blocks (e.g., dirt, stone, ores, and wood) to collect materials.

Craft Items:

Open the inventory with I.

Click on craftable items to create them if you have enough materials.

Build Structures:

Select a block from the inventory and place it with a mouse click.

Leave a comment

Log in with itch.io to leave a comment.