Jump to content
IGNORED

Atari Sudoku - Latest Version (2013)


idavis

Recommended Posts

I am releasing the latest version of my sudoku game. I want everyone to keep in mind that I had certain criteria when I started this little project. Inspired by the likes of Doug Neubauer and Star Raiders I wanted to keep this within an 8K limit. My initial goal was for the Atari to generate a valid sudoku puzzle on its own and do it in under 8k. Please also do not think that I am in any way comparing myself to Doug, or my game to Star Raiders. We/they are a hyperspace across the galactic map in comparison. My sheer amazement of what was accomplished in 8K was the sole factor in my goal. So far that has been a success. My original Atari 800 was able to generate a valid sudoku puzzle in under 8k worth of code. I also set a goal of using assembler. I remember my parents drove me over to Houston, TX in order to purchase Synassembler. We bought it and it sat on my shelf for years. I am using it to produce this game as I own a copy and feel that I owe it to my parents to put the money they spent so long ago to good use. I would also like to thank Darren Schebek for releasing his Envision font editor. Again my program is not even near the same class as Envision, but I was able to use it to make some font changes.

 

Once I got a valid puzzle generated, I then started adding in some basic gameplay so that you could take advantage of the puzzle and give it a go at trying to solve it. That too is complete (workable lets just say) although it does lack a lot of polish. I know when I posted the earlier version there was some discussion about upgrades. I am willing to entertain them but am very limited on what I can actually put in as this is a spare time only project and I have much less right now than I would like. But that is the situation. I can say right off the bat that any requests to turn this into a full graphic experience using all 48K is going to be turned down.

 

I pop into AtariAge quite frequently but haven't been to active lately. I did however notice that fernando marrin was putting together a cart with a huge list of all games made and saw my game included on the list. I was quite tickled to say the least. To even be mentioned in the company of so many games that shaped my youth and my career was quite flattering. So I looked up the last disk that I was working on and pulled out the latest copy of the game. I have had discussions with Albert about turning my game into a cartridge, and I also had a chat with Steve Tucker about it. Both gave me some great ideas, but that was years ago and I haven't been able to really turn this into something that I think people would want on a cartridge. I guess I will leave that up to the individual.

 

Noting that I was initially writing this on a real 800, and have done 99% of the work on a real 800, I tried to write the gameplay as I was using real hardware. That concept doesn't translate as well with the emulators. It's nothing against the emulators, but more from a hardware point of view. For instance when you are sitting with a real 800 in front of you and an option screen comes up, it's second nature in my opinion to reach up for the Option/Select/Start buttons to make your selections and get the game going. Not as obvious on an emulator since the buttons are usually mapped to F2, F3, and F4. The real hardware made them so much more prominent. You throw in the fact that some people who are using the emulator have only seen pictures of the real hardware that is something that is hard to make intuitive. I also wanted to build in my experience with joysticks and how I felt that most games you picked up the joystick and immersed yourself in the game. The keyboard became a secondary experience if it was needed at all. For instance Ali Baba and the Forty Thieves, I played that forever it seemed and never had to even touch the keyboard. I do realize it was multiplayer and such but it just seems to me that at that time, reaching for the keyboard was something you only had to do on the more complicated games like Flight Simulator. These are just my observations and I am sure everyone will have their own opinion on this. With all of that in mind I tried to keep gameplay joystick oriented. I did have to use the Start button as my trigger for the Hint, but gameplay can be completed with just the joystick.

 

 

Upgrades I think are do-able:

1) On the selection screen, use the joystick to scroll through the selections. The joystick button already works to start the game.

2) Letting you input numbers on the puzzle with keyboard entries.

3) A way to abort. Maybe zeroing out the score, displaying the completed puzzle, then taking you back to the options page.

4) Kaz atarionline.pl came up with an awesome looking splash screen. Not sure how big it would be and would still like to keep this in the 8K barrier. But I do understand that its my own little hangup here and not really relevant these days. Something I just need to give some more time mulling over. I am keeping it as a possibility that's why I am listing it here.

5) I would like to re-work some of the timing internals. Like the joystick pause. I have a loop there to burn some time but I am thinking it isn't consistent. It should be more driven off the clock and not just using loops in code. For now it works but isn't very elegant. If you remove this it becomes totally unplayable as you hit the joystick and the cursor goes into overdrive and is impossible to control.

 

