Jump to content



1

Lights Out! for 2600


20 replies to this topic

#1 atari2600land OFFLINE  

atari2600land

    Quadrunner

  • 6,494 posts
  • All hail the zyzzyva!
  • Location:Salem, Oregon

Posted Fri Mar 11, 2011 10:38 AM

Hey gang, I'm porting the classic game.com game Lights Out! to the Atari 2600/VCS. I won't be putting in the easier levels, and already there's something in this version that the other one doesn't: A level editor.
left difficulty switch A - level editor
left difficulty switch B - level select
select a level with the select switch.
To start a game, press fire.

In the level editor: To turn a square off or on, select a square with a cursor and press fire.
Not in the level editor: To select a square, use the cursor and press fire and normal Lights Out rules will apply.

To exit the level editor and try to solve the puzzle you've created, press reset switch.
To reset the level you're on to try again, press the reset switch.
Once you've finished the puzzle, it moves on to the next level. There are 5 levels put in so far so if you pass level 5, nothing will happen.

Also, if someone can test this on a real 2600, I would appreciate it.

Attached Files



#2 TrekMD OFFLINE  

TrekMD

    Stargunner

  • 1,542 posts
  • Location:Coral Gables, FL

Posted Fri Mar 11, 2011 10:45 AM

Cool, I'll give this a spin.

#3 RevEng OFFLINE  

RevEng

    River Patroller

  • 2,010 posts
  • bit shoveler
  • Location:Canada

Posted Fri Mar 11, 2011 1:19 PM

A suggestion... random levels.

Lights Out levels are super-easy to create randomly. For each level, start with a "blank" array and pick a bunch of random moves automatically, and then hand control to the player.

#4 atari2600land OFFLINE  

atari2600land

    Quadrunner

  • 6,494 posts
  • All hail the zyzzyva!
  • Location:Salem, Oregon

Posted Fri Mar 11, 2011 1:26 PM

View PostRevEng, on Fri Mar 11, 2011 1:19 PM, said:

A suggestion... random levels.

Lights Out levels are super-easy to create randomly. For each level, start with a "blank" array and pick a bunch of random moves automatically, and then hand control to the player.
Easy for you maybe, I wouldn't know how to even begin programming this.

#5 RevEng OFFLINE  

RevEng

    River Patroller

  • 2,010 posts
  • bit shoveler
  • Location:Canada

Posted Fri Mar 11, 2011 2:39 PM

In pseudo-code...

1. Clear game board
2. For N=1 to (level*2)+1
3. X=random X co-ordinate
4. Y=random Y co-ordinate
5. Perform a "lights out" operation at the random X, Y co-ordinate
6. Next N

Step 5 is the same operation that happens when the player presses the fire button during a game.

#6 atari2600land OFFLINE  

atari2600land

    Quadrunner

  • 6,494 posts
  • All hail the zyzzyva!
  • Location:Salem, Oregon

Posted Fri Mar 11, 2011 5:59 PM

I sat down for four hours and tried to do this but I couldn't do it.

#7 RevEng OFFLINE  

RevEng

    River Patroller

  • 2,010 posts
  • bit shoveler
  • Location:Canada

Posted Fri Mar 11, 2011 8:12 PM

Here's a version with random level generation. I basically took your main loop and stripped out the joystick code...

Attached File  lightsout3.bas   2.67K   25 downloads

Also, as it was coded it was "lights on". I reversed the playfield check so the levels are complete when the lights are all out.

#8 atari2600land OFFLINE  

atari2600land

    Quadrunner

  • 6,494 posts
  • All hail the zyzzyva!
  • Location:Salem, Oregon

Posted Fri Mar 11, 2011 10:04 PM

Thank you so much! Now it can be a 2k game, not that size matters or anything. Here is a revised binary file. Should I go for 4k and put fixed puzzles in or should I keep it as is and maybe add a little title screen music or something? It was a little confusing since you switched what is on and what isn't, but I've gotten used to it. Thanks again!

Attached Files



#9 atari2600land OFFLINE  

atari2600land

    Quadrunner

  • 6,494 posts
  • All hail the zyzzyva!
  • Location:Salem, Oregon

Posted Sat Mar 12, 2011 10:55 AM

Here's a little better version with title screen and a short noise that plays once you complete a screen. I did run into a few screens that I couldn't solve, though. (See the picture below. How would I solve this?)

Attached Thumbnails

  • lout.png

Attached Files



#10 RevEng OFFLINE  

RevEng

    River Patroller

  • 2,010 posts
  • bit shoveler
  • Location:Canada

Posted Sat Mar 12, 2011 11:18 AM

View Postatari2600land, on Fri Mar 11, 2011 10:04 PM, said:

Thank you so much! Now it can be a 2k game, not that size matters or anything. Here is a revised binary file. Should I go for 4k and put fixed puzzles in or should I keep it as is and maybe add a little title screen music or something?
No problem! My suggestion would be to leave it with random levels. If you want to add to it, then you could add an option for larger puzzles, but obviously you'd need to recode a fair bit to do that.


View Postatari2600land, on Sat Mar 12, 2011 10:55 AM, said:

Here's a little better version with title screen and a short noise that plays once you complete a screen. I did run into a few screens that I couldn't solve, though. (See the picture below. How would I solve this?)
Nice update!

