Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: ajorians on February 28, 2014, 01:03:40 pm

Title: Binary Puzzle for NSpire
Post by: ajorians on February 28, 2014, 01:03:40 pm
Hey Guys,

After playing Binary Puzzle (http://www.binarypuzzle.com/) I found it to be a fun game.  So I adapted it to the TI-Nspire calculator!

Each level has a solution; but I also made it so you can press the 'A' key and it'll auto-move for you.  I was finding some levels kinda tedious with looking for all of the two consecutive numbers in a row.

How many levels are there?  Well in the .tns file included in the .zip which you can put on your calculator has 200 levels plus the ability to run external level sets.  But there is a Makefile flag that can be activate that opens you up to a whopping 2000 levels.  I just build the 200 level version for a smaller filesize file.  So 6x6, 8x8, 10x10, 12x12 and 14x14 sizes each with difficulties Easy, Medium, Hard, and Very Hard and by default 10 levels but with the flag activated is 100 levels in each of those cases.

I found it a fun game to play; but try it for yourself and let me know what you think! :)

All sources included.
Title: Re: Binary Puzzle for NSpire
Post by: harold on February 28, 2014, 01:06:28 pm
How do you generate them?

Also, do you want to borrow some hard 8x8 instances?
Title: Re: Binary Puzzle for NSpire
Post by: Sorunome on February 28, 2014, 01:06:55 pm
Yay, Binary Puzzles are fun!
Too bad I don't have a nspire :P
Title: Re: Binary Puzzle for NSpire
Post by: ajorians on February 28, 2014, 01:11:51 pm
Hi Harold,

I didn't generate them; I wrote a small executable that downloads the HTML from http://www.binarypuzzle.com/puzzles.php?size=%d&level=%d&nr=%d where the first %d is 6, 8, 10, 12, 14; the second one is 1-4; and the third one is 1-100.  And in that HTML is the puzzel as well as the solution.  I converted from that into the make-up of how this program reads in the puzzle files.

On the 8x8 puzzles: Sure!  How many do you got?  I've been hoping somebody would make an external level for this game.

Have a great day!
Title: Re: Binary Puzzle for NSpire
Post by: harold on February 28, 2014, 01:18:53 pm
I didn't generate them; I wrote a small executable that downloads the HTML from http://www.binarypuzzle.com/puzzles.php?size=%d&level=%d&nr=%d where the first %d is 6, 8, 10, 12, 14; the second one is 1-4; and the third one is 1-100.  And in that HTML is the puzzel as well as the solution.  I converted from that into the make-up of how this program reads in the puzzle files.
Oh, ok. I was hoping there would finally be someone that I could really talk discuss the generation of binary puzzles with. Maybe we can still do that, but it would have been interesting to compare our methods and so on.
On the 8x8 puzzles: Sure!  How many do you got?  I've been hoping somebody would make an external level for this game.
Depends on how long you want to wait. Here's some: https://dl.dropboxusercontent.com/u/27035142/level5.txt (that's about 3.5 thousand of them)
You can see by the timestamps that I'm generating them pretty quickly.
Title: Re: Binary Puzzle for NSpire
Post by: ajorians on February 28, 2014, 02:47:24 pm
What I gotta do is make it so external levels as a pack of levels and not a single level per external level file.  Because at one time I had hundred and hundreds of files on my calculator and when I went under the "My Documents" on the calculator it took a while.

I guess the one reason I haven't made that yet is I'm not sure how to expose it in the UI.  You run the level set; do I show the list of levels or do I start you in the first level?  Nonetheless I should really figure that part out!
Title: Re: Binary Puzzle for NSpire
Post by: DJ Omnimaga on March 01, 2014, 01:00:17 am
Looks nice :D
Title: Re: Binary Puzzle for NSpire
Post by: mdr1 on March 01, 2014, 04:56:21 am
Thank you ajorians, this program is beautiful! :D
A little improvement that you could bring: save the current progression even when the user quits the game.
Title: Re: Binary Puzzle for NSpire
Post by: ajorians on March 02, 2014, 09:43:24 am
Hey Guys,