Upgrades I do not have time for:

1) Better graphics. I know that the screen I used limits the fonts but I don't have the time at the moment to go in and redo all of that part of the game. I would also like to still keep this to an 8K endeavour.

2) Changes to the way the game is played. For instance I think at some point someone wanted to be able to put in a puzzle and have the computer solve it. Not going to happen here, that's a completely different gameplay and logic.

 

 

Enjoy everyone and all comments are welcome. Keep in mind that I will do what I can but make no guarantees on any upgrades. It is a working program and that's the main thing. If you want to solve a sudoku puzzle that was generated by your very own 8bit Atari, then this is your chance. I have also written up some instructions and notes on the game. I am sure there will be more to come as I am not putting this to bed, just making sure you guys have the latest to play with. Maybe, just maybe one day this might turn into a cart. Again though no guarantees.

AtariSudoku_Instructions.pdf

AtariSudoku.atr

  • Like 5
Link to comment
Share on other sites

Looks good and plays ok a different scoring scheme is nice, and levels are a plus ++ .. Font eeeaahy I prefer the original font. I will never have Y(es) as the third option again..

 

Thanks. Appreciate the comments. So that's one vote for the original font. Let me think how to do this. And having the Atari generate the puzzle is a little time consuming huh. I figured I would leave the option in there just in case anyone wanted to try it.

 

I think it's actually a lot more playable than the last version I had released. If you select the Beginner level you can really see how to start figuring out which number is missing.

 

 

Edit: Let me know if you guys/gals need the instructions in a different format. I put them out as a PDF, but can also provide them in a Word format if you need. The instructions to outline the different levels and explain the controls, which might not be as obvious if you are sitting on an emulator.

Edited by idavis
Link to comment
Share on other sites

Nice work idavis :thumbsup:

 

Why not release 2 versions (if you can't squeeze both fonts in) ;)

 

I think the old version might had a bug where you could complete a board but it was different from the solution expected which was very annoying! - not sure if this may still be an issue but perhaps some sort of 'cheat' key press might be worth coding in to skip a level if you are sure it is correct... my friend bluecat loves Sodoku so she will be doing some serious testing ;)

  • Like 1
Link to comment
Share on other sites

Nice work idavis :thumbsup:

 

Why not release 2 versions (if you can't squeeze both fonts in) ;)

 

I think the old version might had a bug where you could complete a board but it was different from the solution expected which was very annoying! - not sure if this may still be an issue but perhaps some sort of 'cheat' key press might be worth coding in to skip a level if you are sure it is correct... my friend bluecat loves Sodoku so she will be doing some serious testing ;)

 

Thanks.

 

I will be able to squeeze more than one font it, just need to come up with a method to change it. I am thinking maybe pressing the F key during gameplay and it can move a pointer from one font to another. Plus it's a matter of not having my 800 sitting here. Envision uses the joystick and it was pretty easy when it was all set up to pop in and make a font change. I love the emulators, but not having an actual joystick hooked up adds a level of complexity. It's something I will work on though and I know I have some usb gamepads out in the shop I can bring in and try with the emulator.

 

For the old version, I remember this conversation. Here's the only way I can explain that it isn't a bug. The Atari lays out a puzzle that it knows is valid because I use certain rules I have coded to put it together. Now if you are on one of the higher levels you get more squares blanked out. I am going to use this as an example but it's only one example of what could happen, but lets just suppose that you had 18 squares blanked out and somehow it was all of the 8's and all of the 9's. The atari has the solution with the 8's in one set of squares and the 9's in their set of squares. If you were to fill them in completely opposite of what the computer had you would have completed a board, but in this particular case you wouldn't win the game because the atari would be expecting the numbers reversed. Right now the atari just goes and does a check to see if all of the numbers match the pre-existing solution and when you match this up you win. I don't see how that is any different than working a puzzle in a book, or the newspaper. They only print one solution and while you might be able to figure out another puzzle with the blanks they have created, it still doesn't match their solution. It's probably not the best example, but when you start blanking out 65 squares I am guessing that if you could easily work the puzzle and transpose a set of numbers.

 

