Sign in to follow this  
Atash

Multiple questions

Recommended Posts

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 >_<

Share this post


Link to post
Share on other sites
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.


Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this