Giter Site home page Giter Site logo

fofix / fofix Goto Github PK

View Code? Open in Web Editor NEW
411.0 32.0 89.0 45.15 MB

Frets on Fire X: a fork of Frets on Fire with many added features and capabilities

Home Page: https://fofix.org

License: Other

Python 98.11% Shell 1.04% GLSL 0.38% Makefile 0.02% Batchfile 0.21% Inno Setup 0.24%
python game rhythm-game guitar-hero rock-band fofix

fofix's Introduction

Frets on Fire X - FoFiX

FoFiX logo

This is Frets on Fire X, a highly customizable rhythm game supporting many modes of guitar, bass, drum, and vocal gameplay for up to four players. It is the continuation of a long succession of modifications to the original Frets on Fire by Unreal Voodoo.

Tests Status Documentation Status [matrix] Latest packaged version(s)

Install

To install the game, you can read the installation guide.

Play

After installation, you will need to:

Contribute

If you want to contribute, you can follow the contribution guide (ou the local contribution guide).

License

The source code is licensed under the terms of the GNU GPLv2. Other licenses can be found in our license guide.

Useful links

fofix's People

Contributors

aefeinstein avatar akedrou avatar alvanson avatar cdgco avatar cxong avatar danieloneill avatar deathau avatar djlarsu avatar edelangh avatar erodozer avatar evilynux avatar fculpo avatar florianludwig avatar free5ty1e avatar jhoule avatar jose1711 avatar linkid avatar marcvinyals avatar maxxh avatar mdsitton avatar okonech avatar pablohn26 avatar qstick avatar salamandar avatar stump avatar thejasperv avatar vemel avatar wi24rd avatar worldrave avatar wrzwicky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fofix's Issues

Determine what we should do with pygame.

Currently pygame hasn't had a 'stable' release since August 2009 (for comparison FoFiX 3.121 was released December 2009).

I don't think the project is completely dead, but considering they are advertising new releases of PySDL2 in the news feed on their website....

We have been wanting to move up to python 3.x however there are currently some issues with this. Right now most distro's do not have pygame packaged for python 3. I'm guessing the current stable release has some incompatibility with newer python versions, but who knows.

We can still get mostly up-to-date development versions for windows from: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame

PySDL2 uses ctypes, and seems like it would be a good fit since the audio stuff could stay as it is now.

EDIT:
So i went through and edited it removed some inaccuracies about PySDL2.

I think we should definitely look into moving over to it because it would give us more control. We could also probably get rid of the dependency on pywin32 since i think we mainly use it for going around pygame bugs on windows.

Cache Scores in Sqllite

We already have a SongCache.sqllite which is rather nice. One problem that still exists though is that we're loading and writing scores from the files themselves instead of to the database. Make changes so then the database also holds the scores, this is create less problems and could allow one to store songs on read-only storage devices while still recording data to a writable partition, perfect for arcade machines.

Rewrite Lobby System

The code for the lobby system is rather messy and not well documented. If anything needs rewriting it's this, but with that also comes having to work with Players themselves.

no songs!!!

Hello
I want to play fofix,
but no sound http://wstaw.org/m/2015/09/11/plasma-desktopwb4441.png
i installed in this way

  1. install all deps
  2. git clone https://github.com/fofix/fofix.git
  3. cd /media/var/bin/fofix
  4. python2 setup.py build_ext --inplace --force
  5. python2 ./FoFiX.py

This is output
$ python2 ./FoFiX.py
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.0.29/work/alsa-lib-1.0.29/src/pcm/pcm_dmix.c:963:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Please help!

Gamepad Controller Profile (No Pick)

Add support to have a gamepad controller profile compatible with drums and guitar that only require tapping on time.

Figuring out the logic is the hardest part about this. Probably the best route would actually be rewriting how note striking input is actually read in seeing that what we have now seems to be overly complicated. Sadly this is a lot of work, best done in another branch.

I don't know how, but "how many notes in the music" is buggy

Hum.
I just got 100% on a music I did ~10 errors (even maybe 20 ?) (Firewind - Fire and the fury / hard).
I think the count of correct notes is okay (on-the-fly count).
So that's the pre-play count that is false (1379 notes).
I just compiled FoFiX from source (but fretwork is maybe a week old). What do you think is happening ?

Break down the code

There are some files that are obscenely long and contain way more data than need be. Divide up this code into multiple files and, if you can, into sub-packages for better source organization.

Missing keys in fofix.ini prevent start

fofix will show a window but crash when trying to enable shaders:

/FoFiX.py
SDL_JoystickNumHats value:1:
Terminating due to unhandled exception:

