Sign in to follow this  
Followers 0
Zanaj

Need idea: ID generation - Bingo game

22 posts in this topic

#1 ·  Posted (edited)

Hallo I'm Zanaj and I've almost ripped my hair out on this one can somebody help?

  • 1.2 How to play bingo.
  • 1.3 My problem (Explation in detail)
  • 1.4 Fast summery (Overall fast non-detailed for busy folks :D)
  • 1.5 additonal info (this get updated)

 

 

 

1.2 The bingo game itself:

IMPORTEN

(I'm making this to a real company and we got contact to sell this around the world... Yes a real company that I am MAKING a game for not to be confused with INTERACT with their game, its a request I got cause I know some coding and what they currently using is ****.)

I am making my own bingo game in Autoit. Its a HIGHLY customized game.

The game it self is that you've a card to play on which is randomly generated. An example to this card could be.

---------------------------------------------------------------------------

I  1  I        I  25  I  37  I        I        I  67  I  72  I        I

---------------------------------------------------------------------------

I      I 12   I  22  I        I  40  I  57  I        I        I  90  I

---------------------------------------------------------------------------

I  5  I        I        I  32  I  49  I  51  I        I        I  82  I

----------------------------------------------------------------------------

Kinda shitty made but I guess we can deal with it.

So on this game it have the numbers 1-90 and then take a random number from 1-90, but never the same.

You then keep doing this untill somebody have a linar row. Then 2 rows. Then 3 rows  and  then all over.

 

1.3 The problem:

The problem itself lies in the matter of the flexablity of the program itself. Rather than make every goddamn card and assign an ID to it. I was wondering and poundering about, if its possible to somehow generate an ID everytime it make a card.

This would be EXTREMLY easy if it was PC to PC however, its PC to paper. I need somehow to by an easily readable number, check if the randomly generated card do got a row and isn't faking it.

(we don't want to check manually either do we want people to cheat)

So is the only way to make this, by pre-make every card and assign it an ID?

I was looking up some CRC-32 bit and learnt about that. However it doesn't seem like you can back-calcurate it Thus something like that would be useful...

 

1.4 Fast summery:

I'm making a bingo game in Autoit and I want a CRC-32 bit system or a system that can hold a value writen on a paper and basicly recreate a random made card. So it needs to decode and encode. CRC-32 was EXCALY like what I hoped but doesn't seem like anything you can decode again. So anything that can either make a variable shorter to an easily readable number/string OR a  system you can think of.

Regards:

 Zanaj Suki - Self taught coder :)

Have a wonderful day

 

 

1.5 Addtional Info:

Solutions suggest:

  • JCHD:   QR-Code 
  • John-One: Make a hash ID and pre-generate (thus this is not very flexible due to the highly customaztion)
Edited by Zanaj

Share this post


Link to post
Share on other sites



Try reading the rules, there is a link at bottom right of every page. Game interaction is not allowed to be discussed here.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Try re-read my question and I quote

"I am making a bingo game"

I am not interacting with any game at all, I am coding my own game from the bottem, I aplozie for the misunderstanding, thus I cannot see where the misleading was.

I clearified in the start that I am making a game. Not trying to interact a game.

Now that is out, do anybody have a soulition?

I'll have it edited so its clearly says it is not a game interaction but rather a new game I am making :).

Edited by Zanaj

Share this post


Link to post
Share on other sites

BigDot indeed didn't read well, if at all!

Zanaj,

Is there any rule for the order of numbers in the grid? Numbers on your painfully typed example seem to be in monotonically increasing value, but not always by reading the column in the same direction (horizontal vs vertical)? If that is a feature of your version, there might be a workable solution.

Do all grid have 9*3 cells and do they all carry the same number of numbers?


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Well no, there are different games and the user got the option to make a new generation code for the card. So all "cards" can have different max and min aswell as grid size. Thus if its needed it can be read from the games INI file.

and yes thus this changes too (but we could add it to the ini file :D)

the thing is its for easily readable and easier to read and locate the spoken number.

First row: 1-9

secound: 10-19

and so on till the last

Last row: 80-90

(:

Edited by Zanaj

Share this post


Link to post
Share on other sites

Since you need an unambiguous way to attribute an ID to a card and given that there exist a gogolplex number of possible cards, you want the most compact card description format. Then encode that description into a human-readable form.

First get ready for a rather long ID, due to the huge number of possibilities! That could be printed as a QR code. Along with this reversible description, you can still print a CRC or some hash of that ID to ease quick check by eye (but not completely failproof).

The idea for the ID is to encode both the position and the increment of successive numbers in the card, all that with the least bitsize. then encode this bit-description into some suitable format.

Is it always true that there is always one number in every column?


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

yh there will always be ATLEAST 1 number in every collum. o: ...Thus the QR code would be epic but would not work very well, if it could be a readable number and or string it would be fantastic, so people can read it up (so they don't have to buy a QR scanner...) and as far as I know they do not have wifi down there either XD.

Share this post


Link to post
Share on other sites

Every smartphone can read a qr code free of charge!

But it can be made to display as a string (more painful).


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

will take it up, but are there any other possibities still would prefar the number/string ID (:

Edited by Zanaj

Share this post


Link to post
Share on other sites

I know what I'd do

Cheat   :pirate:

Here's how I'd do it (and this is assuming you already know how to generate the card and each card is unique)

Just hash it, I expect you will have a copy of each card, use any algorithm you like, if it is stored in an array then use arraytostring or something.

Now here comes the dastardly and despicable part, feed it into tinyurl or some other url shortner  :ph34r:


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

All this was so I did not need to pre-generate every card (:

As then everytime a person make a new kinda of pattern or card it needs to pre-generate it (which will take some time).

And then I could just following you actually just assign an fixed ID for it (:

Share this post


Link to post
Share on other sites

Zanaj,

Just to be clear, are you coding this bingo game in AutoIt or in some other language? :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Autoit :)

Share this post


Link to post
Share on other sites

Zanaj,

Thanks for the clarification. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

its not added in the starting post for futher ppl, as this is open for ideas (:

Thanks for point it out M23.

Share this post


Link to post
Share on other sites

As I understand your first post, your problem is not only to assign a unique ID to every generated card but also have a mean to check that a given ID actually wins something.

An externally-generated unique ID (that it be a tinyurl or a rowid in a database or a CRC or hash or whatever isn't going to allow you any direct checking.

I need to clarify to myself how you intend the checking to be done. You say it should be easy to read and infer from that if the card has any row(s). But my point is: how do you plan that a readable ID would be easier to check than the card itself.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

Well when somebody say bingo we read the ID number plug it into the computer and it will then check if they got a row...O:

Share this post


Link to post
Share on other sites

OK, that's what I guessed.

While numbers are announced, you enter them into the program. Knowing which set of cards were distributed, you can compute on the fly which card are actually winning (that they are announced "Bingo" or not, as sometimes people miss numbers or commit errors, or quit).

If that's correct, then you don't have to make the ID (read lound by the candidate-winner) describe the card in full. You can just assign a random-like value to every card in the deck at creation time. Then only check that when Joe claims Bingo for card with ID 9A54UD or 849706 it matches one of the winning cards. This is a kind of PIN code for the card.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

so it is impossible to do it without pre-generate? Meaning I've to make the cards THEN assign the value? owo

What I wanted was like a code system. Where it did something alike CRC, But seems as it is impossible. ^^

If that is so, please close :)

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

If you have a printer handy, you can generate cards, store their "id's" (basically just an enumerator) and values, and print out on the fly..that way, you don't need to store ALL posibilities, just those you've created for the current game...also, probably want a checker to make sure the current is not duplicated by the priors created for the current game

then you need the logical piece :)

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0