Author Topic: Problems creating a Puzzle Pack  (Read 6945 times)

0 Members and 1 Guest are viewing this topic.

Neverwish

  • Guest
Problems creating a Puzzle Pack
« on: May 02, 2006, 07:41:15 PM »
I have done a simple code as you described in your tutorial, but I always get an error when I push the "statistics" button, when I push "New", or when I want to quit the game. My code seems to be right, it doesn't have any error in its syntax, whenever I did all what you wrote.
« Last Edit: June 09, 2006, 05:02:34 AM by David »

Offline David

  • Administrator
  • *****
  • Posts: 314
  • Karma: 10
    • View Profile
    • http://www.smoresoft.com/
Puzzle Pack
« Reply #1 on: May 02, 2006, 10:00:15 PM »
hm. Maybe you didn't save it in UTF-8 format?  I forgot to mention that if you use the XML declaration above, you have to save the file in UTF-8 format.  If you use Windows Notepad, for example, from the "File, Save As..." menu choose "UTF-8" from the "Encoding" drop-down and click "Save".

If that doesn't fix the problem, I'll probably need to look at the file.

The program doesn't impose any limit on the size of the puzzle file, but there is probably a practical limit for how large a file someone would want to put on their phone with its limited storage space.  Perhaps in the future I can support zip file compression so the files will remain compressed on the phone.

Neverwish

  • Guest
Puzzle Pack
« Reply #2 on: May 03, 2006, 06:05:04 PM »
Well that is what did. I have even tried with your example, but I have the same problem : I can open the file, the first grid appears, but as soon as I choose "New", "Exit", or "Statistics", I have a message which indicates that there is an unexpected error. Then, when I want to restart the game, I have the same message. I have to delete the file "owner.config".

Offline David

  • Administrator
  • *****
  • Posts: 314
  • Karma: 10
    • View Profile
    • http://www.smoresoft.com/
Puzzle Pack
« Reply #3 on: May 03, 2006, 11:35:44 PM »
I have not been able to reproduce this error unless I introduce a syntax error into the spp file, such as forgetting to include the "/" (slash) character in an ending XML tag.  I will look into improving the error message this weekend so it's easier to identify the problem.

In the meantime, I will need to look at the file.  Can you copy and paste it here?

Neverwish

  • Guest