Traceback (most recent call last):
File "./FoFiX.py", line 278, in
main()
File "./FoFiX.py", line 233, in main
while engine.run():
File "/home/dex/fofix/src/GameEngine.py", line 823, in run
return self.mainloop()
File "/home/dex/fofix/src/GameEngine.py", line 681, in loading
self.view.pushLayer(self.startupLayer)
File "/home/dex/fofix/src/View.py", line 143, in pushLayer
layer.shown()
File "/home/dex/fofix/src/MainMenu.py", line 229, in shown
shaders.checkIfEnabled()
File "/home/dex/fofix/src/Shader.py", line 492, in checkIfEnabled
if Config.get("theme","shader_"+i) == "True":
File "/home/dex/fofix/src/Config.py", line 277, in get
return config.get(section, option)
File "/home/dex/fofix/src/Config.py", line 170, in get
type = self.prototype[section][option].type
KeyError: 'shader_neck'

fofix.log shows:
1.426245 Config key theme.shader_neck not defined while reading ~/.fofix/fofix.ini.

Guess this belongs to commit 237ccb4

My fofix.ini is generated by the program at start.

Support TextureAtlases for packing assets

Something relatively common to do in games is to pack a bunch of texture resources into a single set of files and "pack" them into an atlas. An atlas defines where in a single file those original textures are located and allows you to reference them by their original name. Atlases are used more when something is ready to be distributed, not when it is in production. Pairing an Atlas with SpriteBatching could also improve performance greatly as for many images only one texture bind would be necessary to draw them.

Ctype Wrappers for LibOgg/LibVorbis

PyVorbis is rather outdated and is an addition dependency. We're already using libvorbis-dev as a dependency for other things, we might as well just have a ctype wrapper to use with songs so then we can finally get rid of those python dependencies.

Switch from Collada to Obj

Collada is a little excessive for what we need in 3D. We don't use animations, and we need a complex 3rd party importer for everything about it anyway. It's easier and better to just use .obj file format to store vertex and texture coordinate data for 3D objects.

fofix is looking for missing ./data/songs/notes.mid

Ubuntu 14.04 desktop

When launching practice, seems the game is looking for ./data/songs/notes.mid
data/songs does not exist

Traceback (most recent call last):
File "FoFiX.py", line 288, in
main.run()
File "FoFiX.py", line 270, in run
while self.engine.run():
File "/fofix/fofix/core/GameEngine.py", line 601, in run
rtn = self.mainloop()
File "/fofix/fofix/core/GameEngine.py", line 583, in main
done = self.task.run()
File "/usr/local/lib/python2.7/dist-packages/fretwork/task.py", line 111, in run
self.runTask(taskData['task'])
File "/usr/local/lib/python2.7/dist-packages/fretwork/task.py", line 91, in runTask
task.run(tick)
File "/fofix/fofix/core/Input.py", line 319, in run
self.broadcastEvent(self.keyListeners, "keyPressed", event.key, event.unicode)
File "/fofix/fofix/core/Input.py", line 230, in broadcastEvent
if getattr(l, function)(*args):
File "/fofix/fofix/game/SongChoosingScene.py", line 851, in keyPressed
self.startGame()
File "/fofix/fofix/game/SongChoosingScene.py", line 528, in startGame
info = Song.loadSongInfo(self.engine, self.songName, library = self.libraryName)
File "/fofix/fofix/game/Song.py", line 3294, in loadSongInfo
return SongInfo(infoFile, library)
File "/fofix/fofix/game/Song.py", line 262, in init
songhash = hashlib.sha1(open(self.noteFileName, 'rb').read()).hexdigest()
IOError: [Errno 2] No such file or directory: u'/fofix/data/songs/notes.mid'

Forced HOPO

Also something already documented for parsing from the MIDI

Problem has always been that we just autogenerate HOPO. Instead we should autogenerate, then parse the midi and merge the lists. Having the game detect input and render HOPO should just be something as simple as checking for a boolean in the note as HOPO = True or not.

Add a Tween Engine

A lot of the graphics code consists of weird equations with linear interpolation dependent on the update cycle of the game itself.

In the effort to add a standard cycle clock with timer resolution, I propose we also add a engine that performs Tweening so we have a standard approach to animating static images and components in the screen space.

For reference on potential approaches, here are some example projects
https://code.google.com/p/tweener/
https://github.com/libgdx/libgdx/wiki/Scene2d#actions
https://code.google.com/p/java-universal-tween-engine/

Use ffmpeg2.8 where ffmpeg3.0 is installed