It's actually how I came up with the 'hints', I filled in a puzzle and then couldn't figure out why it wasn't declaring me a winner. Now I could have just had an incorrect solution, but I can see in my example above where one could fill out a puzzle and while it would be a valid solution is not the exact one the atari is comparing too. I would have to mull this over and see if I could come up with code to verify after the puzzle was filled in if it is valid. Right now I put all of the logic into creating a valid puzzle so that when it's built there would be no need to verify it. Let's give this some more thought. How do people handle this scenario when filling out a puzzle from a book or newspaper?

Link to comment
Share on other sites

I'm not sure if an Atari would be fast enough to do it in a timely fashion but their are websites that explain what you have to do to create puzzles with only one solution. Alternatively, If all squares are filled by the player, couldn't your program just check to see if their solutions is valid, even if it's not the one you were basing your hints off of?

  • Like 1
Link to comment
Share on other sites

I think to ensure that you only had one solution you would have to eliminate the scenario I mentioned above where you never blanked out every instance of two or more numbers. That way there would be no way to transpose them. I will have to look at my code to blank out the squares and see what I can do. I think it could be as simple as making 9 counters and every time I pick a square go look at the counter and if it is ok, decrement the counter and blank out the square. Once I completely blank out one set of numbers the others I can blank out up to 8 of each. That would completely eliminate the ability to transpose an entire set of numbers and ensure that there was only one solution. Let me do some work on that.

Link to comment
Share on other sites

Thanks for the link. I took a look and they are actually shuffling all of the fields at random and then continuing until they get a valid puzzle. I handle all of that on the front end so my puzzles are all valid. I believe I have seen the light so to speak here and will add in some code to put in a little more logic on the part where I turn this into a puzzle. All of the things they are mentioning I have said above just condensing it down into stating that you can create an invalid or valid puzzle. It's part of the reason having one created by the atari on the fly can take a long time. There are logic checks to be made and you can get to a certain point putting one together randomly where it's impossible to make a solveable puzzle.

 

I am handwriting some code right now and will be squeezing this in as soon as I can.

Link to comment
Share on other sites

One more quick observation about pressing the START key. If on the second game after the first has been complete IF you had a 'sticky level' repeat, the level difficulty that was selected during first round or continue next game without displaying the Level select screen again..

  • Like 1
Link to comment
Share on other sites

Just tried it on an emulator. Looks good but I think the joystick needs more of a delay. Just tap the joystick and it skips several row or columns at a time. I know there are several variants of SUDOKU. One also has it where you also have the 1-9 also in an X. Other you must also have 1-9 in the center of each box. Have seen 4x4 Sudoku which I call Hexadecimal Sudoku.

 

Keeping it into 8K means it can be a pretty universal cartridge for all Atari Machines. Could use as much as 16K because 16K carts are still playable on a 400 / 800. Anything larger requires bank switching.

Link to comment
Share on other sites

Nice work idavis :thumbsup:

 

Why not release 2 versions (if you can't squeeze both fonts in) ;)

 

I think the old version might had a bug where you could complete a board but it was different from the solution expected which was very annoying! - not sure if this may still be an issue but perhaps some sort of 'cheat' key press might be worth coding in to skip a level if you are sure it is correct... my friend bluecat loves Sodoku so she will be doing some serious testing ;)

 

Ok. So as I alluded to earlier I had thought about this and have figured out the solution. Coded it up earlier and it has been tested. It cannot blank out an entire number as it stands, and if I care to, I can make it to where one can be completely blanked out but more than one is a no no. This should eliminate the bug. There should only be one solution.

 

 

One more quick observation about pressing the START key. If on the second game after the first has been complete IF you had a 'sticky level' repeat, the level difficulty that was selected during first round or continue next game without displaying the Level select screen again..

 

I also got this fixed. Return back to the splash screen and your settings are saved.

 

I didn't get the font changed so let me know if this is an issue. I was able to get a joystick working with my emulator so I should be able to poke around with Envision and restore the numbers back to the default font. Just note, I had a PM with someone wanting something other than original so I will think about a font change method. For now here is the new version with the bug fixes. Also managed to squeeze in one I found on the initial Bonus for the Beginner level. I think I also might start versioning the atr files after this one.

 

peteym5 - Make sure on the emulator that you don't have it turned to run wide open. The game needs the emulator running in non-turbo mode. Your problem sounds like it's in turbo.

AtariSudoku.atr

Link to comment
Share on other sites

  • 2 weeks later...

So I have put in some more time on the program. I have added in two new features.

 