Puzzle Pack
« Reply #4 on: May 04, 2006, 10:41:17 AM »
Here is a copy of the file :
Quote
<?xml version="1.0" encoding="utf-8"?>
<!-- Author : Neverwish -->
<!-- Difficulty : Hard -->
 <puzzlePack>
    <puzzles rating="6">
       <puzzle>.8..9.....6...4.371.........2.98...5.5.6...14.....18....2.......4.....6..9.45.3..</puzzle>  
       <puzzle>..9.....1.......4.14...7..2.61..3..873.8..4......5..2..849..5..5..1.........6....</puzzle>  
       <puzzle>..2.......4.28....9......575......29..941....8.16.24.5..697....4.........3.....98</puzzle>
       <puzzle>.......5...9.....775...8..481.3..5......2..4..67..1..3....6.....359..2..2..7.....</puzzle>
       <puzzle>....5...1..8...52.3.....4...4....86..2..36...9.3.1..5...6..4......9...1.1...78...</puzzle>
       <puzzle>.4..3....8.........7...1.65.9.7...81.2.34...9.....84...1.....7..3.19.6....2......</puzzle>
       <puzzle>.2...71.....9...841.4..5...8.....7.1..35.1.......7..9.2.7...3...8...26.....86...2</puzzle>
       <puzzle>..76....5.8..3..7....4.19..9.1......3......9...5.4.........72.36..9....7.7..5..8.</puzzle>
       <puzzle>.5.18......1......4......97..452....8.26.15.99......14.3.....48..647....5........</puzzle>
       <puzzle>8.2..7......3...52.6...48......4..3.5.....4.8..17.8....5...69..6.4...1.....59...6</puzzle>
       <puzzle>..6.......8.62....7......343......67..781....2.19.68.3..974....8.........5.....72</puzzle>
       <puzzle>.......4...8.....114...6..965.7..4......3..9..21..5..7....2.....748..3..3..1.....</puzzle>
       <puzzle>6.9..2......4...59.3...16......1..4.5.....1.6..72.6....5...38..3.1...7.....58...3</puzzle>
       <puzzle>.1..7..8....9.45....82....6..6.9....5.4......7......5..8..6..1.2..5....8.....83.7</puzzle>
       <puzzle>.7..5..2....9.43....26....8..8.9....3.4......5......3..2..8..7.6..3....2.....21.5</puzzle>
       <puzzle>.6...27..7.8..5......3...18..45.7...1.....2.7....2..3..1...69.....19...66.2...4..</puzzle>
       <puzzle>..7.....331...8..4.......1.85.6..1...23..5..6....9..4.9..3.........2.....617..9..</puzzle>
       <puzzle>..27....9.3..5..2....1.68..8.6......5......8...9.1.........24.57..8....2.2..9..3.</puzzle>
       <puzzle>.5..9.....2...6.741.........3.95...8.8.2...16.....15....3.......6.....2..9.68.7..</puzzle>
       <puzzle>.......4...7.....884...2..125.6..4......9..1..38..5..6....3.....647..9..9..8.....</puzzle>
       <puzzle>...6...79.5...13..3.9..2.....42.3.......1..6.7.....1.3...78...55.1...4...7...58..</puzzle>
       <puzzle>.1.94......9......3......56..312....4.28.91.55......93.7.....34..836....1........</puzzle>
       <puzzle>4.........3...8.96.1..7.........41...5.71...2.2.3...48.8.....3...5.......7.82.9..</puzzle>
       <puzzle>....4...36.....5....9...48..8..62....5....92.1.6.3..4....1...3.3...79.....2..5...</puzzle>
       <puzzle>..6......8......79.2.64......821....7......684.13.62.72.........5.....84..389....</puzzle>
       <puzzle>..9.....553...7..6.......3.71.8..3...25..1..8....4..6.4..5.........2.....839..4..</puzzle>
       <puzzle>.6..8....1.........2...5.47.9.2...15.3.86...9.....16...5.....2..8.59.4....3......</puzzle>
       <puzzle>..6.......9.65....1......747......61..198....5.82.69.7..214....9.........3.....15</puzzle>
       <puzzle>.1.69......6......7......52..713....9.38.61.55......67.4.....79..872....1........</puzzle>
       <puzzle>..9.....4.......2.42...3..6.14..8..738.7..2......5..6..729..5..5..4.........1....</puzzle>
       <puzzle>...4.76....32....1.8..5..3...1.4....5......6.6.7...........39.5.3..1..8.2..6....3</puzzle>
       <puzzle>.3..1..8....7.42....89....5..5.7....2.4......1......2..8..5..3.9..2....8.....86.1</puzzle>
       <puzzle>.......4...5.....334...2..629.7..4......8..6..13..9..7....1.....745..8..8..3.....</puzzle>
       <puzzle>.......9...6.....119...5..753.2..9......8..7..41..3..2....4.....296..8..8..1.....</puzzle>
       <puzzle>4......62.7.98......9......8.53.97.66......94..475....7..........342.....1.....48</puzzle>
       <puzzle>.6...8.93.1..4....7.........2.6...78.....71...5.41...2.4.82.9....5.......8.....6.</puzzle>
       <puzzle>.9..4....8.........7...6.52.3.7...86.1.49...3.....89...6.....7..4.63.5....1......</puzzle>
       <puzzle>....9...4..7...96.1.....8...8....72..6..12...5.1.4..9...2..8......5...4.4...37...</puzzle>
       <puzzle>.6...53..3.9..4......1...89..24.3...8.....5.3....5..1..8...67.....87...66.5...2..</puzzle>
       <puzzle>....8...4..2...83.6.....5...5....29..3..69...1.6.4..8...9..5......1...4.4...72...</puzzle>
       <puzzle>...4.98....31....6.2..5..3...6.4....5......8.8.9...........37.5.3..6..2.1..8....3</puzzle>
       <puzzle>2.....9....8...57.....5...36.2.3..5..9....81..7..21......6...3...1..9...3...48...</puzzle>
       <puzzle>9.2..8......1...52.4...79......7..1.5.....7.9..68.9....5...43..4.7...6.....53...4</puzzle>
       <puzzle>1.........9...6.57.4..8.........14...3.84...2.2.9...16.6.....9...3.......8.62.5..</puzzle>
       <puzzle>...4...86.3...17..7.6..5.....25.7.......1..4.8.....1.7...89...33.1...2...8...39..</puzzle>
       <puzzle>..1......5......67.4.19......543....6......159.32.14.64.........8.....59..257....</puzzle>
       <puzzle>8......52.4.91......9......1.73.94.55......98..847....4..........382.....6.....81</puzzle>
       <puzzle>2......87.1.53......5......3.96.51.88......52..219....1..........627.....4.....23</puzzle>
       <puzzle>.6...18.....2...738.3..4...7.....1.8..54.8.......1..2.6.1...5...7...69.....79...6</puzzle>
       <puzzle>....2...45.....6....7...23..3..59....6....79.1.5.4..2....1...4.4...87.....9..6...</puzzle>
    </puzzles>
 </puzzlePack>