ffmpeg3.0 is not compatible with 2.8.
The error I got :

fofix/core/VideoPlayer/VideoPlayer.c:206:26: erreur : ‘PIX_FMT_YUV420P’ undeclared (first use in this function)

On ArchLinux, both can be installed together.

  • ffmpeg includes directory : /usr/include
  • ffmpeg2.8 includes directory : /usr/include/ffmpeg2.8
    There should be a CFlag -I/usr/include/ffmpeg2.8 in the makefiles !
    (or a call to pkg-config with ffmpeg2.8, not ffmpeg)

Bug in cerealizer ?

Fresh linux/python/fofix install.

Traceback (most recent call last):
  File "./FoFiX.py", line 156, in <module>
    from fofix.core.VideoPlayer import VideoLayer, VideoPlayerError
  File "/opt/fofix-git/fofix/core/VideoPlayer/__init__.py", line 1, in <module>
    from fofix.lib._VideoPlayer import *
  File "fofix/core/VideoPlayer/_VideoPlayer.pyx", line 100, in init fofix.core.VideoPlayer._VideoPlayer (fofix/core/VideoPlayer/_VideoPlayer.c:4286)
    from fofix.core.Input import KeyListener
  File "/opt/fofix-git/fofix/core/Input.py", line 39, in <module>
    from fofix.core.Player import Controls
  File "/opt/fofix-git/fofix/core/Player.py", line 34, in <module>
    from fofix.game import song
  File "/opt/fofix-git/fofix/game/song/__init__.py", line 1, in <module>
    from fofix.game.song.song import *
  File "/opt/fofix-git/fofix/game/song/song.py", line 36, in <module>
    import cerealizer
  File "/usr/lib/python2.7/site-packages/cerealizer/__init__.py", line 562, in <module>
    register(str       , StrHandler      ())
  File "/usr/lib/python2.7/site-packages/cerealizer/__init__.py", line 515, in register
    if Class in _HANDLERS_: raise ValueError("Class %s has already been registred!" % Class)
ValueError: Class <type 'str'> has already been registred!

What is the problem here ?

Create and Use a World Timer Resolution

A lot of the game uses hard-coded values or are dependent on game cycle speed to perform animations. Instead, we should be using a timer resolution (also refered to as DeltaTime by some) to be doing multiplicative, yet precise, tweening of values to ensure a consistent look and feel regardless of FPS.

Github build LNK1181 error (Windows 10 Home)

Whenever i do python setup.py build_ext --inplace --force, it sends an error:

command 'C:\Users\aPoC\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\link.exe' failed with exit status 1181

The entire command line:

Microsoft Windows [Version 10.0.10240](c) 2015 Microsoft Corporation. All rights reserved.

C:\Users\Filip>d:

D:>cd "Frets On Fire X"

D:\Frets On Fire X>cd src

D:\Frets On Fire X\src>cd fofix

D:\Frets On Fire X\src\fofix>python setup.py build_ext --inplace --force
checking for program pkg-config... .\win32\deps\bin\pkg-config.exe
checking for library ogg... ok
checking for library theoradec... ok
checking for library glib-2.0... ok
checking for library libswscale... ok
running build_ext
cythoning fofix/core/cmgl/cmgl.pyx to fofix/core/cmgl\cmgl.c
building 'fofix.lib.cmgl' extension
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\fofix
creating build\temp.win32-2.7\Release\fofix\core
creating build\temp.win32-2.7\Release\fofix\core\cmgl
C:\Users\Filip\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-ID:\Frets On Fire X\python\lib\site-packages\numpy\core\include" "-ID:\Frets On Fire X\python\include" "-ID:\Frets On Fire X\python\PC" -I.\win32\deps\include\msinttypes /Tcfofix/core/cmgl\cmgl.c /Fobuild\temp.win32-2.7\Release\fofix/core/cmgl\cmgl.obj /EHsc
cmgl.c
d:\frets on fire x\python\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
C:\Users\Filip\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\link.exe /DLL /nologo /INCREMENTAL:NO "/LIBPATH:D:\Frets On Fire X\python\libs" "/LIBPATH:D:\Frets On Fire X\python\PCbuild" opengl32.lib /EXPORT:initcmgl build\temp.win32-2.7\Release\fofix/core/cmgl\cmgl.obj "/OUT:D:\Frets On Fire X\src\fofix\fofix\lib\cmgl.pyd" /IMPLIB:build\temp.win32-2.7\Release\fofix/core/cmgl\cmgl.lib /MANIFESTFILE:build\temp.win32-2.7\Release\fofix/core/cmgl\cmgl.pyd.manifest
   Creating library build\temp.win32-2.7\Release\fofix/core/cmgl\cmgl.lib and object build\temp.win32-2.7\Release\fofix/core/cmgl\cmgl.exp
