Every one programmer wanted build his own game. I started too.
For game We need:
First what We need is set up our develepment environment. To do that we need build and install some libraries and header files (these are files that tells our programs how to use thous libraries).
So lets start:
For game We need:
- Graphic Engine (Ogre3d)
- Physic Engine (Bullet)
- Glue between Graphic and Physic (OgreBullet).
First what We need is set up our develepment environment. To do that we need build and install some libraries and header files (these are files that tells our programs how to use thous libraries).
So lets start:
- You need ogre it self:
- Dowload OGRE 1.7.2 Source for Linux / OSX
- Build it (From OgreWiki)
sudo apt-get install build-essential automake libtool
sudo apt-get install libfreetype6-dev libfreeimage-dev libzzip-dev libxrandr-dev libxaw7-dev freeglut3-devNot Strictly Required Dependencies
sudo apt-get install nvidia-cg-toolkit libois-dev libboost-thread-dev
Quick Build
tar xjf ogre_src_v1-7-2.tar.bz2
cd ogre_src_v1-7-2
mkdir build
cd build
cmake ..
make -j2The -j2 specifies how many parallel compilation jobs to run. Substitute the number of processor cores on your system, e.g. -j2 for a dual-core, -j4 for a quad core...
sudo make install
sudo ldconfig
- Next You need Bullet
- Dowload bullet-2.77.zip
- Compile and install Bullet (From AddonForum)
cmake . -G "Unix Makefiles" -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebugInfo -DBUILD_EXTRAS=ON -DINSTALL_EXTRA_LIBS=ON
make -j2The -j2 specifies how many parallel compilation jobs to run. Substitute the number of processor cores on your system, e.g. -j2 for a dual-core, -j4 for a quad core...
sudo make install
sudo ldconfigi need some little tests to test is needed here to copy some libs and make symbolic links for thous.
Here We need some libs from Bullet (Extras/ConvexDecomposition/libConvexDecomposition.so.2.77) copy to /usr/local/lib and make symbolic link to it self, but haven't test it yet.
- Last think what We need to build is OgreBullet
- Download OgreBullet and extract it
tar xjf bullet-2.77.tgz
cd bullet-2.77
- Update Collisions/src/Makefile.am in OgreBullet source folder (just add in the end off it )
libOgreBulletCol_la_LIBADD = \ $(OGRE_LIBS) \ $(bullet_LIBS) \ -lConvexDecomposition
or Use (like i done) this patch and execute in root folder of OgreBullet:patch -p0 < linux_demo.patch
- Compile and install it:
chmod 755 autogen.sh
./autogen.sh
(if you use -DINSTALL_EXTRA_LIBS=ON in bullet configuration)CXXFLAGS=-I/usr/local/include/bullet/ConvexDecomposition ./configure
make -j2
The -j2 specifies how many parallel compilation jobs to run. Substitute the number of processor cores on your system, e.g. -j2 for a dual-core, -j4 for a quad core...sudo make install
sudo ldconfig
Ill post to some of my tests with OgreBullet after some time.
So that all, fill free to comment.
I get OgreBulletCollisionsRay.cpp:87:132: error: invalid conversion from 'const btCollisionObject*' to 'btCollisionObject*' [-fpermissive] when running maek
ReplyDeleteHave same problem. Is there exists solution for this issue?
ReplyDelete