Public Group

# hi there, nooby here

This topic is 4734 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

hello everyone, i'm not very new to game development but i haven't finished any games yet so i'm not a pro either. i mostly use blender3d which is a great open source modelling software www.blender3d.org and also a bit of programing in C. i also have knowledge in quickbasic and a bit of other languages that i haven't used for a long while such as html and pascal. so now i want to make my own little game in C and i kinda need some help because my knowledge in this language is still really bad. so i have a few questions which i hoped you could answer: 1)my compiler cant find the libraries, where do i tell them where they are? 2)how do i make my compiler write in different colors depends on the type of the command (at school he does that). 3)if you know maybe, how does the computer know how to draw a line? i mean i set the starting point and the ending point but how does he know where he should put the other pixels (this will really help me make a simple physical engine i have planned, it will fill each pixel with a different material, exactly in the same way he does with colors only different...make my own code like 1 is the character, 2 is walls and so on...i think it'll be very good to have such a thing for accurate detection collision). 4)how do i use the mouse? how do i make integers which have the same name but different numbers (should be easy like "int location(100,100)" only i think there is another command there. well that's all, hope you can help me out here. forgottensoul

##### Share on other sites
Welcome to GDNet.

I assume you mean your IDE rather than your compiler. An IDE, or Integrated Development Environment is a set of tools programmers use to aid them in developing programs, and usually includes such things as a text-editor, linker, compiler, and perhaps some debugging tools among other things. The compiler takes the code you write (in your IDE, or with a stand-alone text editor), and translates it into a form the computer can understand. If you tell us which IDE you're using I'm sure someone will be able to help out.

If you do actually only have a compiler and no IDE, then you have a few options for free IDEs you could get, including Dev-C++, Code::Blocks, and Microsoft's Visual Studio 2005 Express (specifically Visual C++), although since you're a beginner and are planning to work in C rather than C++ you may not want to use the Microsoft tools, which will allow you to work with C but may require some extra configuration to do so since they assume you'll want to use C++ and develop .NET applications.

Quote:
 2)how do i make my compiler write in different colors depends on the type of the command (at school he does that).

That's called syntax highlighting, and it's a feature offered by most IDEs out there. You can also get text-editors that support syntax highlighting for various languages.

For your other questions, I think it would be best if you first made sure you've covered the basics of the language if you're unsure about it. You can find some pretty good tutorials here [www.cprogramming.com] if you want to do that. Your question about the integers will be answered by reading about arrays (they're what you're actually talking about there) for example.

I hope that helps you out a bit, feel free to ask if you have any more questions or I didn't answer any of that properly. [smile]

##### Share on other sites
Quote:
 Original post by forgottensoulhello everyone, i'm not very new to game development but i haven't finished any games yet so i'm not a pro either. i mostly use blender3d which is a great open source modelling software www.blender3d.org and also a bit of programing in C. i also have knowledge in quickbasic and a bit of other languages that i haven't used for a long while such as html and pascal. so now i want to make my own little game in C and i kinda need some help because my knowledge in this language is still really bad. so i have a few questions which i hoped you could answer:1)my compiler cant find the libraries, where do i tell them where they are?2)how do i make my compiler write in different colors depends on the type of the command (at school he does that). 3)if you know maybe, how does the computer know how to draw a line? i mean i set the starting point and the ending point but how does he know where he should put the other pixels (this will really help me make a simple physical engine i have planned, it will fill each pixel with a different material, exactly in the same way he does with colors only different...make my own code like 1 is the character, 2 is walls and so on...i think it'll be very good to have such a thing for accurate detection collision).4)how do i use the mouse?how do i make integers which have the same name but different numbers (should be easy like "int location(100,100)" only i think there is another command there.well that's all, hope you can help me out here.forgottensoul

Well, you should probably learn more about C because it sounds like you still have a lot to learn. And of your questions, I find that only 4 is pretty easy to answer (the other ones you need a book for, can't really be explained in a couple lines). What you are looking for is called an array. You use it like this:

int* integers = new int[100];integers[40] = 5;

Notice that if you put 100 in the parentheses like I did, you can access indices 0 through 99, not 1 to 100.

##### Share on other sites
And as for your third question, have a look at Bresenham's Line Drawing Algorithm. It takes a start and end position in screen coordinates and then computes the pixels in between that should light up to show the line.

But as yaroslavd said, it is probably best to become fluent with your chosen language and working environment before trying your hand at any of this.

Good luck, Illco.

##### Share on other sites
Quote:
 Original post by forgottensoulhello everyone, i'm not very new to game development but i haven't finished any games yet so i'm not a pro either. i mostly use blender3d which is a great open source modelling software www.blender3d.org and also a bit of programing in C. i also have knowledge in quickbasic and a bit of other languages that i haven't used for a long while such as html and pascal. so now i want to make my own little game in C and i kinda need some help because my knowledge in this language is still really bad. so i have a few questions which i hoped you could answer:1)my compiler cant find the libraries, where do i tell them where they are?2)how do i make my compiler write in different colors depends on the type of the command (at school he does that). 3)if you know maybe, how does the computer know how to draw a line? i mean i set the starting point and the ending point but how does he know where he should put the other pixels (this will really help me make a simple physical engine i have planned, it will fill each pixel with a different material, exactly in the same way he does with colors only different...make my own code like 1 is the character, 2 is walls and so on...i think it'll be very good to have such a thing for accurate detection collision).4)how do i use the mouse?how do i make integers which have the same name but different numbers (should be easy like "int location(100,100)" only i think there is another command there.well that's all, hope you can help me out here.forgottensoul

Who’s this “he” you keep referring too?

##### Share on other sites
@Mike: A programming teacher of some sort

##### Share on other sites
he sounds like hes talking about the IDE

" i set the starting point and the ending point but how does he know where he should put the other pixels "

" how do i make my compiler write in different colors depends on the type of the command (at school he does that) "

sorry if i sound like a nimrod

##### Share on other sites
well, first of all: thanks to all. i'm glad this forum is full with helpfull people. i did forget to say what IDE i am using: Borland turbo c++.

1. 1
2. 2
Rutin
21
3. 3
A4L
15
4. 4
5. 5

• 13
• 26
• 10
• 11
• 44
• ### Forum Statistics

• Total Topics
633742
• Total Posts
3013629
×