Jan 26, 2013 - Sudden FPS drop in F.E.A.R (Logitech hardware)

Comments

Some users have noticed that they cannot play the game F.E.A.R. (or Condemned: Criminal Origins) with a high framerate, even though their machine is powerful enough for running 5 instances of the game simultaneously. Even weirder is the fact that the game will usually start with the correct framerate but will suddenly drop to 10-20 FPS, after some seconds or minutes. With such a low framerate, it gets difficult to play with pleasure.

You won't let Alma run away from you at 15 frames per second, will you?

If the user has Logitech hardware peripherals, then the source of the problem is already known among the community of players. However, the workarounds presented in every place I visited are far from being confortable to the user.

In this post I present you a simple workaround for the problem that almost feels like a fix.

According to this link, the problem lies in the fact that the game engine overpolls the USB I/O in Windows 7 when Logitech Human Interface Devices (HIDs) are connected to the computer. Some users have reported that disabling the Human Interface Device Access service is enough to fix this issue, but I could not reproduce it.

The usual workaround is to disable all HIDs that belong to Logitech devices from the Windows Device Manager. When they are disabled, special controls like keyboards' volume up/down keys will not work anymore. So, if users make use of these controls they will need to keep enabling the HIDs after playing F.E.A.R.

The transparent workaround

I have created a simple batch script that automatically disables the HIDs and runs the game. Then, when the game quits, the script automatically enables the HIDs.

There is only one requirement besides the actual script: the devcon command-line utility, though it can also be downloaded from this page.

Make it work

Download the following files:
  1. devcon (32-bit) or devcon (64-bit);
  2. the script;
Follow the steps:
  1. Extract the devcon executable to the game directory (where the game executable is);
  2. Copy the script also to the game directory;
  3. The script is only ready for the multiplayer version of F.E.A.R., or F.E.A.R. Combat. Edit the script with a text editor and change FEARMP.EXE to the desired game executable;
  4. Create a shortcut to the desktop and change its icon if you want... you will be playing the game using the script from now on;
  5. Make sure you run it as an administrador and let UAC (User Account Control) proceed. Right-click the script, select Compatibility and check "Run this program as an administrator";
Troubleshooting:
  1. You can mess with the script until it fits your system properly, in case your hardware isn't compatible with the script, though I am using the vendor ID 0x046D, which is Logitech's;
  2. You can lose all keyboard and mouse input to your computer in case the script doesn't fit your hardware properly. If that happens, grab another mouse or keyboard, go to the Device Manager and enable all Human Interface Devices;
  3. The mouse may stop working for one or two seconds when the script is being executed, but that's normal.
References

  1. F.E.A.R. - Logitech/FPS fix
  2. F.E.A.R - Low FPS + random freezes
  3. F.E.A.R. - FPS / Logitech fix
  4. FEAR Horrible FPS Issue
  5. G5/G7/G15 + FEAR ! Solved ! (F.E.A.R.)

Oct 31, 2012 - Aplicação: Serviços Académicos da Universidade de Aveiro

Comments

Anuncio o lançamento da aplicação SACUA ou Serviços Académicos da Universidade de Aveiro, que permite a qualquer utilizador da Universidade de Aveiro consultar os números atuais das senhas dos serviços académicos sem ter de aceder propositadamente ao PACO ou outra interface web, bastando para tal ter este programa instalado no computador pessoal.

Este software resulta de um fork de conteúdo que virá a ser integrado na próxima versão do DETI-Interact, um sistema de interação com ecrãs públicos presente no hall de entrada do Departamento de Eletrónica, Telecomunicações e Informática (DETI) melhorado por mim por forma a suportar interação através do sensor Kinect.

O SACUA pode ser descarregado no final desta página.

O SACUA é tornado possível através do Academic Playground & Innovation.


Sistemas operativos: Microsoft Windows 7/8

Downloads:
31/10/2012|SACUA versão 1.0

Aug 31, 2012 - Colloquium of Robotics and Cybernetics

Comments


In 1998, Kevin Warwick connected his own nervous system to a computer. The deed transformed the expert in Cybernetics of the University of Reading in the world's first cyborg. The unusual and sometimes controversial English Professor is one of the presences at the Colloquium of Robotics and Cybernetics that the University of Aveiro (UA) organizes on October 13, 2012.

Para a versão portuguesa: Colóquio de Robótica e Cibernética.

The meeting will also bring to Aveiro scientists from FESTO, the German enterprise which has been surprising the world by showing the excellence of their robots. To seduce and motivate students for the scientific areas of robotics and cybernetics is the main goal of the colloquium organized by the Union of Students of Computer and Telematics Engineering (NEECT – Núcleo de Estudantes de Engenharia de Computadores e Telemática) of UA.

