# Thread: Need help creating game with Turbo C

1. ## Need help creating game with Turbo C

Our prof wants us to create a game using turbo.
Could someone post codes of simple games that can be created using turbo C.

2. Well, that's not quite how this site works. We don't do your homework for you. We will help you solve your homework given that you show some effort (just the same type of help that your professor would give).

Of course, a game can be many things:
1 Simple "guess a number game"
2 tic-tac-toe.
3. Self-learning "twenty-questions to find an animal"
4. Text-action game, e.g. "snake".
6. Graphical "pong" game.
7. Graphical game, such as space invaders.

The requirement to solve each of those games vary in difficulty (I think I've roughly ordered it from easy to hard, and certainly the two latter ones are quite difficult if you want something that is both complete and fully functional - one could of course make simple versions of either).

So the first step for you would be to specify what sort of game you are expected to produce. I would expect that above 3 would be something you would be a "term task", rather than something you are expected to finish within a week or two - so a key to what is achievable would be how much time you are supposed to use for this task.

--
Mats

3. Can you just give me links that can has info about the functions I need to use to create games.
Our prof only taught us this functions

scanf
printf
if else

4. And now he expects you to write a game? Well, then it must be a pretty simple game, I'd say.

It is no point in me giving you links to more complex functions, as you most certainly haven't got sufficient experience to build anything more advanced.

With those functions, you can make a "guess a number" game - well, you may want to use while or for to make a loop as well.

--
Mats

5. He said childish game like that guessing ........ isn't allowed.
We need to make tic tac toe, snake, space impact, etc.

6. You can make a tic tac toe. But a snake or space invaders or asteroids is completely impossible with basic I/O functionality.

7. thanks at least i know i can make one using those functions he taught us

8. Originally Posted by CornedBee
You can make a tic tac toe. But a snake or space invaders or asteroids is completely impossible with basic I/O functionality.
I've played an ASCII Space Invaders clone.

9. Originally Posted by samGwilliam
I've played an ASCII Space Invaders clone.
Yes, but at the very least, you would need a "position the current output here" type function (e.g. gotoxy()), so using STANDARD I/O functionality is not possible here, which is what the original message says.

--
Mats

10. I thought gotoxy was part of the standard IO. It must be in conio.h, then. Sorry, it's been a while since I made a text mode game.

11. Originally Posted by samGwilliam
I thought gotoxy was part of the standard IO. It must be in conio.h, then. Sorry, it's been a while since I made a text mode game.
It may well live in stdio.h in some header files - but it is not part of the C standard, and for example Visual Studio doesn't have a gotoxy function at all - you can quite easily make one from available Console API's, but that's not the point here.

--
Mats