Urgent.News

What's breaking now, across thousands of outlets.

Tech

I Built a 2-Player Brain Game at a Google Community Event (and Then Leveled It Up)

Today, I attended Vibe Coding with Google AI Studio , hosted by GDG on Campus in Peshawar . The session was about Google AI Studio and how it can turn a rough idea into a working app in minutes. At the end, the speaker gave us a challenge: build a game. The top 3 would get a surprise. ๐ŸŽ Here's what I built, what I learned, and how I took it further. ๐ŸŽฎ Play it first ๐Ÿ‘‰ Play Number Nebula onโ€ฆ

Today, the reporter attended Vibe Coding with Google AI Studio, hosted by GDG on Campus in Peshawar. The session focused on Google AI Studio and its ability to transform rough ideas into functional apps swiftly. At the event's conclusion, participants were challenged to develop a game, with the top three receiving a surprise. The reporter's creation, titled Number Nebula, is now available on CodePen.

Number Nebula is designed as a brain game suitable for both children and adults, blending classic space shooter mechanics with puzzle elements. Players must solve math problems or arrange letters in the correct order to shoot aliens, while also taking turns to engage in combo attacks against their opponent every three correct answers. The game is played on a shared screen by two users, with various power-ups, a boss battle, adjustable difficulty levels, and a choice between a bot opponent and a human rival.

The reporter employed a structured prompt, detailing game concepts, controls, levels, scoring, and visual elements, which Google AI Studio swiftly converted into a working prototype. Iteration followed, with upgrades ranked by their potential impact. A key challenge encountered was the lack of interactivity between players, which the reporter addressed by introducing combo attacks.

The game was developed using pure HTML5 Canvas and JavaScript in a single file, devoid of any frameworks. Sound effects were generated in code using the Web Audio API, eliminating the need for external audio files. A straightforward game loop, updating positions, checking collisions, and drawing, was executed approximately 60 times per second.

Looking ahead, the reporter plans to incorporate online multiplayer functionality, enabling friends from different cities to play together. They also intend to introduce theme packs for the Word Builder mode, starting with coding-related terms such as LOOP, ARRAY, and CLASS. Additionally, a global leaderboard is in the pipeline.

As a Software Engineering student at IMSciences, Peshawar, the reporter encourages feedback on potential future modes, inviting suggestions on what additional features should be incorporated next.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

Also reported by 1 other outlet

Read the original at dev.to โ†’

More in Tech

More from Friday 16 October โ†’