It is currently Tue Apr 25, 2017 7:17 pm

All times are UTC - 5 hours




 Page 1 of 1 [ 6 posts ] 
Author Message
 Post subject: 64 bit programing VS 2008
PostPosted: Tue Oct 07, 2008 7:44 am 

Joined: Sun Sep 21, 2008 5:27 am
Posts: 16
I ordered the DVD and downloaded a good portion of the video's in order to get started. I wish the physics was part of the game engine, what's a game without physics and the ability to shoot enemies?

Anyway, when I'm at the end of the series and get the kinks out of the regular 32 bit compile will I have trouble when I compile under 64bit?

I already set up my paths to 64 bit includes and libraries and have compiled 64 bit programs in the past but nothing this large.

If it doesn't compile would you make a VMK on how to convert it to 64 bit simular to how to go from 2003->2005->2008?

I think it's extremely important to know how to program in a 64 bit environment, I mean come on, this is 2009 already.

I wouldn't doubt if 128 Bit comes in the next couple of years but lets focus on what's at hand.

I still want to convert from OpenGL to Direct X, or how about in a future VMK in the options screen you have the ability to choose DirectX or OpenGL? Many games and emulators have this option.

MA


Offline
 Profile  
 
 Post subject: 64 bit and DirectX
PostPosted: Wed Oct 08, 2008 3:11 am 

Joined: Wed Aug 06, 2008 7:53 pm
Posts: 182
Location: Russia
Bukaroo7000 wrote:
will I have trouble when I compile under 64bit?

As far as I know, GameEngine (GE) does not rely anywhere on the size of the int type, nor uses address pointer arithmetic either. Thus, most likely you won't have any trouble compiling it for 64 bit OS. I can't give you a 100% guaranty yet 'cause I've completed only circa 1/3 of all VMKs.

One place, where 64 bit issue is important was mentioned here. But this is a later addition.

More interestingly is that you should not expect any noticeable performance gains of 64 bits. One indirect benefit is that in x86-64 mode 8 more general purpose registers (GPR) and 8 more XMM registers available. But there are some shortcomings as well, namely the longer machine code, bigger exe and so on.
The main advantage of introducing 64 bits (at least on Windows platform) was the expansion of virtual address space for applications. http://en.wikipedia.org/wiki/X86-64
32 bit means only 4GB (technically no more than 3GB available, because at least 1GB is used for OS internal purposes). But this is vital only for some special programs, such as databases etc with huge working set. The size of address space is not a problem for gamedev.

I don't agree with your anticipation of 128-bit future. Here are two issues. First, even the first Pentium generation of processors were equipped with 64 bit (MMX) and later 128 bit (XMM) SIMD (Single Instruction Multiple Data) extensions, so why we could need more? Second, there is really no need in wide GPRs. That is just a waste of space. Most of the time in general purpose programming the GPRs keep very small numbers. Only in very special calculations you deal with so big numbers that you need 128 bit to keep them. Again in these rare cases you can use 128 bit SIMD registers.
Recent several years reveal that chipmakers in their attempts to augment CPU crunch power had to choose the increase of the number of the CPU cores. bitness does not improve performance. The rise of core frequency is also not an option due to some technical and physical restrictions (e.g. power consumption).

About DirectX.
I also would like to see GameEngine being compatible with DX.
Right now I consider this task as a good homework after the main GE framework will be completed.

Frankly, you have a lot to learn staying with current DX-free version of GE. 8)


Offline
 Profile  
 
 Post subject: Re: 64 bit programing VS 2008
PostPosted: Wed Oct 08, 2008 7:09 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1094
Location: Ontario Canada
Bukaroo7000 wrote:
I wish the physics was part of the game engine, what's a game without physics and the ability to shoot enemies?


That's the reason why I started the Physics engine series. It starts off where the game engine series stopped.

Bukaroo7000 wrote:
If it doesn't compile would you make a VMK on how to convert it to 64 bit simular to how to go from 2003->2005->2008?


VMK45 in the game engine series shows how to convert the code from 2003 to 2005. I don't think you'll have any problems going from 2005 to 2008.

Bukaroo7000 wrote:
I still want to convert from OpenGL to Direct X, or how about in a future VMK in the options screen you have the ability to choose DirectX or OpenGL? Many games and emulators have this option.

Converting the game engine to use DirectX rather than OpenGL is pretty trivial. You can keep most of the code the same, you'll just need to implement different calls to do all the rendering.

If I get some spare time, I'll make a few videos showing how to convert the engine over to DirectX.


Offline
 Profile  
 
 Post subject: I think I understand
PostPosted: Wed Oct 08, 2008 4:16 pm 

Joined: Sun Sep 21, 2008 5:27 am
Posts: 16
What your saying now.

64 bit or higher seems to be necessary in order to access larger forms of information, more memmory, larger data bases and so forth.

In the case of this engine the system is not so much complicated as to warrant a 64 bit processor.

I was thinking in the terms of when I played Far Cry when they came out with the 64 bit patch, the game had exclusive content to 64 bit processors. I guess I expected to be able to create better games in a 64 bit environment.

I certainly don't expect to do anything serious in the near future and really am using this game engine as a learning tool that you can't get from too many other sources.

I took C++ in college but didn't get half this info.

As far as stating that I hoped that the physics engine was part of the Game Engine I was refering as part of the complete package on the DVD and what not.

I beleive I will run out of Ratio Space before I get the whole set of lessons down loaded and I really didn't want to invest much more than the cost of what I already spent on the DVD. My line of thought was that wandering around the Game Engine world is pretty pointless without interaction (hense the physics and/or collision routines) It just seems like the Engine is not complete without it and should be included in the DVD.

MA


Offline
 Profile  
 
 Post subject: So far 64 bits has not been
PostPosted: Fri Oct 31, 2008 11:49 pm 

Joined: Sun Sep 21, 2008 5:27 am
Posts: 16
A problem compiling.

I went through two days of debuging to get to the plain white window in VMK 3C. It was a pain because I am starting out with VC 2008 instead of 2003 then porting.

I compiled in 64 bits as a goof and so far not very much needed to be changed I think all I had to do was change a pointer to long and two other similar changes. After that I had a few warnings of things that are being phased out but it compiled and ran.

I suspect that later down the road I may run into newer problems but when I eventually get done with the game engine tutorial I will see if I can convert it over to 64 bits and create a log for anyone of the changes I do.

If anyone want to just convert the already completed 3D Engine code and post the changes go for it, I am going through the entire series verbatim so I can KNOW this code and it's going to be awhile before I get around to the conversion.

Bukaroo


Offline
 Profile  
 
 Post subject: 64 bit OS
PostPosted: Sat Nov 01, 2008 6:06 pm 

Joined: Wed Aug 06, 2008 7:53 pm
Posts: 182
Location: Russia
Interesting experience of yours. Sadly I don’t have 64-bit OS on tap, so my statements were mere theoretical.
Pardon, what 64-bit OS are you using, Vista or WinXP?
Immediately report all the problems you have met! ;)


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

cron