* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: Sudoku CSE  (Read 4984 times)

0 Members and 1 Guest are viewing this topic.

Offline unknownloner

  • Full User
  • CW 4x3 challenge winner!
  • *
  • Join Date: Dec 2014
  • Location: Yesterday
  • Posts: 221
  • Post Rating Ratio: +1/-0
  • WHY CAN'T I CLICK ALL THESE CIRCLES?!
    • Code Blog
  • Gender: Male
Sudoku CSE
« on: June 11, 2015, 09:41:52 am »
There's already sudoku games out there for the CSE, but I felt like making one in assembly for funs, as a quick break from doing stuff with my isometric renderer.

Anyways, I've got some code from an old attempt I might re-use, not sure yet, but right now I'm just generating puzzles.
I wrote a puzzle generator in haskell to see if I could do it, and it works pretty well, so I'm letting that run for a bit.

As much as I'd like to generate puzzles on the CSE, it turns out proper puzzle generation can be a bit processor heavy. Instead, I'm going to focus on making the core of the game small/lightweight, and then (if I have enough puzzles) release a few packs as either different programs, or a collection of appvars. Really it just depends on how compressible the puzzle data ends up being.

Screenshots tomorrow maybe if I get any coding done. And by tomorrow I mean today, I'm going to sleep right now @ 6 A.M.
« Last Edit: June 11, 2015, 09:44:02 am by unknownloner »



  
/)

Offline Snektron

  • Lvl 69 Russian Snake
  • CodeWalrus Staff
  • Super User
  • Topic Management
  • Join Date: Dec 2014
  • Location: Netherlands
  • Posts: 3158
  • Post Rating Ratio: +32/-0
  • SSSssssss.....
    • RobinDeWalvis
    • Kzyrox
    • RobinDeWalvis
    • quantuminfinity
  • Gender: Male
Re: Sudoku CSE
« Reply #1 on: June 11, 2015, 10:12:10 am »
Oh cool :) also the isometric renderer looks really cool too :)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Offline Unicorn

  • ??? ??? ??? ??? ???
  • Super User
  • CW Contest II - 2nd place
  • *
  • Join Date: Jan 2015
  • Location: ??? ??? ??? ??? ???
  • Posts: 2807
  • Post Rating Ratio: +5/-2
  • make :PICKACHUP: a thing!
    • Unicorn808
    • 114/11432
    • ??? ??? ??? ??? ???
  • Gender: Male
Re: Sudoku CSE
« Reply #2 on: June 11, 2015, 05:41:01 pm »
Yay sudoku! I suggest AppVars for storage though.
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Offline unknownloner

  • Full User
  • CW 4x3 challenge winner!
  • *
  • Join Date: Dec 2014
  • Location: Yesterday
  • Posts: 221
  • Post Rating Ratio: +1/-0
  • WHY CAN'T I CLICK ALL THESE CIRCLES?!
    • Code Blog
  • Gender: Male
Re: Sudoku CSE
« Reply #3 on: June 11, 2015, 06:18:32 pm »
Problem with appvars is it makes loading way more complicated, especially if they can be archived.

  
/)

Offline alexgt

  • Just your friendly neighborhood Ninja Stach Fancy Iron Man
  • Super User
  • Join Date: Dec 2014
  • Location: Behind you
  • Posts: 2611
  • Post Rating Ratio: +6/-1
  • Something should go here...
    • /u/alexgt9123
  • Gender: Male
Re: Sudoku CSE
« Reply #4 on: June 11, 2015, 07:27:54 pm »
Cool, :) the CSE or CE is my next calc ;)

Also the Isometric renderer looks awesome :)
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18429
  • Post Rating Ratio: +93/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Sudoku CSE
« Reply #5 on: June 11, 2015, 08:03:17 pm »
You could maybe include some pre-made puzzles if speed is too much of an issue. I would like to see Sudoku on the CSE. That isometric tilemapper also looks nice. :)
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline unknownloner

  • Full User
  • CW 4x3 challenge winner!
  • *
  • Join Date: Dec 2014
  • Location: Yesterday
  • Posts: 221
  • Post Rating Ratio: +1/-0
  • WHY CAN'T I CLICK ALL THESE CIRCLES?!
    • Code Blog
  • Gender: Male
Re: Sudoku CSE
« Reply #6 on: June 11, 2015, 09:16:00 pm »
I've generated 6750 puzzles so far and counting :P

  
/)

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18429
  • Post Rating Ratio: +93/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Sudoku CSE
« Reply #7 on: June 12, 2015, 04:27:43 am »
Wow, that's nice then. :)
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline Unicorn

  • ??? ??? ??? ??? ???
  • Super User
  • CW Contest II - 2nd place
  • *
  • Join Date: Jan 2015
  • Location: ??? ??? ??? ??? ???
  • Posts: 2807
  • Post Rating Ratio: +5/-2
  • make :PICKACHUP: a thing!
    • Unicorn808
    • 114/11432
    • ??? ??? ??? ??? ???
  • Gender: Male
Re: Sudoku CSE
« Reply #8 on: June 12, 2015, 07:42:41 am »
How does? huh?

