Hot answers tagged c++
7
Intel's compiler is just a different compiler. GCC++ and VC++ produce production quality code, just as well as Intel's ICC does. The main difference lies in 4 key areas:
a) Features supported (mostly differing on C++11 features)
b) Executable size
c) Runtime
d) Compile time
When you're trying to squeeze every last bit of performance out of (mostly) ...
7
Many non-PC platforms, including some consoles and handhelds, use a modified GCC as their primary/only compiler.
On the PC, most game dev houses just use Visual Studio's compiler. The choice of compiler typically has little impact on runtime speed compared to engine design and graphics, they all paid for Visual Studio anyway due to its feature set as an ...
4
Yes, it can be used for AA games.
The reason almost every AAA games out there (if not all) use commercial compilers is the fact that commercial products usually have support and you can complain or get help 24/7 or just ASAP when dealing with any problem you might have and in the AAA industry, times means money. Big teams and companies, specially the ...
4
There are plenty roles in Gamedev. business, each role splits at least into a dozen, if you want to work at some company as a game developer here are some roles you can pick:
Artists: http://en.wikipedia.org/wiki/Game_art_design
GUI Artists, concept artists, general 2d artists, 3d artists, 3d sculpters, 3d animators,
pixel artists..
Game ...
3
1.
For a very simple game where you don't make a whole engine but just program the game as you please, this is enough, if you are able to learn things as you go along and the required math too (linear algebra comes to mind). For more complex games you either need to collaborate with artists and other content producers (3d-modelling if it's a 3d game), or if ...
3
For smooth shading, two adjacent triangles must share common vertex normals. The reason is interpolation. The normal from one vertex is smoothly interpolated to the normal on the second vertex. You need to ensure that the normal of triangle at a particular vertex matches the normal of all adjacent triangles at that same vertex. If you think of a smooth ...
2
First of all, you probably meant to subdivide into rectangles, not squares. The problem is generally not solvable with squares.
Now, if you want to split your region into rectangles given an arbitrary number of rectangular holes, then I have a strong feeling it's an NP-hard problem. Which means you probably don't want to solve the problem in the best ...
2
If storage size is your main concern, using vector<bool> is probably actually your best bet. This is because vector<bool> is optimized to use one bit per bool instead of one byte (see reference here). From there for file read/write just make sure to write the capacity of the vector<bool> to file then use the same one bit per bool/spell ...
2
g++ allegroTemplate.cpp -o allegroTemplate
You aren't linking with Allegro. With Allegro 4, it's recommended to use the allegro-config command, like
g++ souce.cpp -o game $(allegro-config --libs)
If you are just getting started, you really should take a look at Allegro 5 instead. It has integrated OpenGL support and is actively being developed, ...
1
You'll want to more than just add velocity every frame. That's basic Euler math, but doesn't work properly in a time sliced environment. Specifically, a variable framerate means that you'll get different results.
You'll want to do basic integration. There's a good article that goes into depth on that subject here: ...
1
Yes it would be inefficient. However it's up to you to decide if it is too inefficient. It depends on how often you would be calling LWJGL.
See http://stackoverflow.com/questions/7699020/what-makes-jni-calls-slow and http://192.9.162.55/docs/books/performance/1st_edition/html/JPNativeCode.fm.html. Chapter 9.2 Examining JNI Costs from the second link ...
1
You should know that this is hard coding, which you already know.
1- It's not enough just knowing how to code. There are mathematical subjects like trigonometry and algebra that are really useful and necessary when developing games (specially 3D ones). A little background on elementary physics is a good plus. In case you need guidance, there are books like: ...
Only top voted, non community-wiki answers of a minimum length are eligible