Another important highlight of the event is the solidarity campaign which will promote the collecting of plastic covers to aid financing a bionic hand to Rodrigo Hipólito, a boy who was born without the right-hand. The child's mother initiated months ago a help request buy a myoelectric hand (much cheaper than a bionic hand), whose price is over 8500 €. The organization is also going to deliver part of the inscriptions' income to the child.

Schedule


10:00
Opening Ceremony
      Higino Vieira, Coordinator of NEECT
      Tiago Alves, President of AAUAv
      Prof. Arnaldo Martins, Director of Department of Electronics, Telecommunications and Informatics
      Prof. Manuel Assunção, Rector of the University of Aveiro

11:00 The Cyborg Experiments
      Prof. Kevin Warwick, University of Reading (UK)
      The World's first cyborg!

12:00 Lunch

13:00 Joana Ferreira, GoBionic
      Responsible for the maintenance of bionic and mioelectrical limbs

14:00 Human-machine cooperation and Bionic-learning from nature
      Elias Knubben and Alexander Hildebrandt, FESTO
      Creators of SmartBirt, CognoGame, ExoHand, AirJelly, amongst others.

15:30 Coffee break

16:00 CAMBADA Project, Univ. of Aveiro
      Former World Champion Team of Robotic Football

17:00 The Portuguese Society of Robotics and the Robotics in Portugal
      Prof. Pedro Fonseca, Univ. of Aveiro


18:00 Workshops CAMBADA 
      ATLASCar
      CAMBADA Multiagent
      CAMBADA @Home
      Humanoids
      CAMBADA robotics soccer team


19:00 Closing Ceremony


Aug 31, 2012 - Colóquio de Robótica e Cibernética

Comments


Em 1998, Kevin Warwick ligou o próprio sistema nervoso a um computador. O feito tornou o especialista em Cibernética da Universidade de Reading no primeiro ciborgue do mundo. O invulgar e, por vezes, polémico professor universitário inglês é uma das presenças do Colóquio de Robótica e Cibernética que a Universidade de Aveiro (UA) organiza a 13 de Outubro de 2012.

For the english version: Colloquium of Robotics and Cybernetics.
O encontro vai trazer também a Aveiro cientistas da FESTO, a empresa alemã que tem deixado o mundo boquiaberto com a excelência dos seus robots. Seduzir e motivar os estudantes para as áreas científicas da robótica e cibernética é o grande objetivo do colóquio preparado pelo Núcleo de Estudantes de Engenharia de Computadores e Telemática (NEECT) da UA.

É ainda de destacar a realização de uma campanha solidária associada ao evento e que vai promover a recolha de tampas de plástico para ajudar a financiar uma mão biónica a ser entregue ao Rodrigo Hipólito, que nasceu sem a mão direita.. A mãe da criança tem em curso já há alguns meses um pedido de ajuda para comprar uma mão mioelétrica (mais barata do que uma mão biónica), cujo custo ascende os 8500 €. A organização vai entregar também à criança parte das verbas obtidas com as inscrições dos participantes no colóquio.

Programa


10:00 Cerimónia de Abertura
      Higino Vieira, Coordenador do Núcleo de Estudantes de Engenharia de Computadores e Telemática (NEECT)
      Tiago Alves, Presidente da Associação Académica da Universidade de Aveiro (AAUAv)
      Prof. Arnaldo Martins, Director do Departamento de Electrónica, Telecomunicações e Informática
      Prof. Manuel Assunção, Reitor da Universidade de Aveiro

11:00 A Experiência de um Ciborgue
      Prof. Kevin Warwick, Univ. Warwick (Reino Unido)
      O 1º Ciborgue do Mundo!

12:00 Almoço

13:00 Joana Ferreira, GoBionic

      Responsável pela manutenção de membros mioeléctricos e biónicos.
14:00 Interação humano-máquina e Aprendizagem biónica através da natureza
      Elias Knubben e Dr. Alexander Hildebrandt, FESTO (empresa alemã)
      Responsáveis pela criação do SmartBirt, CognoGame, ExoHand, AirJelly, entre outros.

15:30 Coffee break

16:00 Projecto CAMBADA, Univ. Aveiro
      Equipa campeã mundial de futebol robótico

17:00 A Sociedade Portuguesa de Robótica e a Robótica em Portugal
      Prof. Pedro Fonseca, Univ. Aveiro

18:00 Workshops CAMBADA
      ATLASCar
      CAMBADA Multiagentes
      CAMBADA @Home
      Humanóides
      CAMBADA equipa de futebol robótico

19:00 Cerimónia de Encerramento


Jun 6, 2012 - Getting PrimeFaces mix of Selects, Objects and Converters to work