I checked out the javascript Lights Out solver, and it says that configuration can be solved by choosing the following cells...

-*----
***---
-*----
------
------
------


#11 atari2600land OFFLINE  

atari2600land

    Quadrunner

  • 6,494 posts
  • All hail the zyzzyva!
  • Location:Salem, Oregon

Posted Sat Mar 12, 2011 1:02 PM

So is it possible that every combination that shows up can be solved? Also, I did forget about vblank, so I used it to change the color scheme between b/w and color. But now it doesn't tell me how many bytes are left. It just says this when I compile it:

Quote

bytes of ROM space left

--> vblk2 f3a8
I thought if I had enough bytes left that I could add two more notes to the solving sound so it would go C E G C instead of the current G C.



#12 the.golden.ax OFFLINE  

the.golden.ax

    Toss me

  • 10,350 posts
  • Just don't tell the Elf

Posted Sat Mar 12, 2011 1:33 PM

Why not use a little more space and spruce it up a bit with some music etc. like you said? Sounds good to me. Hope it sees a cartridge release.

AX

#13 RevEng OFFLINE  

RevEng

    River Patroller

  • 2,010 posts
  • bit shoveler
  • Location:Canada

Posted Sat Mar 12, 2011 1:38 PM

View Postatari2600land, on Sat Mar 12, 2011 1:02 PM, said:

So is it possible that every combination that shows up can be solved?
Yup!


View Postatari2600land, on Sat Mar 12, 2011 1:02 PM, said:

Also, I did forget about vblank, so I used it to change the color scheme between b/w and color. But now it doesn't tell me how many bytes are left. It just says this when I compile it...
Does a new correctly-sized binary get created? Try posting the latest .bas with the vblank addition.

#14 atari2600land OFFLINE  

atari2600land

    Quadrunner

  • 6,494 posts
  • All hail the zyzzyva!
  • Location:Salem, Oregon

Posted Sat Mar 12, 2011 1:58 PM

Well, I got it to make a normal 2k sized ROM and actually say how many bytes I have left (2). I added two more notes to the congrats sound, as well as a flashing title screen. I made it kind of like a flickering neon sign. I've run into that problem sometimes, where I use vblank and it doesn't say how many bytes I have left. Also, would anyone like to try this on a real 2600?

Attached Files



#15 the.golden.ax OFFLINE  

the.golden.ax

    Toss me

  • 10,350 posts
  • Just don't tell the Elf

Posted Sat Mar 12, 2011 2:16 PM

I can only use it on a CC2 / 7800.

AX

#16 atari2600land OFFLINE  

atari2600land

    Quadrunner

  • 6,494 posts
  • All hail the zyzzyva!
  • Location:Salem, Oregon

Posted Sat Mar 12, 2011 4:31 PM

Really? I wonder why. Did you make sure to put the settings on it to be a 2k game? Or is it the same whether it's 2k or 4k? Anyway, I've deleted the score, so that freed up some room, so I added a little title screen song. If you want to turn the bass notes off (which is also the background music for in-game), turn the left difficulty switch to A.

Attached Files



#17 atari2600land OFFLINE  

atari2600land

    Quadrunner

  • 6,494 posts
  • All hail the zyzzyva!
  • Location:Salem, Oregon

Posted Sun Mar 13, 2011 3:13 AM

Made a bigger title screen song and made the cursor blink. Anyone know why sometimes the first note of the 4-note congratulatory song doesn't play?

Attached Files



#18 Pioneer4x4 OFFLINE  

Pioneer4x4

    Stargunner

  • 1,724 posts
  • Atari + R.O.B. = Completed
  • Location:PA

Posted Sun Mar 13, 2011 8:20 AM

I just tried this on real hardware (A Vader via Harmony 1.03) and it works fine.
Title screen and music look/sound good, but like any other game, get annoying as it repeats ;-)
I liked playing Bob Colberts Supercharger version (Okie Dokie) but your random levels is nice as well.
I did not test resetting a level or the editor yet, but I will.

#19 Pioneer4x4 OFFLINE  

Pioneer4x4

    Stargunner

  • 1,724 posts
  • Atari + R.O.B. = Completed
  • Location:PA

Posted Sun Mar 13, 2011 8:28 AM

View PostPioneer4x4, on Sun Mar 13, 2011 8:20 AM, said:

I just tried this on real hardware (A Vader via Harmony 1.03) and it works fine.
Title screen and music look/sound good, but like any other game, get annoying as it repeats ;-)
I liked playing Bob Colberts Supercharger version (Okie Dokie) but your random levels is nice as well.
I did not test resetting a level or the editor yet, but I will.
The left dif switch seems to pause music, I can't get the editor, or reset a level.
Color/BW does change pallette. I like the sound at end of a puzzle.

#20 diogoandrei OFFLINE  

diogoandrei

    Chopper Commander

  • 210 posts
  • Location:Brazil

Posted Sun Mar 13, 2011 9:49 AM

Nice effort! Have you thought about a bigger display?

Congrats

#21 atari2600land OFFLINE  

atari2600land

    Quadrunner

  • 6,494 posts
  • All hail the zyzzyva!
  • Location:Salem, Oregon

Posted Sun Mar 13, 2011 11:35 AM

I got rid of the level editor. It was taking up too much space. As for the display, since the width of the pfblocks is 4, I just thought the height should be 4 also to make them squares.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users