View Single Post
  #2 (permalink)  
Old 10-17-2007, 09:51 AM
G_Morgan G_Morgan is offline
Guru
 
Join Date: Oct 2007
Age: 24
Posts: 506
Last Blog:
Just over the next hil...
Rep Power: 10
G_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura about
Default

If you're interested in production quality games then the game engine practically must be done in C or C++. Few other languages can produce the high performance code necessary. Take a look at the fast InvrSqrt function used in Quake 3. It uses a pointer cast of a float to an integer before doing a right shift, negating it and adding a magic number before reconversion to a float. That number then forms a good initial guess in the newtonian sqrt approximation method. This is far quicker than standard or even platform built in options (by about a factor of 4) for finding invrsqrt.

Beyond3D - Origin of Quake3's Fast InvSqrt()

Not possible in any language that is type safe.

Having said that it is possible to build the engine in C or C++ and then use a higher level language for everything else. It's quite common for game engines to have a built it interpreter.
Reply With Quote