Jump to content
IGNORED

DPC+ Password WIP


Lewis2907
 Share

Recommended Posts

Bb Team,

 

For the next game that I am working on. I plan to have 100 rooms and it would be futile without a password system. I found a few in the forum, but I did not completely understand what they were doing in the code. So here is my attempt.

 

;***************************************************************
;
; Password is based upon numbers 1-4. There are a total of 256
; combinations. There are a 100 rooms so the other 156 will be
; unused and make for better passwords
;

 

Based upon the possible combinations that should make for some codes. Meaning a person makes it to level 19 and they die/game over they will see there code (1 3 4 2) or something of that nature. When they restart the game they enter the code and it jumps to level 19. I'm still long ways from that. So far I can only get 1 and 2 to work. Once that is complete with all for working number going across and a way to recall the number. Jump to "rs0" in bank 6 to draw the playfield etc. Lastly after that work on making the code shorter and better if possible. Thanks again for any help or pointers anyone can give me.

DPC Password 3 Nov 16.txt

DPC+ PassWord - 3 Nov 16.bas

  • Like 1
Link to comment
Share on other sites

I'm not answering your actual question, but if almost half the possible password space makes valid passwords, it's going to be pretty easy for players to randomly enter passwords and jump ahead in your game. If that's ok with you, then no worries.

 

Otherwise, you might try to think of another solution. Maybe use 1-9 instead of 1-4? Maybe have the first 3 digits indicate the room, and the 4th some sort of checksum digit to make it harder for players to guess a password?

  • Like 1
Link to comment
Share on other sites

I a topic on a plain old batari BASIC password system 8 entries that can be any of 64 characters. Each entry can therefor hold 6 bits. If just one of them is used as the checksum that it would take 64 tries to hack a password. Not perfect but enough.

 

http://atariage.com/forums/topic/221506-batari-password-wip/

Edited by Gemintronic
Link to comment
Share on other sites

Guaauu,

 

That does makes sense. Maybe for another game I have in mind. So far I normally post the entire code for help and feedback. Once I get better and work on a more complex game that will make sense. I have only been using Bb for a year now. I remeber when I couldn't even get it to compile a simple program. What I do is save code and other things I can find merge them together to make games and save the codes and programs I can understand. For right now I'm just trying to see if it can be done. Also u hope the stuff I ask for help with will help others who are new to programming like myself. But your idea would be implemented in the next game that is turn based if I can find the room and space to make that one, thanks.

Link to comment
Share on other sites

Gemintronic,

 

I saw that one first as well another. I didn't completely understand and was unable to port it over to dpc+ where I like to program. I plan o look at that some more and maybe move some of he code over to this one or port it all the way to dpc, thanks.

  • Like 1
Link to comment
Share on other sites

Gemintronic,

 

I saw that one first as well another. I didn't completely understand and was unable to port it over to dpc+ where I like to program. I plan o look at that some more and maybe move some of he code over to this one or port it all the way to dpc, thanks.

 

Yeah. No one has said this to me directly but my WIP posts have my cruddy coding style and lack of comments. I think the only thing that can be salvaged is maybe my premise: 8 entries of 64 characters. What's that? 6 8-bit variables?

Link to comment
Share on other sites

I probably wouldn't put much effort into protecting against guessing/cracking. Between Stella and the internet it's going to be easy to defeat an Atari password system no matter what. The thing you do need to protect against is a player accidentally entering a password wrong which happens to take them to a different level than intended. Since you're storing a single byte you could just expand it to two bytes and make the second byte the result of XOR'ing the first byte with a magic number.

 

More symbols will give you shorter passwords, but also can be more difficult to input. Personally I think 8 symbols is just right for the Atari because it maps perfectly to the 8 joystick positions. If you use arrows as the symbols it makes it possible to enter the entire password without looking at the screen. Simply move the joystick in the direction of the arrow and press the button.

 

As far as implementation goes, I'd probably store everything as 256 byte arrays and index into them with the room number (starting at room 0 of course). A second option would be to store all the data in a structure and align it to a power of 2. Either way the module that loads the room shouldn't care if it was called because you beat the previous room or because a password was entered.

  • Like 1
Link to comment
Share on other sites

Bb,

 

Attached is the working version that I am going to use in my upcoming homage altered version game (I still need to make something original I guess). I will update the looks and compress the way this work. But it does work for DPC. Please provide feedback as I am always welcome to it and learning points. The "if then etc.... maybe a lot to select each level for the 100 levels I'm trying to cram into DPC. May have to just do level 1, 10, 20 etc. or may multiple of fives.
Unless someone has an idea.

 

;```````````````````````````````````````````````````````````````
;
; Instructions:
;
; Use player0 joystick, fire button, select and reset to enter
; and test if code is correct.
; joy0up is for number 1
; joy0down is for number 2
; joy0left is for number 3
; joy0right is for number 4
; joy0fire is to move on to the next number
; select is used to return back to the previous number
; Reset is used to reset the game
;

 

Current Codes:

1 2 3 4 draws level 0
4 3 2 1 draws level 1
2 2 3 3 draws level 2

DPC+ PassWord WIP.bas.bin

DPC Password 8 Nov 16.txt

Edited by Lewis2907
  • Like 1
Link to comment
Share on other sites

Gemintronic,

 

Thanks for the feed back. May be if I do a 3 number pass word. 1 2 3 for the combinations and use the fire button and up to go back or something of that nature. For now I'm a long ways from a cartridge. I still need to find another 2600. The 2 I have a finally died. So far I think cells phone are a quick option as people are always on the go and play hand held games to pass time or play serious games etc.

Link to comment
Share on other sites

Also off topic. I haven't seen a thread yet. Did RT get his site back. That site got me basically to where I am with Bb. J did read on another thread he lost it. Many Thanks to RT for having that site and maintaining it all those years from what I was to see via google.

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...
 Share

  • Recently Browsing   0 members

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