Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RakNet
#1
I still like to use free and functional libs even if a little old so long as they still serve their funtion I'm happy. So while looking into doing a network project, I reviewed what some of my students did a while back producing Battlehips. Its a great game and cross platform. One of the most complete examples of cross platform work I've ever had from 1st years.

And they used RakNet for networking. A nice lib I have used many times in the past, which was originally free or low cost for indie developers when I was coding in anger. Its since been bought out by Oculus as they wanted to develop networking libs, which in turn meant it was bought out by Facebook.

And Facebook did something nice, they made it freely available to all via a git hub so we can all use it.
https://github.com/facebookarchive/RakNet

As its not been touched for a long time there are a couple of quite minor issues with it, mainly because modern compilers don't like a particular line in ReplayManager3.cpp which needs to be edited so that line 141 where it says  == false is changed to == nullptr

There's a few steps to this, in a console on your SBC enter

sudo apt-get install cmake -y
git clone https://github.com/facebookarchive/RakNet.git /home/pi/RakNet
cd
cmake .


now open up a text editor on your system and do theedit to ReplayManager3,  oh and this is important, if you are using a 64bit OS you do also need to comment out line 24 of FileList.cpp, or it won't build on Arch64

once you've made and saved the edits go back to your console and do this
make
make install

And its built, you'll get a few warnings but it wil be ok, if your system throws out an error though, we might be stuck, let me know. Next move the lib into a more useful space on your system using these console commands

sudo mv Lib/LibStatic/libRakNetLibStatic.a /usr/local/lib
sudo mv include/raknet /usr/local/include/

Done.. you can keep the source and build files if you want but they don't get used, you've sent the important files to your system, and can be incorporated into your project

You can remove with this command.

rm -rf /home/pi/RakNet
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)