compatible for windows, sprite calculation