Some patches for fofix 3.121

Discussion particular to FoFiX, its development, and themes
Forum rules
This topic is 9 years and 10 months old. Instead of replying, please begin a new topic, or search for another related topic that may be more suitable.
zelurker
Member
Posts: 21
Joined: June 21st, 2007
Location: France
Reputation: 0

Some patches for fofix 3.121

Postby zelurker » Sat Apr 26, 2014 6:10 am

Well once every year I feel like playing with fofix or any clone of fof of the time.
This year it was phase shift, but contrary to what they are saying, it doesn't work with the latest wine, and there is no linux version.
So I went back to fofix, but the memory leak is really bothering, especially since I use it on a 1G machine.
So I just started to patch a few things.
For the memory leak I could only make it to slow down, it still grows, but slower. This leak seems to be only because of the fragmentation in python'heap so it's quite stupid.
Anyway I was wondering if someone was interested by these patches, it's never very convenient to release these.

EDIT again : well I made more patches for this than I expected, but it was quite fun (patching and playing !).
Anyway the result is not magic, the memory leak because of the horrible heap handling is still here, don't expect a miracle.
On the bright side : fully compatible with phase shift filles (at least those I found here, tested some guitar hero and rock band stuff).
- possibility to choose the starting position at any speed while training
- scores fixed, the name entered is really the one you type, and if you press esc no new score is added
- if you install scikits.samplerate : https://pypi.python.org/pypi/scikits.samplerate/0.3.3 then the short sounds will be resampled to sound correctly while training or while playing some songs which are not recorded at 44.1 KHz. Note that while training at a slow speed, the mixer is just opened at a low frequency to play the song slower, which doesn't sound too great but it's always been like that in fof/fofix. Maybe rubberband would help, but there are no python bindings and I didn't feel like adding some for now.
- Also some small fixes, like avoiding a crash when no track is found in a song, and no need to restart the game anymore when changing the neck.

EDIT : and now old primitive songs for fof are accepted, like the ones made by sectoid in 2006 (before he edited the midi files to make them compatible, but the problem is that debian is still distributing the old ones with fof), and some songs on the fof page are now accepted too. For now it works by listing the funny tracks id used by these songs, so it's very possible to find some which are using some still unknown ids, in this case you'll get a blank song, but I have tested quite a few of them, and at least all the songs distributed by debian are now accepted.

EDIT again : and got rid completely of the dreadfull .fofix-cache files. Having sqlite here is like hunting a moskito with a rocket launcher ! Plus it had bugs, you could get a crash by simply changing songs in a directory after a .fofix-cache file was created. Anyway the new system is faaaast, even the 1st time with some themes like rb2 (all the themes which don't need to display all the difficulties at the same time). And for those which need to really get these difficulties, it's now cached in the song.ini file instead, a new diff = line, you can even delete it if you want, it will be re-created in this case.
Also with linux it handles correctly songs which are read-only, it creates correctly its files in the ~/.fofix directory and switches between the read-only path and the read-write path when needed, and no more funny songs displayed twice in this case.

At this point it would be easy to add an in-game menu to change the speed and the position while training at will (without having to return to the song selection), but it will be for later.
The patches are based on the debian package for fofix, which had a few small changes.
Since it can be useful for linux or mac users I post the git url here, just in case : http://rainemu.swishparty.co.uk/cgi-bin ... ;a=summary
Last edited by zelurker on Thu May 08, 2014 10:25 am, edited 2 times in total.
User avatar
Rockslide
Member
Posts: 21
Joined: November 20th, 2009
Reputation: 0

Re: Some patches for fofix 3.121

Postby Rockslide » Thu May 08, 2014 7:57 am

Sign this person up for code updates. IDK if the stuff works yet, but it is the most code updating for FoFiX in along time. :thumbup:

Return to “FoFiX”

Who is online

Users browsing this forum: No registered users and 23 guests