Unicorn is not smart enough O.O
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Offline Snektron

  • Lvl 69 Russian Snake
  • CodeWalrus Staff
  • Super User
  • Topic Management
  • Join Date: Dec 2014
  • Location: Netherlands
  • Posts: 3158
  • Post Rating Ratio: +32/-0
  • SSSssssss.....
    • RobinDeWalvis
    • Kzyrox
    • RobinDeWalvis
    • quantuminfinity
  • Gender: Male
Re: Sudoku CSE
« Reply #9 on: June 12, 2015, 08:05:50 am »
Well, that means there are enough puzzles to solve
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Offline Unicorn

  • ??? ??? ??? ??? ???
  • Super User
  • CW Contest II - 2nd place
  • *
  • Join Date: Jan 2015
  • Location: ??? ??? ??? ??? ???
  • Posts: 2807
  • Post Rating Ratio: +5/-2
  • make :PICKACHUP: a thing!
    • Unicorn808
    • 114/11432
    • ??? ??? ??? ??? ???
  • Gender: Male
Re: Sudoku CSE
« Reply #10 on: June 12, 2015, 08:07:34 am »
Ha, no kidding. If someone solves them all, they should get a badge :P
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Offline unknownloner

  • Full User
  • CW 4x3 challenge winner!
  • *
  • Join Date: Dec 2014
  • Location: Yesterday
  • Posts: 221
  • Post Rating Ratio: +1/-0
  • WHY CAN'T I CLICK ALL THESE CIRCLES?!
    • Code Blog
  • Gender: Male
Re: Sudoku CSE
« Reply #11 on: June 12, 2015, 09:03:58 am »
Alright so some math stats

I did some tests on the puzzles I have right now. They're all what I'd classify under "hard" or "very hard" difficulties right now, but don't worry I'll be converting many to easier puzzles.
Anyhow, given my current set of 8321 puzzles:
These puzzles have on average 24-25 starting numbers. The rest are all zeroes.
I can compress them down to, on average, 22.32 bytes per puzzle.
That means that in 4096 bytes I could store about 188 puzzles.
Realistically it will be less because easier puzzles will take more space, but this is pretty good when you consider a full board is 81 numbers. I'll have quite a few puzzles included and I might not need separate puzzle packs for them.

EDIT:
Oh and the way I'm compressing them is I'm storing them as a series of bits.
To store an empty tile, I have a 0 bit.
To store a non-empty tile I have a 1 bit, followed by 4 bits representing the tile's number.
Pretty simple really.
« Last Edit: June 12, 2015, 09:07:29 am by unknownloner »

  
/)

Offline Snektron

  • Lvl 69 Russian Snake
  • CodeWalrus Staff
  • Super User
  • Topic Management
  • Join Date: Dec 2014
  • Location: Netherlands
  • Posts: 3158
  • Post Rating Ratio: +32/-0
  • SSSssssss.....
    • RobinDeWalvis
    • Kzyrox
    • RobinDeWalvis
    • quantuminfinity
  • Gender: Male
Re: Sudoku CSE
« Reply #12 on: June 12, 2015, 02:26:03 pm »
Thats quite a cool compression algo O.O
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Offline alexgt

  • Just your friendly neighborhood Ninja Stach Fancy Iron Man
  • Super User
  • Join Date: Dec 2014
  • Location: Behind you
  • Posts: 2611
  • Post Rating Ratio: +6/-1
  • Something should go here...
    • /u/alexgt9123
  • Gender: Male
Re: Sudoku CSE
« Reply #13 on: June 12, 2015, 02:37:57 pm »
Alright so some math stats

I did some tests on the puzzles I have right now. They're all what I'd classify under "hard" or "very hard" difficulties right now, but don't worry I'll be converting many to easier puzzles.
Anyhow, given my current set of 8321 puzzles:
These puzzles have on average 24-25 starting numbers. The rest are all zeroes.
I can compress them down to, on average, 22.32 bytes per puzzle.
That means that in 4096 bytes I could store about 188 puzzles.
Realistically it will be less because easier puzzles will take more space, but this is pretty good when you consider a full board is 81 numbers. I'll have quite a few puzzles included and I might not need separate puzzle packs for them.

EDIT:
Oh and the way I'm compressing them is I'm storing them as a series of bits.
To store an empty tile, I have a 0 bit.
To store a non-empty tile I have a 1 bit, followed by 4 bits representing the tile's number.
Pretty simple really.
"hard or "very hard" O.O (I don't even know  how to play Sudoku :P)
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Offline Duke "Tape" Eiyeron

  • Urist McEiyolobster
  • Super User
  • Join Date: Nov 2014
  • Location: (V)(-_(//));(V)
  • Posts: 1636
  • Post Rating Ratio: +11/-2
  • Fanciest Walrus of the oceans.
    • @@Eiyeron
    • Eiyeron
    • /u/Eiyeron
    • Eiyeron
    • Rétro-Actif : Rétro/Prog/Blog
  • Gender: Male
Re: Sudoku CSE
« Reply #14 on: June 14, 2015, 05:27:19 pm »
Why not just RLE? If many of the puzzles will be full of zeros, RLE would do a very good work on it.
  • Calculators owned: A lot.

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games