cythoning fofix/core/pypitch/_pypitch.pyx to fofix/core/pypitch_pypitch.cpp
building 'fofix.lib._pypitch' extension
creating build\temp.win32-2.7\Release\fofix\core\pypitch
C:\Users\Filip\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-ID:\Frets On Fire X\python\include" "-ID:\Frets On Fire X\python\PC" -I.\win32\deps\include\msinttypes /Tpfofix/core/pypitch_pypitch.cpp /Fobuild\temp.win32-2.7\Release\fofix/core/pypitch_pypitch.obj /EHsc
_pypitch.cpp
C:\Users\Filip\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-ID:\Frets On Fire X\python\include" "-ID:\Frets On Fire X\python\PC" -I.\win32\deps\include\msinttypes /Tpfofix/core/pypitch/pitch.cpp /Fobuild\temp.win32-2.7\Release\fofix/core/pypitch/pitch.obj /EHsc
pitch.cpp
C:\Users\Filip\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\link.exe /DLL /nologo /INCREMENTAL:NO "/LIBPATH:D:\Frets On Fire X\python\libs" "/LIBPATH:D:\Frets On Fire X\python\PCbuild" /EXPORT:init_pypitch build\temp.win32-2.7\Release\fofix/core/pypitch_pypitch.obj build\temp.win32-2.7\Release\fofix/core/pypitch/pitch.obj "/OUT:D:\Frets On Fire X\src\fofix\fofix\lib_pypitch.pyd" /IMPLIB:build\temp.win32-2.7\Release\fofix/core/pypitch_pypitch.lib /MANIFESTFILE:build\temp.win32-2.7\Release\fofix/core/pypitch_pypitch.pyd.manifest
   Creating library build\temp.win32-2.7\Release\fofix/core/pypitch_pypitch.lib and object build\temp.win32-2.7\Release\fofix/core/pypitch_pypitch.exp
cythoning fofix/core/VideoPlayer/_VideoPlayer.pyx to fofix/core/VideoPlayer_VideoPlayer.c
building 'fofix.lib._VideoPlayer' extension
creating build\temp.win32-2.7\Release\fofix\core\VideoPlayer
C:\Users\Filip\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Dinline=__inline "-ID:/Frets On Fire X/src/fofix/win32/deps/include" "-ID:/Frets On Fire X/src/fofix/win32/deps/include" "-ID:/Frets On Fire X/src/fofix/win32/deps/include/glib-2.0" "-ID:/Frets On Fire X/src/fofix/win32/deps/lib/glib-2.0/include" "-ID:/Frets On Fire X/src/fofix/win32/deps/include" -I. "-ID:\Frets On Fire X\python\include" "-ID:\Frets On Fire X\python\PC" -I.\win32\deps\include\msinttypes /Tcfofix/core/VideoPlayer_VideoPlayer.c /Fobuild\temp.win32-2.7\Release\fofix/core/VideoPlayer_VideoPlayer.obj /EHsc
_VideoPlayer.c
C:\Users\Filip\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Dinline=__inline "-ID:/Frets On Fire X/src/fofix/win32/deps/include" "-ID:/Frets On Fire X/src/fofix/win32/deps/include" "-ID:/Frets On Fire X/src/fofix/win32/deps/include/glib-2.0" "-ID:/Frets On Fire X/src/fofix/win32/deps/lib/glib-2.0/include" "-ID:/Frets On Fire X/src/fofix/win32/deps/include" -I. "-ID:\Frets On Fire X\python\include" "-ID:\Frets On Fire X\python\PC" -I.\win32\deps\include\msinttypes /Tcfofix/core/VideoPlayer/VideoPlayer.c /Fobuild\temp.win32-2.7\Release\fofix/core/VideoPlayer/VideoPlayer.obj /EHsc
VideoPlayer.c
C:\Users\Filip\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\link.exe /DLL /nologo /INCREMENTAL:NO "/LIBPATH:D:/Frets On Fire X/src/fofix/win32/deps/lib" "/LIBPATH:D:/Frets On Fire X/src/fofix/win32/deps/lib" "/LIBPATH:D:/Frets On Fire X/src/fofix/win32/deps/lib" "/LIBPATH:D:/Frets On Fire X/src/fofix/win32/deps/lib" "/LIBPATH:D:\Frets On Fire X\python\libs" "/LIBPATH:D:\Frets On Fire X\python\PCbuild" opengl32.lib ogg.lib theoradec.lib ogg.lib glib-2.0.lib intl.lib swscale.lib /EXPORT:init_VideoPlayer build\temp.win32-2.7\Release\fofix/core/VideoPlayer_VideoPlayer.obj build\temp.win32-2.7\Release\fofix/core/VideoPlayer/VideoPlayer.obj "/OUT:D:\Frets On Fire X\src\fofix\fofix\lib_VideoPlayer.pyd" /IMPLIB:build\temp.win32-2.7\Release\fofix/core/VideoPlayer_VideoPlayer.lib /MANIFESTFILE:build\temp.win32-2.7\Release\fofix/core/VideoPlayer_VideoPlayer.pyd.manifest
LINK : fatal error LNK1181: cannot open input file 'ogg.lib'
error: command 'C:\Users\Filip\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\link.exe' failed with exit status 1181