Thanks for the comments!

mdr1: Yeah, I do need that feature (the ability to completely exit the program and return where I left off).  I'll work on that part!

Have a great day!
Title: Re: Binary Puzzle for NSpire
Post by: ajorians on March 04, 2014, 07:51:33 pm
Hey Guys,

I got it so you can completely exit the program and upon returning it'll ask if you'd like to continue the game or end that game.  I did some bug fixing and tested it on a non-CX NSpire.  I didn't get to multiple puzzles in 1 .tns external level file that I was mentioning with harold about.

But I do got a nice YouTube video:
<iframe width="420" height="315" src="//www.youtube.com/embed/1iw_TSuV0F0" frameborder="0" allowfullscreen></iframe>
If that didn't work here is the link: http://www.youtube.com/watch?v=1iw_TSuV0F0 (http://www.youtube.com/watch?v=1iw_TSuV0F0)

I attached is the latest.  I hope you like it!

Have a great day!
Title: Re: Binary Puzzle for NSpire
Post by: DJ Omnimaga on March 05, 2014, 02:40:45 am
Hi, I think you need to use the [youtube] tag actually for Youtube vids. Nice update btw :D
Title: Re: Binary Puzzle for NSpire
Post by: SpiroH on March 05, 2014, 09:20:36 am
Hey Guys,
...
I attached is the latest.  I hope you like it!
Great as usual (beware when producing something against ppl expectations, though  ;) . Unfortunately, i dunno yet how to +1 you* as the new theme is still a WIP so we shouldn't mess with it, just yet.
*Wait..., i've managed to increase your rating (we need to enter a reason. No problem for me...)
Title: Re: Binary Puzzle for NSpire
Post by: DJ Omnimaga on March 07, 2014, 01:23:40 am
Yeah I was confused as well because I thought the icons would be located to the top-right, but then I realized that the post rating system was actually now part of the SMF karma system, which is why the icons are still located in the mini-profile.  I like the new system more since it's less misleading (eg your rating now displays negative votes separately, although it feels weird to be in the top 5 most smited people now XD) and it's more abuse-proof.
Title: Re: Binary Puzzle for NSpire
Post by: mdr1 on March 09, 2014, 08:06:57 am
Nice! And it is great that the previous scores are kept with this new version.
If I could suggest one other thing: make your own menu to choose if we continue the current game instead of the OS dialog box. :)

EDIT: And why not move the cursor just with the finger on the touchpad? Like a BlackBerry for example.
 
Title: Re: Binary Puzzle for NSpire
Post by: ajorians on October 12, 2014, 03:26:12 pm
Hi Guys,

Thanks for the comments!

It wouldn't be hard to replace the OS dialog box asking if the user want to continue or not a game that was in progress with a simple message of my own.  Perhaps I should have because sometimes it behaves somewhat weird and looks weird when mixing SDL + native OS prompts.  I did it again in a level editor in Gravnix.  I'll try to make a graphic message going further (no guarantees though).

Move the cursor with just the finger like on a Blackberry.  Yes this is always great.  I can't remember the reasoning.  The first few games I didn't know how to work with the touchpad and didn't investigate.  I might have thought about it and was concerned the cell would move too fast or you could accidentally place a value in the wrong cell.

I hope the do some more updates at some point on this game!

Thanks and have a great day!
Title: Re: Binary Puzzle for NSpire
Post by: DJ Omnimaga on October 12, 2014, 05:37:45 pm
Welcome back by the way AJOrians :)
Title: Re: Binary Puzzle for NSpire
Post by: ajorians on October 13, 2014, 08:19:16 am
Thanks DJ Omnimaga,

I was never really "gone" but quite busy.  With me when I have just a half hour/hour it isn't enough time to work on something for the calculator.  I like having multiple hours such that I can concentrate.

Have a fantastic day!  :)
Title: Re: Binary Puzzle for NSpire
Post by: DJ Omnimaga on October 14, 2014, 09:06:23 pm
Yeah same. The sad thing is when I am at work it's when my motivation is the highest, but when I come back home, I am too exhausted to code. >.<

And thanks :D