Posts

How to use MongoDB on travis-ci

Image
Using continuous integration for rainbrurph, I need the mongodb database and C libraries. Unfortunately, I had issue using it on Ubuntu Precise 12.04 LTS, the distribution used on travis-ci.

To make it work, we'll have to :
install database components from the official MongoDB repositories;manually build the latest release of the official C libraries;add /usr/local/ to ld.conf to make your build system discover the newly installed library.

Introducing headers-date

Image
As seen in my previous introducing posts, for example the libwsmeta and todoSummarizer ones, I'm currently freeing some private projects. So a few weeks ago, I released a new ruby project : headers-date.

When a new year starts, all headers of all projects must be updated with the new year. This project will help you search for copyright date and eventually sort these files.


RainbruRPG switched to revision 255

Image
RainbruRPG revision 254 is done and since the last announcement many client imporvements have been implemented :

In-game resolution change using Alt++ and Alt+- keybindings;configuration is saved after full screen status/resolution change;GUI is not scaling anymore;a temporary message prints the full screen status/resolution change;better screen resolution handling to avoid segfault on resolution change. You can download this release at github.
Next release will focus on new options handling and maybe a profile gamestate.

How to modernize your autotools scripts

Image
I have many old projects using autotools as build system, but for oldest projects, some files need to be updated.

How to make a map of variant in C++

Image
This code is used by RainbruRPG to store any scalar types in a single class instance. It's already in use since revision 254 to save game states values when switching fullscreen or changing screen resolution.
The map class It's basically a map of boost::variant using std::string as map key. I decided to use function template setter and getter to have a standardized exception-based error handling, but you could have multiple parameter-based specialized getter/setter (void set(bool), void set(int)...).

RainbruRPG switched to revision 254

Image
RainbruRPG v0.0.5-253 is over, a client-only work. Since the last release announcement, two revisions later, many client improvements have been implemented :

We added a FPS-related statistics geometry buffer to the MainMenu;The Alt+Enter key binding adds a real time full screen switch feature;You can take a .png screenshot using the F11 key. All these improvements are possible thanks to the game state handling of the client. You can download this release at github.
Next release will focus on new client improvements and a better Ogre3D reconfiguration mechanism. This will let us handle new keybindings for real time resolution change and maybe start to implement the Options game state.

List items conversion to string in python

Image
My last post about string handling was written in ruby. This time it's a one-liner I use for a private python-powered project.
It is inspired by two StackOverflow answers : how to convert all items in a list to floats
and how to change any data type into a string in python.

If you mix the two answers, the result code is [str(i) for i in <list name>]. Now let's see how to use in an interactive shell and in a PyQt4 example.