D:\Frets On Fire X\src\fofix>

Bass Drum Flames Hits aren't being display

Hello:

I'm trying fofix 4 alpha 2, but I notice that bass drum flames are not being display. The other notes do though. The only time I was able to see the flame is whenever I was about to activate a star power where I can do free style for a moment before activating the star power in the last note. If I used the drum bass then I was able to see the flame.

This didn't use to happen in fofix 4 alpha 1.

Thank you for your help.

P.S. Also, is there a place I can donate? Thank you.

Custom Drum's Fret Buttons glitches

Hello again :)

I think this will be my last bug report :P for 4 alpha 2

The only theme I have found so far for for fofix 4 alpha 2 is this one:
http://www.fretsonfire.net/forums/viewtopic.php?f=17&t=54270&sid=2cda1bb617fa405acec1b66ede33563f

This theme has the following very cool Custom Drum's Fret Buttons:

http://postimg.org/image/huii9tlil/

Unfortunately using them with alpha 2 is not working right, and I'm pretty sure is not the theme's fault.

When ever I try to use the Custom Drum's Fret Buttons, each time I hit any of the frets the right next fret also lights up. For instance hitting fret one also lights up fret two. Also, while hitting frets 4, the bass drum also appears hit. This is only in appearance since they won't actually count as hit in the game.

Hope I was able to explain my self right. If needed you could test what I'm talking about by downloading the Custom Drum's Fret Buttons from my link and putting it on frets/drum/fretbuttons.png of any theme .

Thank you very much.

Threaded Loading Scene

Make the loading scene when loading a Song threaded. By having it load things in a threaded run() method while the engine renders the layer with render(), this will allow one to finally have animated loading scenes. Only one pass needs to be made through run() to get everything loaded, and then it will send a trigger to the engine to pop the loading scene and put you in game.

Some issue, probably after a python2.7 update

Probably after a Python update, i cannot start Fofix (3.121) nor Fofix-git (v4.0.0alpha2.r244.gd21b0cc-1)

Traceback (most recent call last):
  File "./FoFiX.py", line 276, in <module>
    main()
  File "./FoFiX.py", line 175, in main
    engine = GameEngine(config)
  File "/opt/fofix/src/GameEngine.py", line 597, in __init__
    self.data = Data(self.resource, self.svg)
  File "/opt/fofix/src/Data.py", line 130, in __init__
    self.loadImgDrawing(self, "star1",   os.path.join("themes",themename,"star1.png"), textureSize = (128, 128))
  File "/opt/fofix/src/Data.py", line 583, in loadImgDrawing
    drawing  = self.resource.load(target, name, lambda: ImgDrawing(self.svg, fileName), synch = True)
  File "/opt/fofix/src/Resource.py", line 246, in load
    return l.finish()
  File "/opt/fofix/src/Resource.py", line 113, in load
    self.result = self.function()
  File "/opt/fofix/src/Data.py", line 583, in <lambda>
    drawing  = self.resource.load(target, name, lambda: ImgDrawing(self.svg, fileName), synch = True)
  File "/opt/fofix/src/Svg.py", line 516, in __init__
    self.texture = Texture(ImgData)
  File "/opt/fofix/src/Texture.py", line 66, in __init__
    self.loadFile(name)
  File "/opt/fofix/src/Texture.py", line 70, in loadFile
    self.loadImage(Image.open(name))
  File "/opt/fofix/src/Texture.py", line 77, in loadImage
    string = image.tostring('raw', 'RGBA', 0, -1)
  File "/usr/lib/python2.7/site-packages/PIL/Image.py", line 686, in tostring
    "Please call tobytes() instead.")
