Multiple questions

Started by
2 comments, last by Simian Man 18 years, 5 months ago
Okay, I've been teaching myself basic C++ concepts/code/simply_C++ for a while (past two months, have become proficient enough for learning the library and maybe SDL) and I was wondering what exactly a game engine is and what it is supposed to do. Err, actually, more like what a graphics engine is supposed to do, what with me having sort of jumped around everywhere in this forum and seeing people having written their own graphics engines. I've also been wondering of what use bit-wise operations are. I've tried to think up of multiple things, but even my book doesn't give me a hint. Oh, and also, do multi-platform libraries get their multi-platform-ness from the pre-processor? And besides that possible trifle with multi-platforming, what other things can the pre-processor do? The book I'm reading only touched on it, and I assume that it is a nessecity for headers and stuff what with the #include, but what else does it do? Oh, and thank you for reading this; and double thanks in advance if you answer my questions >_<
*After Argument*P1: What was it about?P2: Something involving a chair, a cat, and a rubber ducky...
Advertisement
Quote:Original post by Atash
Okay, I've been teaching myself basic C++ concepts/code/simply_C++ for a while (past two months, have become proficient enough for learning the library and maybe SDL) and I was wondering what exactly a game engine is and what it is supposed to do. Err, actually, more like what a graphics engine is supposed to do, what with me having sort of jumped around everywhere in this forum and seeing people having written their own graphics engines.


It abstracts the graphics rendering part. For eg:- a rendering engine can load scenes, models, do multitexturing, do some good lighting etc(add in anything else related to graphics) and allow you to just use this framework for doing all the graphics for the game/demo you make. You could look at OGRE for an example of graphics engine - http://www.ogre3d.org/.

Quote:Original post by Atash
I've also been wondering of what use bit-wise operations are. I've tried to think up of multiple things, but even my book doesn't give me a hint.


http://www.eskimo.com/~scs/cclass/int/sx4ab.html
Search for more on google

Quote:Original post by Atash
Oh, and also, do multi-platform libraries get their multi-platform-ness from the pre-processor? And besides that possible trifle with multi-platforming, what other things can the pre-processor do? The book I'm reading only touched on it, and I assume that it is a nessecity for headers and stuff what with the #include, but what else does it do?


There are various ways to do multi-platform code - in general usage of #ifdef directive is common. The compiler can define the macro during compile time and stuff. If I were you I woudln't worry about it at this stage.


The more applications I write, more I find out how less I know
Thank you for the reply, although I think I might want to clarify my second question:

What are the general uses of bitwise operations? I mean something along the lines of a common usage (the text you linked me to had suggested retrieving digits within a number).
*After Argument*P1: What was it about?P2: Something involving a chair, a cat, and a rubber ducky...
The bitwise operators are only really useful when you are writing low-level. b In general are for extracting and putting information in the individual bits of a number. If you don't have to deal with bits on an individual basis, and mostly you won't, you won't need them.

And you should avoid the preprocessor as much as possible. For example using inline functions instead of #define etc. The reason for this is that the preprocessor does not know anything about types, or any other semantic-issues of the language. It only understands "symbols". This can lead to some hard-to-find bugs.

Good Luck

This topic is closed to new replies.

Advertisement