Just Exploring the Creative Side of Code

Amrita SagarAmrita Sagar
3 min read

I wasn’t planning to build anything special.

One day during class, my professor briefly showed us how to change text color in the terminal. It was just a small example β€” but it caught my eye.

For the first time, I felt like... maybe code doesn’t have to look boring. Maybe it can be creative, colorful, even fun.

That tiny moment made me curious. I started exploring β€” adding colors, making text bounce, playing sounds, even showing popup boxes.

Eventually, I combined all these experiments into a small project: a console app that introduces who I am.

In this blog, I’m just sharing what I discovered β€” the features I used, how they work, and how even basic code can feel expressive when you give it a little personality.


🌟 Feature 1: Colored Text in Terminal

The first thing that caught my attention was colored text. Using the windows.h library, I learned how to control the color of any output.

#include <windows.h>

void setColor(int color) {
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), color);
}

Example:

setColor(10); // Light Green
cout << "This is green text!" << endl;

setColor(12); // Light Red
cout << "This is red!" << endl;

✨ Feature 2: Typing Animation (Text Appearing Slowly)

I wanted my app to feel like it was "talking" β€” so I created a simple typing effect.

void typeEffect(const string& text, int speed = 40) {
    for (char c : text) {
        cout << c << flush;
        Sleep(speed);
    }
    cout << endl;
}

Usage:

typeEffect("Welcome to my world of code!");

🎡 Feature 3: Beep Sound Effects

Adding Beep() made my app feel more dynamic. You can control the frequency and duration.

Beep(800, 200); // 800Hz for 200ms
Beep(600, 300);

I used this for transitions and fun interactions.


πŸŒ€ Feature 4: Bouncing Text

This was a fun effect! Using a loop and system("cls"), I created simple text animation that moves.

void bounceText(const string& text, int width = 30, int delay = 80) {
    for (int i = 0; i < width; ++i) {
        system("cls");
        for (int s = 0; s < i; ++s) cout << " ";
        cout << text << flush;
        Sleep(delay);
    }
    cout << endl;
}

Usage:

bounceText("Hello there!");

πŸ’¬ Feature 5: Popup Message Boxes

Using MessageBoxA() from windows.h, I displayed welcome and exit messages.

MessageBoxA(0, "Welcome to my app!", "πŸ‘‹ Hello", MB_OK | MB_ICONINFORMATION);

This gave the app a warm, friendly feel.


🎨 Feature 6: Background + Text Color Combo

I learned that you can combine background and text color:

SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), bgColor * 16 + textColor);

Example:

setColor(14, 1); // Yellow text on Blue background

It helped me organize and highlight different sections.


πŸ‘€ Feature 7: User Interaction

I added getline() to make it more interactive.

string name;
cout << "Enter your name: ";
getline(cin, name);
typeEffect("Nice to meet you, " + name + "!");

It added a personal touch.


🌿 Final Touch: My Console Portfolio App

After exploring these features, I decided to combine them into a personal project β€” a console portfolio app.

It shows who I am, what I’m learning, and what makes me curious.
It’s not fancy. It’s not perfect. But it reflects me.

try it -

https://github.com/AmritaSagar/ConsolePortfolioAPP/releases/tag/v1.0


πŸ”— GitHub Repository

You can find the complete code : https://github.com/AmritaSagar/ConsolePortfolioAPP.git


🌟 Closing Thoughts

I didn’t set out to build anything serious. I just followed curiosity.

And sometimes, that's enough.

If you're like me β€” learning, exploring, figuring it out step by step β€” try something small, personal, and creative.

You might end up enjoying code in a way you never expected.

Thanks for reading!

10
Subscribe to my newsletter

Read articles from Amrita Sagar directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Amrita Sagar
Amrita Sagar

I'm Amrita , an IT student passionate about coding and documenting my learning journey to share with others