Exception: tostring() has been removed. Please call tobytes() instead.

A potential way forward...

So I've been thinking a lot about what we should do to move this project forward.

So i'm thinking we need to define a very basic set of features. Take all code that doesn't pertain to them and throw it out.

With the simpler code base start cleaning up general architecture of the game, replace dependencies, and work for python 3 compatibility. Once we get a good solid clean base then we can start adding some features back.

I mean its been 4 1/2 years since a 'stable' release and i think its time for a bit more drastic measures.

Thoughts?

MacOSX building does't work

I tried installing dependencies and compiling from source to help write the mac build instructions but i cannot figure out how to get it to build. I can do testing on mac. My computer is running 10.9

Clean up Settings

The Settings file itself is extremely hard-coded, and so is the ConfigDefs list.

We can move all of the definitions into a Json file easily, then let the system just load them all in. When there's an option missing, we can just add it to the Json instead.

We can also make quick-set preferences using a Json mapping as well to make things a whole lot faster and cleaner, instead of having a crap ton of if-statements and methods in the code that do nothing but set options.

Refactor many modules into Singletons/Globally accessible utilities

Passing down the engine instance to just about everything and having a self.engine everywhere is rather disgusting to the design. Instead we should make do by having the engine be a singleton.

Other classes can benefit from becoming singletons as well, such as the Resource loader, the View, so we don't have to go through the engine and data to do anything such as loading an image. The values returned aren't even managed by the engine so the old design's amount of coupling is pointless and adds design overhead where it is unneeded.

File Path Error

I got the following when I tried to load any song on my system (Linux Mint). Fixed seemingly without side effects (although it isnt a universal fix!) by changing line 2840 of fofix/songs/songs.py to:
os.chdir("{1}{0}{2}{0}".format(os.path.sep, "data/" + library, name))

FoFiX had successfully cached all of the songs I'd put into data/songs but wasn't looking on the right path to open them.

/home/sardines/.fofix/fofix.log
The log file already includes the traceback given above.
Traceback (most recent call last):
File "FoFiX.py", line 312, in
main.run()
File "FoFiX.py", line 294, in run
while self.engine.run():
File "/home/sardines/local/fofix-master/fofix/core/GameEngine.py", line 600, in run
rtn = self.mainloop()
File "/home/sardines/local/fofix-master/fofix/core/GameEngine.py", line 582, in main
done = self.task.run()
File "/usr/local/lib/python2.7/dist-packages/fretwork/task.py", line 114, in run
self.runTask(taskData['task'])
File "/usr/local/lib/python2.7/dist-packages/fretwork/task.py", line 89, in runTask
task.run(tick)
File "/home/sardines/local/fofix-master/fofix/core/Input.py", line 319, in run
self.broadcastEvent(self.keyListeners, "keyPressed", event.key, event.unicode)
File "/home/sardines/local/fofix-master/fofix/core/Input.py", line 230, in broadcastEvent
if getattr(l, function)(_args):
File "/home/sardines/local/fofix-master/fofix/game/SongChoosingScene.py", line 843, in keyPressed
self.startGame()
File "/home/sardines/local/fofix-master/fofix/game/SongChoosingScene.py", line 631, in startGame
self.engine.world.createScene("GuitarScene", libraryName = self.libraryName, songName = self.songName)
File "/home/sardines/local/fofix-master/fofix/game/World.py", line 124, in createScene
self.scene = SceneFactory.create(engine = self.engine, name = name, *_args)
File "/home/sardines/local/fofix-master/fofix/core/SceneFactory.py", line 36, in create
return getattr(scene_name, name)(engine = engine, **args)
File "/home/sardines/local/fofix-master/fofix/game/guitarscene/GuitarScene.py", line 1209, in init
self.engine.resource.load(self, "song", lambda: loadSong(self.engine, songName, library = libraryName, part = [player.part for player in self.players], practiceMode = self.players[0].practiceMode, practiceSpeed = self.players[0].practiceSpeed), synch = True, onLoad = self.songLoaded)
File "/home/sardines/local/fofix-master/fofix/core/Resource.py", line 239, in load
return l.finish()
File "/home/sardines/local/fofix-master/fofix/core/Resource.py", line 114, in load
self.result = self.function()
File "/home/sardines/local/fofix-master/fofix/game/guitarscene/GuitarScene.py", line 1209, in
self.engine.resource.load(self, "song", lambda: loadSong(self.engine, songName, library = libraryName, part = [player.part for player in self.players], practiceMode = self.players[0].practiceMode, practiceSpeed = self.players[0].practiceSpeed), synch = True, onLoad = self.songLoaded)
File "/home/sardines/local/fofix-master/fofix/game/song/song.py", line 2840, in loadSong
os.chdir("{1}{0}{2}{0}".format(os.path.sep, library, name))
OSError: [Errno 2] No such file or directory: 'songs/Guitar Hero III Legends Of Rock/DLC/DLC 15 - Muse Track Pack/Muse - Supermassive Black Hole/'

