Jump to content
Sign in to follow this  
atari2600land

New puzzle game

Recommended Posts

I'm making a new puzzle game. The object is to put all the Tetris-like shapes on the screen into a 6x6 box. I need a way to find out if the box is full so you can move on to the next puzzle. I tried but it wouldn't work.

fillin.bas.bin

fillin.bas

Share this post


Link to post
Share on other sites

Nice concept!

 

The easiest way to do is to check the 6 high bits of the appropriate playfield vars...

 

temp7=var4 & %11111100
if temp7 < %11111100 then goto notsolved
temp7=var8 & %11111100
if temp7 < %11111100 then goto notsolved
temp7=var12 & %11111100
if temp7 < %11111100 then goto notsolved
temp7=var16 & %11111100
if temp7 < %11111100 then goto notsolved
temp7=var20 & %11111100
if temp7 < %11111100 then goto notsolved
temp7=var24 & %11111100
if temp7 < %11111100 then goto notsolved
 rem if we're here then the puzzle was solved!
 goto levelsolved
notsolved

 

...but if you later decide to move the puzzle area you'll need to adjust the code.

Edited by RevEng

Share this post


Link to post
Share on other sites

On second thought, provided the playing area stays where it is, you can do that without the mask and make it even faster...

if var4 < %11111100 then goto notsolved
if var8 < %11111100 then goto notsolved
if var12 < %11111100 then goto notsolved
if var16 < %11111100 then goto notsolved
if var20 < %11111100 then goto notsolved
if var24 < %11111100 then goto notsolved
rem if we're here then the puzzle was solved!
 goto levelsolved
notsolved

Edited by RevEng

Share this post


Link to post
Share on other sites

On second thought, provided the playing area stays where it is, you can do that without the mask and make it even faster...

<BR>if var4 < %11111100 then goto notsolved<BR>if var8 < %11111100 then goto notsolved<BR>if var12 < %11111100 then goto notsolved<BR>if var16 < %11111100 then goto notsolved<BR>if var20 < %11111100 then goto notsolved<BR>if var24 < %11111100 then goto notsolved<BR>rem if we're here then the puzzle was solved!<BR>  goto levelsolved<BR>notsolved<BR>

 

Cool! Thanks! I've added a puzzle as well as a choose a puzzle screen. Go left or right to change the puzzle number (which is the score) and press fire to start. There's only 2 puzzles so far.

fillin.bas.bin

fillin.bas

Edited by atari2600land

Share this post


Link to post
Share on other sites

I think this is quite a good start for a neat puzzle game. A few suggestions...

 

It's a bit frustrating that there's no undo or fix a solution you've worked on without a total restart. This is especially true since you can drop pieces outside of the solution area. Once you've reached the last piece can the fire button go back to the first?

 

Also frustrating, but less so, is the fact that I can't move my new piece past any placed ones. Is this a technical problem, or an intentional game element?

 

That said, I enjoyed it despite these nitpicks, so I think you're on a good track. I know it would be a fair bit harder, but if the puzzles could be randomly generated it would add to the replay value infinitely.

Share this post


Link to post
Share on other sites

On second thought, provided the playing area stays where it is, you can do that without the mask and make it even faster...

if var4 < %11111100 then goto notsolved
if var8 < %11111100 then goto notsolved
if var12 < %11111100 then goto notsolved
if var16 < %11111100 then goto notsolved
if var20 < %11111100 then goto notsolved
if var24 < %11111100 then goto notsolved
rem if we're here then the puzzle was solved!
 goto levelsolved
notsolved

Wouldn't this work?

  temp1=var4 & var8 & var12 & var16 & var20 & var24
 if temp1 < %11111100 then goto notsolved
 rem if we're here then the puzzle was solved!
 goto levelsolved
notsolved

Share this post


Link to post
Share on other sites

I think this is quite a good start for a neat puzzle game. A few suggestions...

 

It's a bit frustrating that there's no undo or fix a solution you've worked on without a total restart. This is especially true since you can drop pieces outside of the solution area. Once you've reached the last piece can the fire button go back to the first?

I wouldn't know how to do that, since the piece has been placed outside of its predesignated space. I can however, make it so that you can only drop pieces in the square.

 

Also frustrating, but less so, is the fact that I can't move my new piece past any placed ones. Is this a technical problem, or an intentional game element?

 

That said, I enjoyed it despite these nitpicks, so I think you're on a good track. I know it would be a fair bit harder, but if the puzzles could be randomly generated it would add to the replay value infinitely.

This is intentional. I think randomly generated puzzles is beyond my programming know-how.

Thanks for the input and compliments, I'll continue to work on this and add in the suggestions.

Share this post


Link to post
Share on other sites

OK, I changed the way this works a little. All the pieces you get will stay on the board, but you can only move the current piece, which always starts just to the right of the box, so no more constantly pressing left to finally get your piece to the box. Also, the only way to finalize where a piece goes is if it is fully inside the box. I've also added a little feature: If you get sick of a puzzle, press level select to go back to the title screen and try a new one.

fillin.bas.bin

fillin.bas

Share this post


Link to post
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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...