https://github.com/nidhiupman568/nidhi-upman-portfolio-inspired-by-super-mario-game
๐Welcome to my portfolio, designed to capture the nostalgic essence of the classic Super Mario game! ๐ฎโจ Hereโs a detailed overview of the project, including controls, technologies used, development stages, challenges faced, and final thoughts. ๐
https://github.com/nidhiupman568/nidhi-upman-portfolio-inspired-by-super-mario-game
css front-end-development html interactive-web-design javascript super-mario-portfolio web-animation web-development
Last synced: about 1 month ago
JSON representation
๐Welcome to my portfolio, designed to capture the nostalgic essence of the classic Super Mario game! ๐ฎโจ Hereโs a detailed overview of the project, including controls, technologies used, development stages, challenges faced, and final thoughts. ๐
- Host: GitHub
- URL: https://github.com/nidhiupman568/nidhi-upman-portfolio-inspired-by-super-mario-game
- Owner: nidhiupman568
- Created: 2024-06-09T23:24:23.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-10-04T00:06:38.000Z (5 months ago)
- Last Synced: 2024-11-11T16:27:11.947Z (3 months ago)
- Topics: css, front-end-development, html, interactive-web-design, javascript, super-mario-portfolio, web-animation, web-development
- Language: HTML
- Homepage: https://nidhiupman568.github.io/NIDHI-UPMAN-PORTFOLIO-Inspired-by-SUPER-MARIO-GAME/
- Size: 2.24 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## ๐๐น๏ธ Super Mario-Inspired Portfolio ๐น๏ธ๐
๐Welcome to my portfolio, designed to capture the nostalgic essence of the classic Super Mario game! ๐ฎโจ Hereโs a detailed overview of the project, including controls, technologies used, development stages, challenges faced, and final thoughts. ๐
## ๐ฎ Controls ๐ฎ
You can move Mario to the left or right using the keyboard arrows on desktop or the arrow buttons on mobile. โฌ ๏ธโก๏ธ
## ๐ ๏ธ What I Used ๐ ๏ธ
- **Graphics ๐ผ๏ธ**
- **Music and Sounds ๐ถ:** Sourced from YouTube videos ๐บ
- **๐ HTML**
- **๐จ CSS**
- **๐ป jQuery:** To simplify JavaScript coding ๐ ๏ธ
- **๐ Google Fonts**## ๐ The Stages ๐
1. **Start with the Basics ๐**
2. **Add Little Details ๐จ**
3. **Achieve Pixel Perfect Images ๐ผ๏ธ**
4. **Polish the Code ๐งน**
5. **Overcome the Most Difficult Challenges ๐ง**
6. **Resolve Additional Issues ๐ ๏ธ**### ๐ Start with the Basics ๐
On the screen, you'll see five primary elements:
1. **Mario ๐**
2. **Sky ๐** (clouds โ๏ธ + mountains ๐๏ธ)
3. **Floor ๐ฑ**
4. **Information Boxes ๐ฆ**
5. **Arrow Buttons ๐ฝ๐ผ**Steps to build this from scratch:
1. Write the HTML ๐
2. Write the CSS ๐จ
3. Write the JavaScript (and cry a bit) ๐ป๐ญ
4. Test, test, test ๐งช
5. Polish the code ๐งน### ๐จ Add Little Details ๐จ
The Mario object is a simple `
` HTML tag with a transparent source image. The actual image is applied using the CSS `background` attribute. ๐ผ๏ธ
To create the Mario moving animation, I used a sprite image with three frames:
- **Frame 1:** `background-position-x: 0px;`
- **Frame 2:** `background-position-x: -65px;`
- **Frame 3:** `background-position-x: -130px;`To change Mario's direction (left or right), I used the same image file with the CSS attribute `-webkit-transform`:
- **Left:** `-webkit-transform: scaleX(-1);`
- **Right:** `-webkit-transform: scaleX(1);`### ๐ผ๏ธ Achieve Pixel Perfect Images ๐ผ๏ธ
For the background image, I initially used a small image that appeared blurry on desktop. Adding the CSS attribute `image-rendering: crisp-edges` achieved crisp pixels. This small tweak made a significant difference. ๐จโจ
### ๐งน Polish the Code ๐งน
In the first version, there was a lot of duplicate code for user controls (key presses and arrow button clicks). I refactored the code to use functions, reducing redundancy and improving maintainability. ๐ป๐งผ
### ๐ง Overcome the Most Difficult Challenges ๐ง
The most challenging part was handling all the JavaScript interactions, managing time intervals, and ensuring smooth controls on both desktop and mobile. ๐ ๐ป
### ๐ ๏ธ Resolve Additional Issues ๐ ๏ธ
Some browsers, like Google Chrome, do not allow autoplaying music. To address this, I made the music play when the user interacts with the screen (e.g., clicks, presses keys, or clicks arrow buttons). ๐ถ๐
## โจ Final Message โจ
I hope you enjoy this project, find some inspiration, and share it with your family and friends who have fond memories of playing Mario Bros. Let's bring back some good memories together! ๐ฎ๐
## ๐ Getting Started ๐
1. Clone the repository: 'https://github.com/nidhiupman568/NIDHI-UPMAN-PORTFOLIO-Inspired-by-SUPER-MARIO-GAME.git' ๐
2. Open the `index.html` file in your web browser. ๐## ๐ ๏ธ Technologies Used ๐ ๏ธ
- **๐ HTML5**
- **๐จ CSS3**
- **๐ป JavaScript**#### ๐ธ Screenshots (Output) ๐ธ