Hotplugging Pre-made Controller Profiles

Something that Phase Shift has that'd be nice for FoFiX. Controller Profiles would allow hotplugging of devices without having to configure them. We already have controller profiles, but we need to implement a way for FoFiX to pick up plug-n-play to automatically add the devices, match them with the profile, and then allow the player to just jump right in.

Remove support for Custom*.py in themes.

I think there are better ways around this, and the code in these files can be very very messy, and complex. I don't think that kind of code should be thrust into theme developer's hands since it could cause some issues.

Custom Rockmeter layers could end up still being useful and aren't as complex as some of the others.

Thoughts?

BRE/Drum Fill Visual bug

There's a problem with BRE in that when they are up it doesn't render any notes at all. Instead what should be done is for areas where there are BRE or Drum Fill it should remove notes from the note queue and just render normally.

The current problem is because it doesn't render any notes at all, notes that come rather close after the BRE don't appear until the BRE is over. This way you'll be able to see those notes after the BRE.

FoFiX crashes at the end of a song

Well, that one is an old bug. Maybe already fixed ? I'm using v4.0.0alpha2.r244.gd21b0cc-1

Traceback (most recent call last):
  File "./FoFiX.py", line 271, in <module>
    main.run()
  File "./FoFiX.py", line 253, in run
    while self.engine.run():
  File "/opt/fofix-git/fofix/core/GameEngine.py", line 599, in run
    rtn = self.mainloop()
  File "/opt/fofix-git/fofix/core/GameEngine.py", line 581, in main
    done = self.task.run()
  File "/opt/fofix-git/fofix/core/Task.py", line 104, in run
    self.runTask(taskData['task'], tick=self.engine.tickDelta)
  File "/opt/fofix-git/fofix/core/Task.py", line 91, in runTask
    task.run(tick)
  File "/opt/fofix-git/fofix/game/GameResultsScene.py", line 700, in run
    self.runScores()
  File "/opt/fofix-git/fofix/game/GameResultsScene.py", line 561, in runScores
    name = Dialogs.getText(self.engine, _("%d points is a new high score! Enter your name:") % self.finalScore[i], self.playerList[i].upname)
  File "/opt/fofix-git/fofix/game/Dialogs.py", line 1871, in getText
    _runDialog(engine, d)
  File "/opt/fofix-git/fofix/game/Dialogs.py", line 1860, in _runDialog
    engine.run()
  File "/opt/fofix-git/fofix/core/GameEngine.py", line 599, in run
    rtn = self.mainloop()
  File "/opt/fofix-git/fofix/core/GameEngine.py", line 581, in main
    done = self.task.run()
  File "/opt/fofix-git/fofix/core/Task.py", line 104, in run
    self.runTask(taskData['task'], tick=self.engine.tickDelta)
  File "/opt/fofix-git/fofix/core/Task.py", line 91, in runTask
    task.run(tick)
  File "/opt/fofix-git/fofix/game/GameResultsScene.py", line 717, in run
    self.song.info.save()
  File "/opt/fofix-git/fofix/game/Song.py", line 390, in save
    self._set("scores",        self.getObfuscatedScores(part))
  File "/opt/fofix-git/fofix/game/Song.py", line 369, in getObfuscatedScores
    return binascii.hexlify(cerealizer.dumps(s))
  File "/usr/lib/python2.7/site-packages/cerealizer/__init__.py", line 595, in dumps
    Dumper().dump(obj, s)
  File "/usr/lib/python2.7/site-packages/cerealizer/__init__.py", line 144, in dump
    self.collect(root_obj)
  File "/usr/lib/python2.7/site-packages/cerealizer/__init__.py", line 186, in collect
    handler.collect(obj, self)
  File "/usr/lib/python2.7/site-packages/cerealizer/__init__.py", line 357, in collect
    for i in obj.values(): dumper.collect(i)
  File "/usr/lib/python2.7/site-packages/cerealizer/__init__.py", line 186, in collect
    handler.collect(obj, self)
  File "/usr/lib/python2.7/site-packages/cerealizer/__init__.py", line 334, in collect
    for i in obj: dumper.collect(i)
  File "/usr/lib/python2.7/site-packages/cerealizer/__init__.py", line 186, in collect
    handler.collect(obj, self)
  File "/usr/lib/python2.7/site-packages/cerealizer/__init__.py", line 316, in collect
    for i in obj: dumper.collect(i)
  File "/usr/lib/python2.7/site-packages/cerealizer/__init__.py", line 185, in collect
    if not handler: raise NonCerealizableObjectError("Object of class/type '%s' cannot be cerealized! Use cerealizer.register to extend Cerealizer support to other classes." % obj.__class__)
