Program breaks with less than 6 categories XML

Bug #201897 reported by Narcis Garcia on 2008-03-13
4
Affects Status Importance Assigned to Milestone
Freevial (Game)
Low
Unassigned

Bug Description

When at /usr/share/games/freevial/databases I have less than 6 XML files, Freevial braks when pressing "R" to play the game.

I'm using Ubuntu (Gnome) 7.04 -AMD64

Siegfried Gevatter (rainct) wrote :

Thanks for your bug report.

Freevial should be changed to check at startup if there are enough categories for the choosen skin, and if there aren't enough it should directly refuse to start and show a error dialog instead. But this has low priority as by default there are 10 categories included, so that most users shouldn't never notice this.

Changed in freevial:
importance: Undecided → Low
status: New → Triaged
Narcis Garcia (narcisgarcia) wrote :

There are scenarios where people will not use any of the original categories, and will make their own. I believe in the convenience to show an error message explaining the requirement.

True, but this isn't important enough right now. Fixing this (at least
doing it in an appropiate way) would require the creation of a module
to handle message windows for Freevial (which is also a requirement
for a splash screen which is planned to be added). It's in the TODO,
but it might take some time until we work on it.

Siegfried Gevatter (rainct) wrote :

Note that it will print an error message now if it is run from the terminal.

Narcis Garcia (narcisgarcia) wrote :

An easier solution may be to assume a default empty category without any question (as if the file /usr/share/games/freevial/databases/empty.xml exists).
When there are no enough categories, fill the catalog with that empty template repeated.

For example: if in the /usr/share/games/freevial/databases directory there are only 4 category files, then load that 4 and add 2 empty ones. The empty categories can be an integrated template, or a file too.

Solving this matter can help to begin at category creation (make one and test one), when doesn't interest anyone from the default installation.

Thanks.

Siegfried Gevatter (rainct) wrote :

Nope, the wheel needs to be fixed to work with a variable number of categories.

Narcis Garcia (narcisgarcia) wrote :

Another help could be to develop an easy category/XML editor.

Arnau Alcázar (arnau) wrote :

There is already a category editor called freevial-db-edit (http://launchpad.net/freevial-db-edit).
There is an instance of the application running here: http://db.freevial.org

Narcis Garcia (narcisgarcia) wrote :

Oh thanks!
I didn't know about these project extensions.

Carles Oriol (carlesoriol) wrote :

....

I was thinking... I could arrange the wheel to need less than 6 categories.

The problem is the logic on the default skin. Playing other skins, to get points, etc... it's not a problem.

So... this change would need 1. Modify the wheel, 2. setup control about the minimum/maximum categories on the skin....

If the maximum is also modified would be necesary a change on the static [6] definitions, to create dimanic ones. (also modification on checkendofgame functions to setup a variable num)

Narcis Garcia (narcisgarcia) wrote :

An alternative:

Case for 1 category (A):
- Hole1: A
- Hole2: A
- Hole3: A
- Hole4: A
- Hole5: A
- Hole6: A

Case for 2 categories (A,B):

- Hole1: A
- Hole2: B
- Hole3: A
- Hole4: B
- Hole5: A
- Hole6: B

Case for 3 categories (A,B,C):

- Hole1: A
- Hole2: B
- Hole3: C
- Hole4: A
- Hole5: B
- Hole6: C

Case for 4 categories (A,B,C,D):
[first round]
- Hole1: A
- Hole2: B
- Hole3: C
- Hole4: D
- Hole5: A
- Hole6: B
[second round]
- Hole1: D
- Hole2: A
- Hole3: B
- Hole4: C
- Hole5: D
- Hole6: A

Case for 5 categories (A,B,C,D,E):
[reload on each round]
- Hole1: A
- Hole2: B
- Hole3: C
- Hole4: D
- Hole5: E
- Hole6: Random one

mmmmm....

Anyway it would work for launching from the command line but once in
the game will not do it so we we should change the categorie selector
screen...

    Carles Oriol

El dl 02 de 02 de 2009 a les 08:48 +0000, en/na Actiu informatica va
escriure:

> An alternative:
>
> Case for 1 category (A):
> - Hole1: A
> - Hole2: A
> - Hole3: A
> - Hole4: A
> - Hole5: A
> - Hole6: A
>
> Case for 2 categories (A,B):
>
> - Hole1: A
> - Hole2: B
> - Hole3: A
> - Hole4: B
> - Hole5: A
> - Hole6: B
>
> Case for 3 categories (A,B,C):
>
> - Hole1: A
> - Hole2: B
> - Hole3: C
> - Hole4: A
> - Hole5: B
> - Hole6: C
>
> Case for 4 categories (A,B,C,D):
> [first round]
> - Hole1: A
> - Hole2: B
> - Hole3: C
> - Hole4: D
> - Hole5: A
> - Hole6: B
> [second round]
> - Hole1: D
> - Hole2: A
> - Hole3: B
> - Hole4: C
> - Hole5: D
> - Hole6: A
>
> Case for 5 categories (A,B,C,D,E):
> [reload on each round]
> - Hole1: A
> - Hole2: B
> - Hole3: C
> - Hole4: D
> - Hole5: E
> - Hole6: Random one
>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers