Home | News | Downloads | Projects | Articles | Awards | Forums | Chat | Guestbook | About | Arcade
InvisionFree - Free Forum Hosting
Join the millions that use us for their forum communities. Create your own forum today.
Learn More · Sign-up for Free



Forum Topics Replies Last Post Info
Older topics
Here you can access all topics posted from May 12th 2005 to Apr 9th 2006 (In read only mode).
1126 15694 9 Apr, 2006, 11:06
In: Last Post[GAME]Learn how to count to...
By: DJ Omnimaga
 

Pages: (2) [1] 2  ( Go to first unread post ) post

 Patz Calculator Sudoku, THE sudoku game for the 83 Plus!
patz2009
Posted: 23 Oct, 2007, 19:57


Member


Group: Members
Posts: 14
Member No.: 2792
Joined: 29 Sep, 2007



As some of you may know, I have spent a while making a sudoku game, known as Patz Calculator Sudoku, or PCSUDOKU. It is a sudoku program for the TI-83 Plus series of calculators, and features:
  • Speed optimized
  • Size optimized (under 2.2k on calc!)
  • Use of only 7 reals!
  • Fully random sudokus
  • Puzzle numbers
  • Game saving/loading
  • Graphical menus
  • Hint system
  • 5 levels of difficulty: simple, easy, medium, hard, and suicidal.
  • GPL v2 licensed
Currently, though, I feel as though I have beaten this program so much that there isn't really anything more that I can do with it tongue.gif So, I need some ideas! So, wanna give me some recommendations? wink.gif I've been on a programmer's block and can't think of anything more to do with it, and if there's nothing more to do with it after my to-do list below is completed, I'm going to declare it a dead project.

Anyway, here are some screenshots:
user posted imageuser posted image

You can download Patz Calculator Sudoku from here.


My to-do list:
CODE
- A couple size optimizations.
- Change hints to increase with difficulty, instead of decrease. (done)
- Add original number marking. (done)
- Moving instruction text to appear before filling in numbers.
- Add credits for HarrierFalcon's inspiration for the scrambling routine. (done)
Top
DJ Omnimaga
Posted: 23 Oct, 2007, 22:52


Ragol666


Group: Founder
Posts: 11283
Member No.: 1
Joined: 9 Apr, 2006



Well I never played sudoku since I was never into puzzle games but your program looked nice. How long does it take to render a random sudoku?


--------------------
user posted image
Join us on IRC on #omnimaga at irc://unitedti.org!
user posted image
Top
patz2009
Posted: 23 Oct, 2007, 23:02


Member


Group: Members
Posts: 14
Member No.: 2792
Joined: 29 Sep, 2007



On my 84+, making the random sudoku usually takes no more than 4 seconds. Removing the blocks are what takes up the most time (notice how the Simple difficulty takes a much shorter time to load than Suicidal)
Top
DJ Omnimaga
Posted: 23 Oct, 2007, 23:15


Ragol666


Group: Founder
Posts: 11283
Member No.: 1
Joined: 9 Apr, 2006



sounds good, not too long, I may give it a try at one point smile.gif


--------------------
user posted image
Join us on IRC on #omnimaga at irc://unitedti.org!
user posted image
Top
Ranman
Posted: 23 Oct, 2007, 23:16


Geezer


Group: Managers
Posts: 971
Member No.: 26
Joined: 11 Apr, 2006



I really like Sudoku!

This game is laid out very nicely! Awesome job! google.gif


--------------------
Ranman
Ultima V: Warriors of Destiny - by Lord British
Progress = 94.5% - Game engine = 61.2Kb
Top
Liazon
Posted: 24 Oct, 2007, 16:45


Staff


Group: Coders Of Tomorrow
Posts: 1491
Member No.: 24
Joined: 11 Apr, 2006



cool!

how're you generating the sudokus?


--------------------
Projects: In need of sprites...
Top
patz2009
  Posted: 24 Oct, 2007, 17:54


Member


Group: Members
Posts: 14
Member No.: 2792
Joined: 29 Sep, 2007



I'm not entirely "generating" the sudokus per-se, but more like scrambling it.
CODE
:[[1,7,8,3,4,2,6,5,9][4,9,3,5,1,6,7,8,2][5,6,2,9,7,8,4,1,3][9,5,4,7,3,1,2,6,8][8,1,7,6,2,9,5,3,4][3,2,6,8,5,4,1,9,7][7,8,5,2,6,3,9,4,1][6,3,1,4,9,7,8,2,5][2,4,9,1,8,5,3,7,6→[J]
:For(A,0,1
:[J]T→[J]
:For(B,0,2
:For(C,0,7
:rowSwap([J],randInt(1,3)+3B,3B+randInt(1,3→[J]
:End
:End
:End

I give it an already valid sudoku, and it scrambles it up. This idea was actually first of HarrierFalcon, but I modified it a bit.

Glad to hear that people are enjoying it. My mission with it was to be simple, fast, and small. Hopefully I have done at least that wink.gif


Edit: Actually, thanks for bringing the scrambling routine to my attention. I'm going to optimize it to this:
CODE
:[[1,7,8,3,4,2,6,5,9][4,9,3,5,1,6,7,8,2][5,6,2,9,7,8,4,1,3][9,5,4,7,3,1,2,6,8][8,1,7,6,2,9,5,3,4][3,2,6,8,5,4,1,9,7][7,8,5,2,6,3,9,4,1][6,3,1,4,9,7,8,2,5][2,4,9,1,8,5,3,7,6
:For(A,0,1
:AnsT
:For(B,0,2
:For(C,0,7
:rowSwap(Ans,randInt(1,3)+3B,3B+randInt(1,3
:End
:End
:End
:Ans→[J]

Should take up less space and go quite a bit faster biggrin.gif
Top
DJ Omnimaga
Posted: 24 Oct, 2007, 21:13


Ragol666


Group: Founder
Posts: 11283
Member No.: 1
Joined: 9 Apr, 2006



do you have an idea of how many combinatiuon possible there is?


--------------------
user posted image
Join us on IRC on #omnimaga at irc://unitedti.org!
user posted image
Top
TheStorm
Posted: 24 Oct, 2007, 21:39


Extreme Poster


Group: Members
Posts: 250
Member No.: 500
Joined: 30 May, 2007



It looks goo but I still prefer Tari Sudoku2 with its cool eye candy and other fun stuff.


--------------------
>(v') BLUB shall rule the world
"If you've done something right no one will know that you've done anything at all" -Futurerama

user posted image
Top
Liazon
Posted: 25 Oct, 2007, 18:13


Staff


Group: Coders Of Tomorrow
Posts: 1491
Member No.: 24
Joined: 11 Apr, 2006



ya, swapping was the only thing I could think of. but there's kinda only so much you can do w/ swapping sad.gif

as you also just randomly taking out #s? or are you using preset masks to remove #s?


--------------------
Projects: In need of sprites...
Top
patz2009
Posted: 25 Oct, 2007, 18:26


Member


Group: Members
Posts: 14
Member No.: 2792
Joined: 29 Sep, 2007



Using preset masks doesn't work so well when using different levels of difficulty, so I ended up just randomly removing them. Though it works slower, it reduces program size and allows for more difficulty levels.

Funny you should mention it, today I got bored at school and fixed up my blanking routine.
CODE
For(A,1,26+8D
Repeat [I](B,C
randInt(1,9→B
randInt(1,9→C
End
0→[I](B,C
End


Anyway, in general news, I have made most of the optimizations I'm planning to do. I've added the feature which shows which numbers originally were generated with the puzzle. It marks them with a small line over the number on the screen. Those marks are even saved when saving and reloading your game.

If I get any more ideas, I'll implement them, else I think I'm pretty much finished with this project. Now down to 2104 bytes. I plan to make my final release as a halloween present to you all, so check back here on the 31st wink.gif
Top
Ranman
Posted: 25 Oct, 2007, 19:04


Geezer


Group: Managers
Posts: 971
Member No.: 26
Joined: 11 Apr, 2006



QUOTE (patz2009 @ 24 Oct, 2007, 17:54)
I'm not entirely "generating" the sudokus per-se, but more like scrambling it.

Now that is a pretty clever idea! wink.gif


How do you adjust the difficulty level? confus.gif


--------------------
Ranman
Ultima V: Warriors of Destiny - by Lord British
Progress = 94.5% - Game engine = 61.2Kb
Top
patz2009
Posted: 25 Oct, 2007, 20:21


Member


Group: Members
Posts: 14
Member No.: 2792
Joined: 29 Sep, 2007



If you look at the above code, you can see its blanking routine. D is the variable I have set aside for the puzzle's difficulty. It removes more blocks as the difficulty increases.

26 for Simple, 34 for Easy, 42 for Medium, 50 for Hard, and 58 for Suicidal.

Edit: Oh, and if you meant how to adjust the difficulty level in the game, go to difficulty on the main menu and press 2nd or Enter. wink.gif
Top
Liazon
Posted: 25 Oct, 2007, 22:28


Staff


Group: Coders Of Tomorrow
Posts: 1491
Member No.: 24
Joined: 11 Apr, 2006



interestingly, mathematicians say that 17 is the smallest # of known squares for a solvable single solution sudoku.

duno how they proved that, and duno if that means every 17 # sudoku is solvable.



--------------------
Projects: In need of sprites...
Top
burr
Posted: 25 Oct, 2007, 23:28


Member


Group: Members
Posts: 25
Member No.: 214
Joined: 16 Oct, 2006



You don't need to store C to a variable; Ans can be used instead.
CODE
:For(A,1,26+8D
:Repeat [I](B,Ans
:randInt(1,9→B
:randInt(1,9
:End
:0→[I](B,Ans
:End

However, if you use the randInt(1,9 statement elsewhere in your program, you can store it to one of the graphing variables (such as u or v) and then use that instead.
CODE
:"randInt(1,9→u
:For(A,1,26+8D
:Repeat [I](B,Ans
:u→B:u
:End
:0→[I](B,Ans
:End


--------------------
user posted image — "A wiki for the TI-Basic beginner and advanced alike!"
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
DealsFor.me - The best sales, coupons, and discounts for you

Topic OptionsPages: (2) [1] 2  post





TI-Freakware's TI Ring
TI-Freakware's TI Ring
[ Join Now | Ring Hub | Random | << Prev | Next >> ]

Hosted for free by InvisionFree* (Terms of Use: Updated 2/10/2010) | Powered by Invision Power Board v1.3 Final © 2003 IPS, Inc.
Page creation time: 0.1461 seconds | Archive

Skin by xlibman and Jc
All programs and games are property of their respective owners.