๐ฎ Mini Mario Run – A Lightweight Python Game Inspired by the Classics
๐ Introduction
As someone who grew up playing Mario, I always wanted to recreate that magic—but with my own twist. So I built Mini Mario Run, a small but fun 2D platformer made entirely with Python and PyGame, and designed for simplicity, speed, and learning.
This game doesn’t use Unity, Godot, or Unreal. It runs on pure Python and is light enough to work on most systems—ideal for students, beginners, or hobbyists.
๐ฏ Project Goals
Recreate basic Mario mechanics: run, jump, collect, and avoid enemies
Use Python only (no external game engines)
Design 3 levels with increasing difficulty
Add sound and basic visuals
Keep code readable and modular
๐ ️ Tech Stack
Language: Python 3
Library: PyGame (for graphics, input, sound)
IDE: VS Code
Assets: Kenney.nl (sprites), OpenGameArt (sound)
Deployment: Local (can be packaged into .exe with PyInstaller)
๐ฎ Gameplay Features
Character Movement: Arrow keys to move, spacebar to jump
Gravity & Physics: Realistic jump and fall behavior
Coin Collection: Increases score and plays sound
Enemies: Basic collision-based game over logic
Levels: Three themed levels (Grass, Desert, Lava)
Simple UI: Score displayed on screen
๐บ️ Game Structure
bash
Copy
Edit
mini_mario_run/
├── main.py # Main game file
├── assets/
│ ├── player.png # Character image
│ ├── coin.png # Coin sprite
│ ├── enemy.png # Enemy sprite
│ ├── background.png # Level background
│ ├── jump.wav # Jump sound
│ └── coin.wav # Coin collection sound
๐ง๐ป Sample Code Snippet
python
Copy
Edit
if keys[pygame.K_SPACE] and on_ground:
player_vel_y = -10
jump_sound.play()
player_vel_y += gravity
player.y += player_vel_y
This small chunk controls jumping, gravity, and falling. Simple logic, but gives a solid gameplay feel!
๐ผ️ Screenshots
๐ผ️ You can attach images like gameplay.png, level1.png, or a GIF of the jump mechanic to make it pop in the article.
(If you'd like, I can help generate a sample screenshot or animation frame.)
๐ Why Post on AWS Community?
Though Mini Mario Run is a local project, it can evolve:
Host scoreboards on AWS DynamoDB
Use S3 to store player assets or sprites
Deploy it as a browser game using AWS Amplify + Pyodide
Package leaderboards or analytics with Lambda functions
This game is just the start—and AWS has endless tools to help scale it beyond a personal project.
๐ Final Thoughts
"Mini Mario Run" proved that you don’t need a massive engine to build something fun. Python and PyGame are powerful enough for prototyping real games—and perfect for students who want to learn game design fundamentals.
You can clone it, remix it, or build your own levels—and I’d love to see what you make with it.
๐ฆ GitHub (Optional)
Add your GitHub repo link here, like:
https://github.com/yourusername/mini-mario-run
๐ฌ Let's Connect!
If you're curious about the code, need help with PyGame, or want to collaborate on future versions of the game (maybe an online multiplayer?), let’s connect on the AWS Community Slack or LinkedIn!
Tags (for posting):
#Python #GameDev #PyGame #AWSCommunity #StudentProject #MarioClone
Comments
Post a Comment