cerealizer.NonCerealizableObjectError: Object of class/type '<type 'unicode'>' cannot be cerealized! Use cerealizer.register to extend Cerealizer support to other classes.

FoFix doesn't handle multi-monitor setup properly

I've a dual-screen setup and when using fullscreen mode, FoFix is only able to extend in both monitors, instead of giving the possibility of showing fullscreen on only one of them or handle them with separate views.

Implement simple batching for basic 2D image rendering

I don't really want or need anything too complex to be implemented in terms of sprite batching in FoFiX. Good enough would just be to have Region objects that keep track of texture coordinates and the original texture referenced, and the Batch would have a dictionary of region arrays keyed by their texture.

Batching would allow us to bind once then draw tons of vertex arrays at a time. We can define one using python's With statements, where entering would queue one up to start taking in regions, and exiting would flush all of the gl calls necessary in their proper order.

For now, Batching should only affect ImgDrawing

Make FretWork working in a package/dependencies management system (well… any linux distro :p )

Well, basically, I'm using Manjaro (Arch-based), and there is already a fofix package (https://aur.archlinux.org/packages/fofix-git, build from git clone of this repo).

What would be best :

  • Create another package (so as dependency of fofix and fof) of FretWork
  • clone fofix and fretwork, then bind them together as an only package
  • Add fretwork as a git submodule inside the fofix repo. That would lead to an only package

I can create the package for AUR, that's something I already did. But YOU know how you created fretwork so what would be best.

Background video.

Hey, how about to allow user choose video background source as Web camera, i know players likes to make video "how i play and how it looks from side".

Crash with Guitar Hero I songs

Hi, I've just installed FoFix git, with new configuration folder, but when trying to open a Guitar Hero I song I'm getting a crash due to:

File "/home/marco/Giochi/FoFix/src/views/Dialogs.py", line 1274, in keyPressed
    self.players[i].difficulty = self.info.partDifficulties[self.players[i].part.id][self.selected[i]]
IndexError: list index out of range

After some debugging, it seems that self.info.partDifficulties[self.players[i].part.id] is an empty list here.

All works using 3.121 provided by ubuntu repositories instead.

Use JSON for Rockmeter

The current rockmeter implementation I did awhile ago is a complete mess of ini files. I propose rewriting it to use a simple JSON structure that clearly shows a structured scenegraph when designing rockmeters. It would also mean one less thing dependent on configparser.

"Real" Instrument support (RB3)

Everything is already documented and there are already songs that have the things charted. Phase Shift is capable of playing them as well. What's hard about this isn't so much getting it read in as it is setting up code for rendering the necks and notes approriately as well as having controller profiles for the instruments.

Separated files for song infos and scores

Hi there !
It'd be great to have separated files for song infos (Name/Artist/Order in Tier) and for scores.
That would be great for sharing a song with or without scores.
For example I made a git repo with all my musics (without audio files) (github.com/Salamandar/FoF-Musics) and I don't want my scores being overwritten each time someone creates a new music.

Allow responsive design for rockmeters

Theme designers should be able to set states of the rockmeter's appearance depending on the screen resolution. Not every design works well using an internal resolution that then scales it up or down. This would allow designers to do things like load smaller resolution textures at lower resolutions, have smarter designs when at 1080p, and so on.

Impossible to activate Drum's Starpower

Hello again xD

I'm still trying fofix 4 alpha 2, and I found that is impossible to activate the drum's starpower. Usually when the drums is about to use a starpower there is a free style part where the player is suppose to hit the drums several times as he please before hitting the last note (the 4th one) to activate the star power. The player is suppose to hit the drums many times to make the last note appears, and while he does the notes rails get bigger and bigger, but in fofix 4 alpha 2 this doesn't happens. Neither the rails get bigger and the last note never appears :(

This would be fine if it wouldn't for the fact that every time you fail to use the starpower the song give you another chance over and over through all song not allowing you to play the song.

I tried to look for an option to disable star power all along but such option doesn't seem to exist. Is there a work around to this for now?

Thank you :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.