โค๏ธ Original idea by my two kids, Lucas & Lola (8 years twins), inspired by our hamster, ๐น Puchi.
Welcome to the repository of "Space Adventures of Puchi," an engaging and innovative JavaScript game entirely conceptualized and developed with the assistance of an AI, specifically OpenAI's ChatGPT-4. This project represents a unique collaboration between human creativity and advanced AI technology, leading to a game that's both fun to play and fascinating in its development process.
No clean code applies here, neither solid principles and no any good principles, just prompts, chat gpt, copy, paste, play, adapt, fix, new feature and repeat.
Just fun! ๐ค
- About the Game
- AI-Powered Development
- Key Features
- Tech Stack
- Contribution
- Getting Started
- Acknowledgments
- Technical Setup and Running the Game
- TODO log
"Puchi's adventures" is a captivating retro-themed game set in the vast expanse of the cosmos. Players guide Puchi, an adorable hamster, through challenges, collecting stars and dodging obstacles in an enchanting pixel-art universe. The game features a blend of classic arcade mechanics and modern gameplay elements, creating an experience that's both nostalgic and refreshingly new.
Every aspect of this game, from the initial concept to the intricate coding details and images, has been generated through conversations with OpenAI's ChatGPT-4. This groundbreaking approach to game development allowed for rapid prototyping, creative problem-solving, and the integration of complex game mechanics without the traditional barriers often encountered in the development process.
- AI-Assisted Game Design: The entire game, including its mechanics, design, and code, was developed with the guidance and suggestions of ChatGPT-4.
- Engaging Gameplay: Navigate Puchi through space, using abilities like gravity impulse and a protective shield, while collecting space stars and discovering hidden paths.
- Retro Pixel Art Style: Enjoy the charm of pixel art graphics that pay homage to the classic era of arcade games.
- Dynamic Challenges: Encounter various space entities like floating aliens, toxic nebulas, and moving asteroids that make each playthrough unique.
- Limited Ammunition Mechanic: Strategically use Puchi's limited shots to survive in the hostile environment of space.
- Responsive Design: Play the game across different devices, experiencing smooth gameplay and consistent performance.
This game is built using pure JavaScript, HTML5, and CSS3, leveraging the power of the Canvas API for rendering. It stands as a testament to what can be achieved with these foundational web technologies, especially when combined with the innovative input of AI.
Contributions to "Space Adventures of Puchi" are welcome! Whether you're a seasoned developer or a beginner, your input and ideas can help enhance this unique project. Feel free to fork the repository, experiment with new features, or suggest improvements.
To get started with this game:
- Clone the repository.
- Open the
index.html
file in your browser. - Start playing and enjoy the interstellar journey!
A special thanks to OpenAI and the ChatGPT-4 model, without which this project would not have been possible. Their advanced AI technology has opened new horizons in game development and creative processes.
Embark on a cosmic adventure with Puchi and experience the magic of an AI-collaborated creation! ๐๐
Setting: The vast and mysterious intergalactic space. The background is a blanket of sparkling stars of various sizes and colors. A majestic spiral galaxy slowly rotates to the left, casting shades of blue and purple. On the right, a nebula in shades of pink and green can be seen, emitting an almost mystical glow. Some asteroids float sporadically, serving as obstacles and platforms for Puchi.
Main Objective: Puchi must collect "Space Stars" scattered throughout the screen while avoiding collisions with floating asteroids that move unpredictably. Some stars are located near the nebula, making them harder to reach due to the slight gravitational force it emits.
Challenges:
- Asteroids that move in various trajectories and can cause Puchi to bounce in unpredictable directions.
- Areas of low gravity near the nebula, which disrupt Puchi's mobility.
- Some stars are surrounded by small clouds of space gas that temporarily limit visibility.
Special Effects:
- When Puchi collects a star, a glow effect and a mystical sound are generated.
- Collisions with asteroids produce a bouncing effect and a soft collision sound.
- As Puchi approaches the nebula, the screen exhibits a slight ripple effect to represent gravitational distortion.
Background Music: A cosmic, soothing, and mysterious melody that evokes the vastness of space and the curiosity of exploration.
Puchi: Our brave astronaut hamster gracefully floats in space, propelled by small thrusters on his spacesuit. His helmet reflects the wonders of the cosmos, and his eyes reveal the excitement of space adventure.
With this description, you should have a clear idea of how the "Puchi in Space" screen will unfold. I hope this is helpful for your game!
Puchi's Special Abilities:
- Gravity Boost: Puchi can activate a brief boost that propels him quickly in any direction. Useful for dodging asteroids or reaching challenging stars. It has a short cooldown time.
- Stellar Shield: By collecting certain power-ups, Puchi can activate a temporary shield that protects him from collisions. The shield lasts for a few seconds and then needs to recharge.
- Cosmic Vision: Allows Puchi to see hidden objects or secret paths for a limited time. Activating this ability consumes "Space Stars," so it must be used wisely.
Interactive Elements:
- Stellar Portals: These portals teleport Puchi to different areas of the screen or even to secret zones.
- Comets: Puchi can ride comets that cross the screen quickly to move rapidly and collect stars along their path.
Level Objectives:
- Collect a specific number of "Space Stars" to unlock the level exit.
- Discover at least one secret path or hidden area.
- Avoid or minimize collisions with asteroids.
Enemies:
- Space Aliens: Floating creatures that pursue Puchi when he gets close. They can be defeated using the "Gravity Boost" or skillfully avoided.
- Toxic Nebulas: Areas of poisonous gas that harm Puchi if he stays in them for too long.
- Asteroids: As mentioned earlier, they move in various trajectories and can make Puchi bounce or take damage.
Visual Prototype (AI generative prompt):
"An expansive space with bright stars and a spiraling galaxy in the distance. In the center, a hamster in an astronaut suit, Puchi, floats, surrounded by vibrant and varied 'Space Stars.' Around him, blinking blueish portals, fast-crossing comets, and rocky asteroids move. In the corners, patches of poisonous space gas with a hint of green, and floating aliens with tentacles and luminous eyes lurk, waiting to approach."
I hope these additional details enrich your "Puchi in Space" screen and provide you with more tools to design an exciting and challenging gaming experience. Best of luck with your project!
Adding Enemy: Alien Mouse
General Appearance: Imagine an alien mouse of exaggerated proportions and unusual colors that clearly differentiate it from a terrestrial rodent. Its skin is of an iridescent bluish-green hue that gently glows in the darkness of space. Its large eyes are of a bright amber color, lidless, giving the impression of constant vigilance.
Distinctive Features:
- Antennae: Two long, flexible antennae protrude from its head, ending in small bioluminescent balls that flicker with a soft light, serving as a means of communication with other aliens.
- Ears: Its ears are pointed and membranous, with a translucent texture that reveals a network of fine bioluminescent veins.
- Tail: The tail is long and prehensile, covered in metallic scales that it could use to manipulate objects or as a defense mechanism.
- Legs: It has six legs, each ending in three opposable fingers equipped with suction cups, allowing it to move easily in the zero-gravity environment of space.
- Fur: Instead of fur, it has a series of delicate crystals that grow along its back, reflecting the light of nearby stars.
Behavior: This alien mouse possesses clever intelligence and moves with quick, calculated movements. When not attacking, it can be seen playing with small rocks or debris, displaying a curiosity similar to terrestrial rodents.
Abilities:
- Camouflage: It can slightly alter the color of its skin to blend in with the starry background, allowing it to ambush Puchi or hide from larger threats.
- Agility: Its agility in the vacuum of space enables it to dodge shots with erratic, rapid movements.
This creature, while not overly large, is formidable in the vacuum of space and provides a unique challenge for Puchi. Its design is not only attractive and unique but also adds depth to the game mechanics, challenging the player to anticipate and react to its erratic movements and camouflage ability.
Visual Cue for AI Prompt: Think of a mischievous, luminescent alien mouse, floating through the cosmos with nimble grace. Its skin shimmers with an ethereal glow, adorned with crystal spikes and vibrant veins that seem to dance with starlight. Despite its delicate appearance, its keen amber eyes suggest a cunning nature, ready to pounce or vanish into the starry void at a moment's notice.
If you are a developer interested in setting up and running "Space Adventures of Puchi" locally, follow these steps to get started:
Before you begin, ensure you have the following installed on your system:
- A modern web browser (such as Google Chrome, Mozilla Firefox, or Safari).
- A code editor (like Visual Studio Code, Sublime Text, or Atom).
-
Clone the Repository
- Open your terminal (Command Prompt, PowerShell, or a similar command line tool).
- Navigate to the directory where you want to clone the repository.
- Run the following command:
git clone https://github.com/your-username/your-repository-name.git
- Navigate into the cloned repository:
cd your-repository-name
-
Explore the Project Files
- Open the project directory in your code editor.
- Familiarize yourself with the project structure.
To run "Space Adventures of Puchi," follow these steps:
-
Open the Game
- In your code editor, locate the
index.html
file. - Right-click on the file and select the option to open it in your default web browser. Alternatively, you can manually open the file in your browser.
- In your code editor, locate the
-
Play the Game
- Once the game is loaded in the browser, it should be ready to play.
- Follow the on-screen instructions to start playing and navigate Puchi through the adventures.
If you encounter any issues:
- Ensure that all files have been correctly cloned from the repository.
- Check that your browser is up-to-date.
- Review the JavaScript console in your browser for any error messages.
Your contributions to improve or enhance the game are always welcome. Feel free to fork the repository, make changes, and submit pull requests with your updates.
With these instructions, developers should have no trouble setting up and enjoying "Space Adventures of Puchi" in their development environment.
-
Create an enemy -
Enemies gain different speeds. -
When a beam coincides with the position of an enemy, that enemy disappears. -
View the score on screen. -
Each time an enemy is hit, 50 points are added. -
Enemies appear from the right and disappear to the left. -
Create a GameOver screen with an image generated by AI. -
Puchi has 50 default shots. Once 50 shots are fired, no more can be fired. -
Puchi can only reload shots when finding a beam in space, with which he can reload 50 shots. -
Replace yellow square by a retro image for Ammo Powerup -
Add effects when Puchi gets an Ammo PowerUp -
enable/disable debug mode pressing key B more than 3 seconds -
Add new Enemy image generated by Dall-e 3 -
Bit refactor of Galaxy -
PowerUps dissapears after 10 seconds (can be adjustable), when arrives to 7, begin flashing. -
Need urgently a ranking cause my mates are playing and they want to compete! - Only 3 enemies can disappear off the left side of the screen. If more than 3 disappear, it signals game over and the game restarts.
- Enemies can shoot Puchi.
- Puchi has extra lives.
- New PowerUp gives Puchi the power to destroy every Enemy in the screen.
- New obstacles can appear on the screen in the form of Rocks, stalactites, or anything else, static or not, that can cause Puchi to crash.
- The escape key should bring up a menu with the options to continue and restart.
- Add sprites and effects so that when a ray hits an enemy, it explodes, giving the feeling of a retro-style game explosion.
- Add sprites and effects for the shots fired by Puchi giving the feeling of a retro-style game explosion.