Offline David

  • Administrator
  • *****
  • Posts: 314
  • Karma: 10
    • View Profile
    • http://www.smoresoft.com/
Puzzle Pack
« Reply #5 on: May 04, 2006, 04:53:35 PM »
I copied and pasted your file into a Windows Notepad, saved it as UTF-8, copied it to my phone via ActiveSync, selected the file in the game using the Open menu, and I'm able to play your puzzles, view statistics, etc.  So I'm still not sure why it doesn't work for you.

Can you try the file I created?  Click here to download the puzzle pack I created from your post and copy it to your phone.

Are the puzzles free of copyrights or used by permission?  If so, do I have your permission to publish your puzzle pack on my site?

I wonder why you rated the puzzles Difficult - Level 6, though, since I think the most difficult move required to solve them is a pin, which I consider Easy - Level 2?

Thanks for your patience in working through these problems!

Neverwish

  • Guest
Puzzle Pack
« Reply #6 on: May 04, 2006, 05:42:00 PM »
At least I can see them on my phone thanks to you! Very strange : although I did everything you've explained, it doesn't want to work with me. I do not really understand.
Reassure yourself, they are totally free of copyright. I have never seen them elsewhere than on my computer.
Anyway, I have rated them at 6 because according to me, 2 is for easy, 4 for medium, 6 for difficult, 8 for diabolic, and 10 for very very very very very hard, even impossible.

Offline David

  • Administrator
  • *****
  • Posts: 314
  • Karma: 10
    • View Profile
    • http://www.smoresoft.com/
Puzzle Pack
« Reply #7 on: May 04, 2006, 05:57:44 PM »
Great!  Glad you got them to work.  If you use that file as a template, you should be able to create others without so much trouble.  In fact, I will post an empty spp template file later today so others can avoid these problems in the future.

Thanks again for your patience, and for creating the very first Smoresoft Sudoku puzzle pack!

Offline Neverwish

  • Regular Member
  • **
  • Posts: 19
  • Karma: 4
    • View Profile
Puzzle Pack
« Reply #8 on: May 04, 2006, 06:28:07 PM »
I think the very first is yours. I would like to ask you an other question : why don't you allow the 20 last grids of your Sampler.spp to be used?

Wonderful! I've just done my second set, and it works great.
Can I send it to you by e-mail?

[Edit] : no finally I've decided to make 2 more sets, one easy and one medium, in order to put the 4 files into a CAB file, which will install all. Then I will send you the CAB file.

Offline David

  • Administrator
  • *****
  • Posts: 314
  • Karma: 10
    • View Profile
    • http://www.smoresoft.com/
Puzzle Pack
« Reply #9 on: May 04, 2006, 07:52:41 PM »
Excellent!  I'm glad to hear you can put them in a CAB file, since that will save on bandwidth at my site.

I haven't settled on the rating of the last 20 grids.  I think they are too hard for the sampler puzzle pack and I didn't want people to get frustrated with such difficult grids.  I plan to replace them with some that are easier.

This weekend I hope to have time to put together puzzle packs of my own, and I will offer the missing puzzles there with a more consistent rating.  Currently, I am not accounting for the length of a forcing chain in the rating, and certainly, a long chain is more difficult for a human to solve than a short one.  I want to first verify that the chains are not so long that they will be too frustrating to solve by hand.

It's unfortunate that this software I'm using for the forums doesn't allow attachments to be posted.  I will have to look into some other software so you can post puzzle packs at your convenience, rather than having to send them to me in email.  I'll get back to you on that soon.

Offline Neverwish

  • Regular Member
  • **
  • Posts: 19
  • Karma: 4
    • View Profile
Puzzle Pack
« Reply #10 on: May 05, 2006, 08:53:24 PM »
I found why it didn't work.

The spp files mustn't have names with space(s).

Offline David

  • Administrator
  • *****
  • Posts: 314
  • Karma: 10
    • View Profile
    • http://www.smoresoft.com/
Puzzle Pack
« Reply #11 on: May 06, 2006, 12:40:25 AM »
ah.  You are quite right.   I have fixed this for 1.0.8, which I plan to release by Monday.  btw, I have also added the red highlighting for invalid moves as you requested.