Piero V.

Zbar, GTK and Python 3

Last week, we had Hackweek at Tor. Instead of doing what we usually do, we worked on small Tor-related projects for 5 days. I chose to work with intrigeri and boyska from Tails to help them improving the pluggable transports on Tails.

There are several ways to get Tor bridges. One is requesting them to BridgeDB through email. The answer contains the bridge lines both as text and in a QR code. So, the first objective of our Hackweek team was to create a proof-of-concept to load these QR codes through a webcam.

Tails’s connection wizard is written in Python. A trivial approach is capturing frames from the webcam with OpenCV, then decoding them with pyzbar. This would have worked, but Tails is a live system, and an OpenCV installation requires a lot of space.

I soon discovered that OpenCV is the de facto way to deal with webcams in Python. I have tried some other alternatives, but they did not work. I have also tried to use a low-level approach based on the V4L2 API. But dealing with the conversion of color spaces and creating a generally reliable solution is burdensome. … [Leggi il resto]

Un po' di riflessione sulle GUI in Ogre

Quando ho un po’ di tempo cerco di portare avanti anche il mio progettino con OGRE, un tentativo di gioco FPS.

Purtroppo il tempo è poco e le decisioni spesso devono essere ponderate molto accuratamente, altrimenti succede quello che mi era già successo con l’altro gioco, ovvero viene fuori un disastro che non si può sistemare perché come si modifica una cosa bisogna sistemarne altre 100.

Perciò vado avanti piano piano ma scegliendo bene come fare tutte le cose.

Un elemento fondamentale di un gioco sono le GUI, almeno quelle che consentono di creare i menu basilari.

Per OGRE ho provato le più diffuse, CEGUI E MyGUI, e Gorilla.

Le prime due li ho provati appena avevo cominciato con OGRE, perciò l’opinione può essere considerata fino solo ad un certo punto.

CEGUI mi pareva molto complicata e ciò veniva detto anche sul forum di Ogre. Poi mi pare avesse un formato tutto suo un po’ strano.

MyGUI è molto più semplice. Il progetto fornisce anche degli strumenti che permettono di costruire graficamente la GUI. Il formato utilizzato è XML e mi pare abbastanza semplice. Il problema maggiore sono gli eventi: sono potenti, però devono essere implementati in C++, perciò i vantaggi dell’XML vengono meno. In seguito tornerò sul problema. … [Leggi il resto]