Hi! i have to create a game , purely in C Language. How to start and how to end? what kind of game can i try to make? which IDE to use ? i cant run <graphics.> header file for graphics in any IDE. How to configure init() = (&gm, &gd, "C:\Tc\") in Turbo C. How to use simple code and not very complex code. Please help me out, i am very confused.

Your help would be appreciated.
Regards,
Techy23

Dani AI

Generated

A practical, low-friction path is to treat a first C game as a software project rather than a graphics problem. The Turbo C/<graphics.h> approach mentioned in the original post is tied to an old Borland/DOS toolchain and will cause compatibility headaches on modern systems. Follow the iterative development advice from : pick a small game, write the rules and play steps on paper, break each step into functions, implement and test one piece at a time. That sequence prevents getting stuck on setup when the real learning goal is game logic and structure.

Start with terminal projects (echoing ): number guessing, tic-tac-toe (with a simple AI), Hangman, or a text adventure. Each teaches core C topics (I/O, arrays/strings, state machines, and simple algorithms) without any graphics setup. After the logic is solid, replace the console renderer with a library: ncurses for terminal "graphics", or a lightweight C-friendly engine such as SDL2, Allegro, or raylib for windowed 2D. OpenGL is an option but has a steeper learning curve and is mostly about rendering, not game design.

Minimal example (number guessing) showing structure and an easy testable loop:

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(void) {
    int secret, guess;
    srand((unsigned)time(NULL));
    secret = rand() % 100 + 1;
    printf("Guess a number 1-100:\n");
    while (scanf("%d", &guess) == 1) {
        if (guess == secret) { printf("Correct!\n"); break; }
        printf(guess < secret ? "Higher\n" : "Lower\n");
    }
    return 0;
}

Practical notes: use a modern compiler (GCC/Clang/MSVC) and an editor or IDE like VS Code, Code::Blocks, or Visual Studio; avoid Turbo C. Keep presentation (input/output) separate from game logic so unit tests or simple console versions can validate behavior before adding graphics. Comments by and point to learning graphics later — that is sensible, but only after the core game loop and state handling are solid.

Recommended Answers

All 4 Replies

for starters I'd recommend text based games like sudoku, tictactoe, etc which are terminal based and should be easy to make
as for 3d games I'd usually go for C++ or Java because of the use of objects and ready made libraries but you could connect C with OpenGl for 3d purposes

you will know about graphice than you can creat game.

try to learn the graphics ist

How to start...

Same way you do with any program
1) decide what you want to make (without graphics)
2) write down how the game works
3) write down the steps it takes to play the game
4) expand each step until you can't expand it any more
5) write code to do one thing and TEST FULLY. Do not continue until this part works.
6) add one more thing to it (see #5)
7) continue until the game is complete.

and how to end?

Stop coding.

what kind of game can i try to make?

Something without graphics

which IDE to use ?

Whatever you want

i cant run <graphics.> header file for graphics in any IDE. How to configure init() = (&gm, &gd, "C:\Tc\") in Turbo C. How to use simple code and not very complex code.

Don't. You don't need graphics.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.