Comments

If you are having problems with the AJAX Select components from PrimeFaces when selecting Java objects, inside a DataTable or not, this solution might work for you.

If you have something like the following:
<p:selectOneMenu value="#{deviceBean.currentLocation}"
converter="locationConverter">

<f:selectItem itemLabel="#{deviceBean.currentLocation.name}"
itemValue="#{deviceBean.currentLocation}" />
<f:selectItems
value="#{deviceBean.locations}"
var="location"
itemLabel="#{location.place}"
itemValue="#{location}" />
<f:ajax event="change" execute="@this" render="@this" />

</p:selectOneMenu>

Your managed bean is something like my DeviceBean:
@ManagedBean
@SessionScoped
public class DeviceBean implements Serializable {

@EJB
private Backend backend;

private List locations;
private Location currentLocation;

public DeviceBean() {
locations = backend.getLocations();
}

public List getCurrentLocation() {
return currentLocation;
}

public Location getCurrentLocation() {
return currentLocation;
}
}

Your converter is something like:
@FacesConverter(forClass=Location.class,value="locationConverter")
public class LocationConverter implements Converter {

@Override
public Object getAsObject(FacesContext context, UIComponent component, String value) {
Location location = new Location()
// some operations to set the parameters of Location based on the String
return location;
}

@Override
public String getAsString(FacesContext context, UIComponent component, Object value) {
Location location = (Location) value;
String string;
// some operations to save the parameters of Location into a String
return string;
}
}

And the object you want to change is something like my Location:
public class Location {
private String name;

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}


And your Select doesn't work, e.g. it doesn't respond to the accept button nor gives any error or logging, then probably it's just discarding the new element you just selected (in my case, of type Location).

It discards it because the object returned by the converter's getAsObject method may not match any of the objects allowed in the locations list from the DeviceBean. If this is the cause, then it means Location doesn't have proper hashCode and equals methods, which are required by Java to check if two objects of the same type have different contents or not, among other things. Because the selectOneMenu requires an object that is on the list, as defined in value="#{deviceBean.currentLocation}", it just fails to do anything.

So, don't forget, get hashCode and equals to the data structures you need to check for equality, explicitily or not, like this (as generated by my NetBeans):
public class Location {
private String name;

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

@Override
public boolean equals(Object obj) {
if(obj == null)
return false;
if(getClass() != obj.getClass())
return false;
final LocationTest other = (LocationTest)obj;
if(!Objects.equals(this.name, other.name))
return false;
return true;
}

@Override
public int hashCode() {
int hash = 7;
hash = 83 * hash + Objects.hashCode(this.name);
return hash;
}
}

May 18, 2012 - Google Earth Plug-in and the ATL 10.00

Comments


While playing with the Google Earth Plug-in to integrate in a WebBrowser control of a WPF application I'm currently developing, I started getting this strange background text instead of the map/earth: ATL 10.00.
ATL 10.00
I needed to do two things to get my page working. one simple thing.


Update:  It seems my previous method could still fail in some random times and even throw beautiful IE script errors, so here's what's really going on:

The WebBrowser control will by default, for compatibility reasons, render pages as in Internet Explorer 7 standards. The Google Earth plug-in seems to currently have some compatibility issues with IE7, therefore problems can arise. In this case, the ATL 10.00 stays above the map, blanking it.

The Fix
Use the most recent version of Internet Explorer. In order to do this, you must declare a meta tag in your HTML page like the following (this enables IE9 in WebBrowser when it loads the page):
<meta http-equiv="X-UA-Compatible" content="IE=9"/>


First, I used a workaround which consists in delaying the creation of the Google Earth plug-in, thus avoiding a race condition as mentioned in issue 701 from the earth-api-samples:


function Init() {
if (google.earth.isSupported()) {
// timeout is required or google earth plugin may get into a race condition and die
setTimeout("google.earth.createInstance('map3d', initCB, failureCB); alert('done');", 500);
}
}

/* other functions like initCV and failureCB */

google.setOnLoadCallback(Init);
google.load("earth", "1");


Second, I made sure the #map_canvas is above everything, especially during loading.


My application initially hides the WebBrowser. If I displayed the WebBrowser before the loading timeout, I could see the map alright... but if I waited longer than the loading timeout and then displayed the map, I just got the ATL 10.00.


So I thought, maybe the map is always being rendered but the ATL 10.00 layer is above it. I set #map_canvas the style z-index: -1 and it worked properly!


#map_canvas {
z-index: -1;
/* etc */
}


My JS scripts are simple and small and I cannot reproduce ATL 10.00 in native Internet Explorer (in my case IE9) because, I suppose, the map is always visible with positive dimensions (instead of what happens in my WPF application).

Useful links: