Making a "Game" using C: Where should I start?

Started by
10 comments, last by MasterMas 12 years, 9 months ago
Hi guys! I want to make a "game" using the language C. It's sort of a task that I was assigned to, but I have no prior knowledge in Game Programming so it's kinda bumming me out. There are lots of intricate details in the specification manual that I got which adds more stress :)) I've tried looking for tutorials in the internet, but I haven't seen one that would really help me so I came to this site (via friend recommendation).

So I'm asked to make this "game" wherein there is a walled environment (min size is 20 rows x 70 columns). So there is no real objective in this game. There are supposed to be 3 big blocks and then there is a character that is supposed to move in all directions (up, down, left, right, and diagonally). The user can generate food, and the user can also make that character eat the food. The user can make the character run (move 2x it's normal speed) and the user can also generate blocks, separate from those 3 blocks and the user can make the character move those blocks.

Another complicated thing is that the user should have the ability to change the character's color and the blocks beside it (Think of it as sort of like de Blob).

Soooooo, how do you guys suppose I start? Any help will be HIGHLY appreciated. Thank you and God Bless!


P.S. You guys can also reach me through:

chromium_salvation@yahoo.com
jerome_ibanez@dlsu.ph
jerome_ibanez@dlsu.edu.ph


Advertisement
[font=arial, verdana, tahoma, sans-serif][size=2]Learn C. Separate the input, the displaying of information and the game logic as clearly as you can. If you encounter problems making progress, post more specific questions.[/font]
Use a game engine instead, like GameMaker. C sucks anyway.

Use a game engine instead, like GameMaker. C sucks anyway.

At least C grants you a job in software industry unlike GM. ;)



Use a game engine instead, like GameMaker. C sucks anyway.


Its scary that new people get advice from someone like yourself. That was the most useless, un-informed post Ive seen in a while. C sucks anyway? What does that even mean?

EDIT: I just realized you started the thread about making a WoW clone in a summer with a friend. This is all clear now.
Never, ever stop learning.
- Me

...C sucks anyway.


That's an interesting comment coming from an aspiring game developer. I guess this person has never heard of Unix, Quake, or John Carmack.
Good judgment comes from experience; experience comes from bad judgment.
Start by learning C, as already suggested, then make a smaller game first, I would say. A "guess the number" game maybe, just to get the "feel" for it.

Solving these tasks basically mean breaking down the problem. It's fairly easy with your game, if you are a bit more experienced.


First, you need to display something (maybe just "place holder" "graphics"), but it's important to see what you are doing. Display something, then hard code the maze (manually filling out an "array" in the source code), then display it.

Then, "make the character": a little block that you can move around with the keyboard for example (during game development, you will implement lots of stuff that will be totally dropped later, but you will need those temporary quickly-hacked stuff to be able to test your important functions/features).

Next (if I understand correctly), you will need to perform some kind of order mechanism: implement input (to be able to determine to which "tile" the character needs to move). Then implement movement to that tile (discard walls at this point)

Next (if I understand correctly), you will need to implement "path finding", to avoid and navigate between walls.

After that, all the other fancy stuff should be pretty straightforward.


So: this task is a bit out of reach if you are a total beginner, start with something simpler, then move on to this "project".
Are you talking about making a DOS game?

If not, and working with only console application, then something you'll want to look into is how to clear the screen so that each new display is the only thing displayed.


EDIT: took out some bad information

Are you talking about making a DOS game?

If not, and working with only console application, then something you'll want to look into is how to clear the screen so that each new display is the only thing displayed. There are C libraries just for that that you'll want to look for.

http://www.cplusplus...cstdlib/system/

system("cls");

Is the function I've used in the past to clear the screen in a windows console application. It's part of the cstdlib. I've meddled with console based games before but the most I've made is a card game for which I used system("cls");

That's the only tip I feel comfortable with giving at this point, and alvaro gave good advice on how to start thinking about your project.

No, please don't do that. -When you can, avoid using system calls like that. Also C++ libs != C libs.
Chcek out this great tutorial if you want to create a proper Windows platform-dependent console application: http://www.adrianxw..../Consoles1.html
(And native console applications are always platform dependant. -Creating your own console in your favourite cross-platform graphics library is a possibility for platform independence...)
Thanks for the links guys!

By the way, I know how to use C, but like what I've said, I'm a total beginner :D

So how do you guys suppose i make the border of the game?

@Iggyt: Yep, I've thought of doing it like that, similar to those old text based RPGs.

This topic is closed to new replies.

Advertisement