Monthly Overview for April

The current game can be found here.

What I accomplished on Logic Lights in April, and what I am currently thinking of working on:

To Do:

From Feedback:

  • Add an in-game help screen describing the rules of the game.
  • Add a tip jar or donation button.

In Notes:

  • Add options menu.
  • Quality factors for wins for minimizing the number of elements in the program.
  • Change wire shape:
    1. Move the vertical kink in the wire to allow player to remove overlaps.
    2. Draw gap at wire overlaps to clarify the direction of the wires.
    3. Additional structure so that wires will not draw over elements when the input is to the left of the output.
    4. Allow many, many kinks in wires so player can create arbitrary wire paths.
  • Allow wire inputs to connect to random point in the middle of another wire.
  • Allow arbitrarily large puzzles with unlocks for larger puzzles based on earlier puzzles.
  • Randomization of level labels for each user so that truth table isn't predictable from level number.
  • Save game state when players close the game in the middle of play.
  • Graphics changes:
    • Draw a convincing trash can.
    • Make the ground switch direction when connected to an input.
    • Remove the "1 switch" string on the level switch, replace with graphical representation.

Long Term:

  • Web Version (includes: learn JavaScript)
  • Android Version (includes: learn Java, etc.)
  • M ac Version (need a Mac to use Py2App)

New:

  • Saw error in wiring when there are many elements, but not sure where.  Need to figure out how to recreate and then fix it.

In-Progress:

  • Puzzles complete only if terminals wired.
    • Created ground.
  • Allow user to choose color scheme.
    • Can be done from code.
  • Refactor screen system into an object-oriented style.

Completed:

  • Set up GitHub account and uploaded code.

From To Dos:

  • Put up downloadable .zip file.
  • Fade in the win notification.
  • Added confetti on win screen.
  • Allows automatic wiring of overlapping terminals.
  • Deletes existing wires when:
    • players make both ends connect to the same terminal.
    • when connected element is placed is removed from play.
  • Deletes logic elements when they are returned to their factories.
  • Marks game as tried when game is closed while in progress.
  • Made the or-tile look a little nicer.
  • Labelled the level boxes so that it's clear that 1 means 1 switch.

Background:

  • Removed extraneous code from the Video Game Physics boilerplate.

Initial Release:

  • Included 340 procedurally-generated puzzles
  • Uses three (3) logic gates -- and, or, and not
  • Puzzles with up to four (4) switches (see above)
  • Wires that connect elements
  • Included trash can to remove excess elements.
  • Multiple users / logins on one device
  • Remembers puzzle either won or just tried.

Recent Work 4/22/2016

Changes:

  • Began refactor of main() and the MVC structure.  Or at least what had started as an MVC structure, but I flubbed.  None of this work is complete.
    • Changed MVC functions into classes to better encapsulate behavior.  Too much information was being placed into screen-specific functions with a lot of code duplication and too much unprotected information.
    • Created a game manager class for centralized information control.
    • Created a screen class to encapsulate screen-specific information.

Recent Work 4/21/2016 & Update

I have decided to keep the downloads on one page, here.  This will be important as I make updates.  Announcements will be made in the blog.  I should use version numbers but I don't have a good idea about how far along I am in the game: sometimes, I think it's complete and sometimes I think I'm a quarter done.

Additions:

  • Created a ground, which will not be apparent in the update. (see below).
  • Added an indication that the boxes on the puzzle choice screen have different numbers of switches in each by adding the word "switches."  (graphics might be better, not sure about the value).  

To Do:

  • Use the ground so that no puzzle is complete unless all terminals are wired, even if to a ground.  I think the null wiring puzzle for one terminal is fine, but each set of switches basically has the same solution for level zero right now.  If I forced complete wiring, then large, dull networks would have to be formed (although there's another case where this happens, but I think this just supports my idea to remove it where it can be removed).
    • Either make the ground automatically switch directions when connected to an output instead of an input _or_ allow the user to swap the direction of the ground manually.
  • Add a visual indication that the large numbers on the level boxes are number of switches used in the puzzle.

Recent Work 4/20/2016

Fixes:

  • Finally drew out an almost-convincing or-gate.
  • Fixed a problem where deleting an object connected to a terminal output with multiple connections would (sometimes) delete the wrong wire from the output terminal, leaving unconnected wires and phantom terminal connections.
  • Allowed color changes to logic elements in code (user won't be able to do so in next update).

To-Do:

  • Create options menu.
    • Allow user to choose color scheme.

Recent Work 4/19/16

Additions:

  • I faded in the win notification on the win screen to make it less sudden.
  • I added some flying, spinning wingdings on the win screen.
    • I modified the win screen so that it doesn't time out and you can enjoy your confetti.

Subtractions:

  • I removed some reused code for the backgrounds and simplified the backgrounds.
    • These functions came from a package I used in the video game physics program.
    • Part of this was to help make the spinning wingdings easier to handle.
    • This may make scaling harder later on, since part of the reason for the Background and Field classes was to make resizing screens easy in the course.
  • I removed legacy MVC functions because they aren't used here.  I do need to integrate the screens, and when I do I will use and MVC model, but it will be a more specialized one than I created for the course.

Recent Work (4/18/2016)

Recent Changes on Logic Lights:

  • Automatic wiring when terminals overlap
  • Delete existing wires when bringing the ends together
  • Delete elements when placed back into their factories
  • Added word "Trash" to the trash
  • Save "tried" to player's record when exiting program while playing the level
  • Made the play area larger so you can drop the logic elements on switches and lights
  • Cleaned up a couple of invisible properties
    • Encapsulated some functionality on deletion into the element class
    • Fixed a problem in the factories that redrew the factories every cycle of the game loop.

Other things that need doing:

  • Save the game state on close during the middle of the game, also saving an in-progress tag for the puzzle.
  • Drawings:
    • Fix the drawing of Or to be nicer-looking
    • Draw a trashcan for the trash

Windows Version of Logic Lights is Running

I've finished the Logic Lights game, a game where you try to match the behavior of a light that is connected to several switches by constructing a wiring diagram with the basic logic elements -- and, or and not. 

Right now, it's a Python prototype packaged with py2exe.

What it includes:

  • 340 puzzles
  • Three (3) logic gates -- and or and not
  • Up to four (4) switches per puzzle
  • Wires that connect elements
  • Multiple users / logins
  • Remembers puzzle either won or just tried.

Where I would like to go from here:

  • Quality factors for wins (minimizing the number of logic elements)
  • Automatic wiring when terminals overlap (this is something players assume)
  • More control over wire position (to help identify the wires)
  • Delete existing wires when both terminals are on the same terminal (this is something players assume)
  • Delete elements when placed over their factories (this is something players assume)
  • Create connections at the midpoint of wires (so that players don't have to bunch connections at terminals)
  • Larger numbers of switches (needs scrolling and scaling functions to have enough room)
  • Unlocks for the above (not needed until the scrolling and scaling functions are created)
  • Randomization of levels for different users (levels are procedurally generated, and so guessable) 
  • Web and Android versions (I don't feel Windows is the best platform)

I'll put it up as soon as the .zip file creates a working game on the available machines around here.