How to Build a Portfolio Website with Game Mechanics in Codex
Let’s build three versions of a striking, memorable portfolio website. Ready-made prompts and videos of the results inside.

Imagine a client opens ten portfolios in one evening. The next day, they ask for the website of the designer whose site let them fly a spaceship. I wanted to build a hero section that people remember because of one simple action like that.

On the left is my pixel hero, in the center a spaceship among asteroids, and on the right a blue car by a garage.
Before You Start
Open an empty folder in Codex and pick one of the three options. The videos show desktop prototypes in the browser. I put the prompts together from the final versions and my working chats. Once the build is done, open the preview link or the index.html file.
Turn Yourself into a Pixel Hero
For Mario Concept, attach your photo, avatar, or character sheet. I used my own sheet. A blond side part and a black polo were enough for me to recognize myself in a tiny sprite.

On the left is the sheet I attached in Codex. On the right is the hero it drew from that sheet.
The hero collects a coin and opens Mentoring by hitting a brick from below.
Use this prompt
Build a desktop portfolio landing screen called Design Adventure in the current folder. Make it an original pixel-art platformer. Draw the player character from the attached photo, avatar, or character sheet. Preserve the reference's hairstyle, silhouette, and distinctive clothing details. Create separate poses for idling, running, jumping, and crouching. The jump pose must show exactly two legs. Fill the browser window with blue sky, clouds, hills, and grass. Center the two-line title DESIGN ADVENTURE. Place three bricks below it, labeled Cases, Mentoring, and Contact. Put a coin counter and a sound toggle in a corner, and display the controls at the bottom. After a short loading screen, zoom out slightly, reveal the clouds, and have the character enter from the left. Use the left and right arrow keys or A/D to move, W, the up arrow, or Space to jump, and S or the down arrow to crouch. Landing on a blue mushroom from above earns one coin. Touching it from the side makes the character flash briefly. When the character hits a brick from below, the brick bounces and its section opens. Clicking a brick makes the character walk over to it and jump automatically. Add a way to return to the level. Use HTML, CSS, JavaScript, and Canvas 2D. Open index.html in a browser and test the coin counter, jumping, all three navigation targets, and the return to the level. Explain how to launch the finished screen.
On the first jump, my hero grew a third leg. I asked Codex to fix the pose. In the recording of the final version, the hero has two legs again. In your version, try landing on the mushroom from above, then hitting the middle brick from below.

On the left is the first jump with an extra leg. On the right is the fixed pose from the final screen.
Turn a Button into a Target
Here, instead of bricks, I have three neon targets. After loading, the title rises from below, and the spaceship flies a loop and settles beneath them. In the recording, the planet in the background comes from an image. In the prompt, the background is drawn in code, so you don’t need any attachments.

The Cases, Mentoring, and Contact buttons became targets. The spaceship waits for your command at the bottom.
The spaceship dodges asteroids and opens Mentoring with the third hit.
Use this prompt
Build a space-themed landing screen for the Design Adventure portfolio in the current empty folder. Draw the stars, the dark horizon of a planet, neon targets, and a glowing spaceship in code. Center a large two-line title. Below it, place three targets labeled Cases, Mentoring, and Contact, each with its own icon and health bars. Add a shield with three charges and display the controls. Show a short loading screen. Then zoom the background out slightly, bring the title up from below with a perspective effect, and have the spaceship enter from below the frame. Let it fly a loop and settle at the bottom center. Pressing a movement key or Space immediately hands control to the player. Use the left and right arrow keys or A/D to move the ship horizontally. Press Space to fire upward. Asteroids fly toward the ship, and a collision costs one shield charge. The first hit leaves a crack in the target. The second makes the crack more pronounced. On the third hit, the target shatters, then its section opens. Clicking a target opens the section directly. Add controls to return to the flight scene and reset the flight. Use HTML, CSS, JavaScript, and Canvas 2D. Create all visuals locally, without attachments or external dependencies. In a browser, test the intro, dodging, three hits on the middle target, and returning to the flight scene. Provide the path to index.html.
In the browser, try dodging an asteroid with the arrow keys and hitting the same target three times with Space. After the first hit, a crack should appear, and after the second, it becomes more visible. After the third, wait for the shards and the transition.
Open a Section Through a Garage
In the first version, I was looking down at the car from above, as if it were sitting on a table. I asked Codex to lower the camera behind the car and stretch the road to the edges of the screen. That way, you can see the turn right from the start. This option also needs nothing but the prompt.

On the left is the first version with a high camera. On the right is the view from the start, closer to the car and the road.
Use this prompt
Build Design Circuit from scratch in the current empty folder. Make it the first screen of a portfolio, presented as a 3D racing scene. Fill the browser window with a beige desert and a road that starts at the bottom edge and splits into three branches. From left to right, place garages labeled Cases, Mentoring, and Contact. Keep all three signs visible from the starting position. Build a blue race car from simple shapes. Add two light-colored stripes, dark wheels, and a spoiler. Position the camera low behind the car so the player can see the track and its turns from the starting line. Place a large, translucent brown Design Circuit title behind the mountain silhouettes. After a short loading screen, have the car roll up to a checkered starting line while the camera moves slightly closer. Use the up arrow to accelerate, the down arrow to brake and reverse, and the left and right arrow keys to steer. Show the controls, speed, and a reset button. Driving into a garage opens the corresponding section. Let the player open a section directly by clicking its garage sign, and add a button to return to the track. Build the scene with HTML, CSS, JavaScript, and WebGL. Create the models and environment in code, without attachments or external dependencies. In a browser, test the approach to the starting line, entry into all three garages, and the return to the track. Provide the path to index.html.
Wait for the car to roll up to the start, accelerate with the ↑ key, and drive into the right garage. In the demo, it opens Contact. Then return to the track and check the other two routes.
The car turns right, drives into the garage, and opens Contact.
Start with One Action
Start with one section. Describe to Codex what the visitor sees, what they do, and how the site responds. For example, they see three garages, drive into the right one, and open the contacts. Replace the demo text with your own case studies and contacts. Check that the section also opens with a regular click.
If you want to take this hero section all the way to a website with your own case studies, in the “Portfolio Website with AI” course you’ll build it in Codex and publish it with a link you can share.
.jpg&w=3840&q=75)
%2520-%2520hover.jpg&w=3840&q=75)