Hit the Q key during play and the game will quit and take you back to the Option screen. Right now there is no "Are you sure?" question, it just aborts immediately and takes you back. I need to work on that routine.

 

Hit the F key and it will change the font. Right now there is the original and the modified font I had in earlier. You can toggle between the two during gameplay. I did write it to where I can add more in later.

 

So how would everyone prefer I update this program? Keep adding to this thread, or open a new thread for every new version? I noticed there were about 100 downloads of the version at the top and only about 10-15 downloads of the last version I put out.

AtariSudoku_Instructions_V1.2_2013_0308.pdf

AtariSudoku_v1.2.atr

  • Like 1
Link to comment
Share on other sites

Version 1.3 is ready. I have added in the capability to scroll around the puzzle using the arrow keys. Right now I can only test on the emulator so if someone doesn't like the keys for the arrows please say something. I remember the actual 800 having to hit the ctrl key or some combination to use the arrows. The emulator has these mapped directly to the laptop arrow keys so it's probably not a fair test.

 

I also have coded in the number keys. You can scroll around the puzzle and put the numbers in directly using the keyboard. Hopefully this is getting closer to something people can play on a regular basis if wanted. I also updated the instructions to include the new features.

AtariSudoku_Instructions_V1.3_2013_0316.pdf

AtariSudoku_v1.3.atr

Edited by idavis
  • Like 2
Link to comment
Share on other sites

My friend had a go: 800XL PAL using joystick - would like a *slightly* longer delay on the movement and the rotation. The dark 'purple' colour is too dark. If possible make the cursor more noticeable perhaps. Also at the end of your go perhaps have hold fire to restart and if you're wanting to do some more coding program the menu to operate by joystick as well ;)

 

Nice game, will play more over the weekend :)

  • Like 1
Link to comment
Share on other sites

Let me see what I can do for that. I will search for a way to test if it's running on a PAL machine and see if I can bump up the delay just a little. I was thinking on the ending, putting in a "Game Over" message. Right now after it's over, hitting start will take you back to the splash screen and will see about coding in the fire button as well.

 

I have had the joystick menu selections on my list, just got sidetracked on a few things. Thanks for the input.

 

Also, the last version (1.3) uses the keyboard arrows. I added in code so you don't have to hold down the ctrl key to arrow around. If anyone is interested in that in the meantime let me know and I will post it up as a 1.3a version. If it's not a big deal I will just let it roll into the next version. I have a busy weekend and week ahead of me but will try and drop in some changes.

Link to comment
Share on other sites

  • 3 weeks later...

Great game. Just found it on my Abbuc #112 disk, and I remembered I had seen this topic, but not read on Atariage.

 

What a nice game, and an extremely Cool story on the Abbuc Floppy disk. I loved it to read it on my atari.

 

Btw. I'm a Synassembler fan too! Great Assembler!

Link to comment
Share on other sites

  • 7 months later...

 

You obviously haven't seen the Envision source code. :)

 

I'm glad you found Envision useful after all this time.

Hi Darren,

just like to say thanks for creating Envision :thumbsup: :thumbsup: It's a wonderful program; I discovered it relatively recently and am using it on my new (and first) assembler game for fonts and maps :)

Link to comment
Share on other sites

  • 1 month later...

Darren, so cool to see you here. If you wanted to create a special font for the game, I would be happy to include it.

 

About the sudoku game, TheRealBountyBob helped me figure out that it does turn out that the game is not properly blanking out and effectively "creating" a valid sudoku puzzle. Problem is, it's been a real headscratcher for me. The part I am having a problem with is this: The game creates a valid grid, and then has to randomly blank out a number of squares based on the level you want to play at. Well, this is where it's turned into a real nightmare as I am not sure the 6502 has enough horsepower to start solving puzzles fast enough to see if there are two possible answers, and get this done in something resembling a lifetime. I have been researching this, and there's some code that's been written in some higher level languages and on much faster processors. Just converting that down to 6502 asm is not possible. So while I don't have a degree in math I have been wracking my brain to try and come up with some way to make this work.

 

For now, the basic physics of the game (1-9) in each square, each row, and each column will be valid. But it is possible that you can get a playfield with two or more results. At this point you have to rely on the Hints to help you. I hate that it's not working 100%, but might have to get a PHD in math to figure this out.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...