Jump to content

Photo

new game Necco Factory wip


9 replies to this topic

#1 1980gamer OFFLINE  

1980gamer

    Dragonstomper

  • 887 posts
  • Location:Charlton, MA

Posted Fri Jul 6, 2018 1:48 PM

Hello all,

A local candy company, NECCO, famous for Valentine Heart's  with the I Love U stuff on them.

As well as Necco Wafers.  The stuff your parents used to like!  Mary Jane's, DOTS ( the blobs of sugar on the paper )

 

New England Confectionery Company...  Was just auctioned off and is now the Sweat Heart Candy Company..... :(

 

Anyway, with this news,  I thought I'd put the Hearts and Wafers into a new game.

 

My plan is 3 mini games in one. 

First, a slid puzzle game,   Make the left eye match the right eye.

Second, a Kaboom! type game were hearts fall, Don't break a heart!

Third, a Kick Man type game. 

 

Other mini game ideas welcome..

 

Anyway,  Here is the start...  The first mini game is turning out to be bigger than I expected!

I just started writing it, with very little planning...  It should be redesigned.

 

If someone could help me with a few questions....

First ,  Is it possible that some of the slide puzzles are unsolvable?  Or do I just suck at solving them?

Second,  I have yet to solve a puzzle since I put the CHECK for completing the puzzle.  So, If you finish a puzzle,

Can you let me know if it works?

 

Use the E,S,D,X keys to move the cursor.  Q key to GRAB a tile.

You can move 1,2 or 3 tiles at a time.  The cursors can end up in the boarder... Need to fix that. 

Move back into the puzzle or you will get locked out of it.

 

THANKS for any feedback or advice in advance!

 

Still shows troubleshooting variables on the screen...

 

Attached Files



#2 1980gamer OFFLINE  

1980gamer

    Dragonstomper

  • Topic Starter
  • 887 posts
  • Location:Charlton, MA

Posted Fri Jul 6, 2018 7:33 PM

i think I have fixed the cursor leaving the puzzle. 

 

Still cannot solve the puzzle.  Always get to the last 2 pieces and they are reversed....

 

I am simply placing one of each possible shape and color randomly in each eye.    I remember solving these when I was a little kid!

 

The pisser is..  Before I did the puzzle comparison, I was getting easier puzzles!

 

OH,  When the cursor is white it can move anywhere inside the puzzle.  When you Grab a tile the Cursor is Black.

It can only make valid moves....

 

 

Attached Files



#3 Lee Stewart OFFLINE  

Lee Stewart

    River Patroller

  • 3,695 posts
  • Location:Silver Run, Maryland

Posted Sat Jul 7, 2018 5:19 AM

Still cannot solve the puzzle.  Always get to the last 2 pieces and they are reversed....

 

Fully half of all sliding puzzle starting configurations are unsolvable.  Though, perhaps more difficult to program, the best way to insure a puzzle starting configuration is solvable is to have your program start with the solved configuration and randomly perform puzzle moves to arrive at a starting configuration for the user.

 

...lee



#4 1980gamer OFFLINE  

1980gamer

    Dragonstomper

  • Topic Starter
  • 887 posts
  • Location:Charlton, MA

Posted Sat Jul 7, 2018 7:03 AM

Thanks Lee,

 

The only thing my algorithm ensures is that each piece is used only 1 time and that all pieces are used.

 

Interesting idea, start each puzzle matching... and do moves on one or both to scramble the puzzle.

 

Sounds like a lot of work?  But maybe not??  Only valid moves, random directions and number of times....

I wonder if the solved starting point could be randomly laid out while ensuring solve-ability?  Not having to literally slide the pieces.



#5 Ksarul OFFLINE  

Ksarul

    River Patroller

  • 4,679 posts

Posted Sat Jul 7, 2018 8:26 AM

Mmmmmmmmmm. . .Necco Wafers. I have several rolls of those in my desk drawer at work. Sweet Hearts and Mary Jane's are good too. I haven't seen the Dots (of the sugar blob type) in years. Usually I just find the gumdrops named Dots.



#6 1980gamer OFFLINE  

1980gamer

    Dragonstomper

  • Topic Starter
  • 887 posts
  • Location:Charlton, MA

Posted Sat Jul 7, 2018 10:54 AM

You are correct....  Not DOTS....  Buttons!

 

Yeah, I like necco wafers too.  But I am old!   LOL...

Attached File  old_fashioned_candy_buttons_unwrapped_wrapped_1.jpg   115.24KB   0 downloads



#7 Ksarul OFFLINE  

Ksarul

    River Patroller

  • 4,679 posts

Posted Sat Jul 7, 2018 11:04 AM

I may have to hunt down some of those candy buttons for my boys to chew on. They're still in an age range where that would be fun. Of course, when I was a teen, there were crazy folks putting little drops of other things on them, things that you didn't want to eat more than one of at a pop.



#8 Lee Stewart OFFLINE  

Lee Stewart

    River Patroller

  • 3,695 posts
  • Location:Silver Run, Maryland

Posted Mon Jul 9, 2018 5:33 AM

Thanks Lee,

 

The only thing my algorithm ensures is that each piece is used only 1 time and that all pieces are used.

 

Interesting idea, start each puzzle matching... and do moves on one or both to scramble the puzzle.

 

Sounds like a lot of work?  But maybe not??  Only valid moves, random directions and number of times....

I wonder if the solved starting point could be randomly laid out while ensuring solve-ability?  Not having to literally slide the pieces.

 

You are most welcome.

 

Re determining whether the puzzle is solvable without moving pieces, you could have the program count inversions (out-of-order pairs) to determine whether their number is even or odd.  For the 15 puzzle (yours) and the blank slot on the bottom row as yours is, the number of inversions must be even for it to be possible to solve the puzzle.  You would need to number the tiles of the right eye 1 – 15 and map those numbers to the tiles in the left eye.  You can then count the number of inversions for each tile and total them to see whether the total is even or odd.

 

As an example, the puzzle sequence, 11 1 2 3 4 5 6 7 8 9 10 12 13 14 15 X, has only the 11-tile out of order.  Starting with the first tile (11) and comparing it with each of the other numbers to its right, you will see that 11 – 1, 11 – 2, 11 – 3, 11 – 4, 11 – 5, 11 – 6, 11 – 7, 11 – 8, 11 – 9, 11 – 10 are inverted, whereas, 11 – 12, 11 – 13, 11 – 14, 11 – 15 are not.  Since there are no other inversions, the total of 10 inversions is even, ergo the puzzle can be solved.

 

Here is a link to a generic program (C++ and PHP) that you could translate to Basic and simplify to the 15-puzzle instance, with the blank slot on the last row, that will count the number of inversions and determine whether the puzzle is solvable.

 

...lee



#9 1980gamer OFFLINE  

1980gamer

    Dragonstomper

  • Topic Starter
  • 887 posts
  • Location:Charlton, MA

Posted Mon Jul 9, 2018 5:31 PM

Hi Lee,

Thanks again....  I'll check out the C++ code.

 

I do already call each piece 1-15  With an offset  1-3  Add 92  so 93,94,95  then 4-6 add 97  so they as 101,102,103 etc...

 

I hope I can figure this out!



#10 1980gamer OFFLINE  

1980gamer

    Dragonstomper

  • Topic Starter
  • 887 posts
  • Location:Charlton, MA

Posted Thu Jul 12, 2018 6:38 PM

OKAY,

I believe the SLIDE puzzle works now.   It randomly builds a scrambled puzzle but tests if it is solvable!

If it is not, it rebuilds until it is solvable.  Also,  for now, I show the number of inversions.  If it is over 68.. It is very difficult.  you can press 1 to rebuild the puzzle.  Just don't make a move first!

 

The PEG puzzle is complete.  It tests for valid moves etc.

 

the remaining 2 games are not in here yet.....  So, don't select them!  LOL

 

Thanks again Lee.  The formula seems to work.  I stink at these puzzles :o

 

Attached Files






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users