Skip to content

Building Games on Cardputer: A Journey of Discovery with AI

Embarking on a tech project can often feel like venturing into uncharted territory. Especially when it involves a new technology or stack. This was precisely the case when I decided to dive into the world of the Cardputer, a compact and versatile development board that caught my eye, thanks to a Youtube Short from Abe's Project's. The journey from a novice to building engaging games on this device, with the guidance of OpenAI's GPT, has been nothing short of a revelation. In this blog post, I'd like to share this adventure, highlighting the joy of learning, the challenges overcome, and the exciting possibilities that lie ahead.

brickbreaker

Discovering the Cardputer

The Cardputer, with its ESP32 chip, intrigued me for its compactness and potential for IoT projects. However, starting with little knowledge about its capabilities and programming nuances presented a steep learning curve. My objective was clear but ambitious: to create engaging games on this platform, starting from scratch. This ambition led me to seek assistance from an advanced AI system, OpenAI's GPT, which became my guide and companion on this journey.

The First Steps

The initial phase involved understanding the Cardputer's core features, including its display capabilities, input methods, and sound output. With GPT's assistance, I navigated through the documentation, gaining insights into the hardware specifics and how to harness its potential for game development. The process involved trial and error, with GPT providing code snippets, troubleshooting tips, and best practices. My very first test was building a simple splash screen with our company information on. From there it grew into Pong, Pong led to BreakOut/Arkanoid which in turn ended up making SpaceInvaders!

Building "Pong"

Our first project was to recreate the classic game "Pong." This endeavour required learning how to manipulate the Cardputer's display for real-time rendering of moving objects and handling user input for paddle control. GPT proved invaluable, offering step-by-step guidance in coding the game mechanics, from the bouncing ball to the responsive paddles. The result was a playable "Pong" game, a testament to the collaborative power of human creativity and AI assistance.

Screenshot 2024-02-14 at 14.07.27

Advancing to "Breakout"

Encouraged by our success with "Pong," we set our sights on a more complex game: "Breakout." This project introduced additional challenges, such as designing multiple bricks, implementing collision detection, and creating a scoring system. Once again, GPT was instrumental in breaking down these complex requirements into manageable tasks. Through an iterative process, we developed a "Breakout" clone that not only functioned as intended but also showcased the Cardputer's capability to host engaging arcade games.

Overcoming Challenges

The journey was not without its hurdles. We encountered issues such as flickering graphics, managing game speed, and optimising user input handling. Each challenge was an opportunity to learn, with GPT providing debugging tips and optimisation strategies. These experiences highlighted the importance of perseverance and the value of leveraging AI for problem-solving.

Looking Ahead

The completion of these projects marks the beginning of an exciting path forward. With a solid foundation in Cardputer game development, my aspirations have grown. I aim to explore more complex game mechanics, integrate additional sensors for innovative gameplay, and perhaps venture into home automation and security apps and fun with this great little device! You can find all of the code, here. Run the .ino file in Arduinio IDE and ensure you have the necessary libraries installed and away you go!

Join the Adventure

This journey from novice to creator has been incredibly rewarding, demonstrating that with the right tools and guidance, anyone can bring their tech ideas to life. I invite you to discuss your technology aspirations with us. Whether you're looking to embark on a similar project or have other innovative ideas, let's explore the possibilities together. Book a discovery call with us, and let's turn your vision into reality.

Building games on the Cardputer, with the assistance of AI, has been an enlightening experience. It's a vivid reminder that the journey of learning and creating is as rewarding as the end product. As we continue to explore the intersection of technology and creativity, the potential for innovation is boundless. Join us on this exciting journey, and let's create something extraordinary together.