Ichiban Sokoban

Ichiban Sokoban is a sokoban game that I developed in Unity.  Use the robot to push the crates into the goal areas.  Try to finish the levels in the lowest possible number of moves.  If you get stuck, you can reset the level and try again.

Ichiban Sokoban

Developer Log

I developed Ichiban Sokoban for the Mini LD #67, which had the Classic Mashmix theme.  One of the suggested games to remix was Sokoban.  I had developed a sokoban game years ago in Java for a college course.

I started developing the game by creating a simple Board class in C#, which basically just held the textual representation of the game (I changed the chars to ints for simplicity).  When the player presses an arrow key, it updates the Board, not the game world.

I created another class that actually handles instantiating all of the object in the game world.  When the Board object is updated, all of the GameObjects in the scene update their positions according to the board.  None of the GameObjects in the world have colliders.

The game can parse levels in the standard sokoban text format.  I’m hoping to write a file importer so that players can load their own levels.

I’ve been developing Ichiban Sokoban on the nights and weekends for about two weeks now.  I’m really happy with what I have developed.  The game seems to be received well on GameJolt, as it has quite a few downloads for a desktop game and some positive votes.

I got the file importer working, which reads out of the default application directory using the Application.dataPath variable, with “/maps” appended.  I had to write some extra code to verify the the file extension ends in “.txt”, otherwise it will try to read the “.meta” files that Unity adds by default.

For a Windows build, the “maps” folder must be placed  in the IchibanSokoban_Data folder.  For a Mac build, the “maps” folder must be placed in the “IchibanSokoban.app/Contents” folder.  On MacOS, you have to right click the folder and select to show contents.  Otherwise, double clicking the IchibanSokoban.app folder will start the game.  It is a hassle since on both platforms, the “maps” folder must be copied every time the package is built, since it deletes any folders that already exist there.  I should create a script that automatically copies the maps files after a build.

I am also in the process of adding a timer and best move and score values.

Videos

Links

Steam Greenlight

 

Released

Shape Quest

Shape Quest

Help Mister Square save Shape Land by returning the super spinning power artifacts. Avoid touching all enemies.

Shape Quest Official Videos

Post Mortem

Ludum Dare 35 was my tenth time participating in the full Ludum Dare 48 hour game development competition.  The theme this time was “shapeshift”.  I knew fairly early that I wanted to make a game with controllable shape characters.  My original idea was to have three shapes that you could switch between, and each shape would have a unique ability or power.  I had envisioned having three playable shapes, which were the square, triangle, and circle.  The gameplay was going to be similar to Trine, where the player would need to switch between the three to solve puzzles.

I wanted to take a break from Unity and create a game in some other engine this time.  I had heard a lot about Godot, so I planned to use that engine for this competition.  Godot is a free and open source game engine that is very similar to Unity.  Before the weekend, I worked through some Godot tutorials, so I was able to move a simple sprite around on the screen.  In Godot, instead of GameObjects, it has Nodes which have similar properties such as position, rotation, and scale.  Godot can be used to make either 2D or 3D games.  It has a scripting language that is very similar to Python, where tabs and spaces are significant.  Unfortunately, I wasn’t ever able to fully understand the physics system.  In Unity, physics is fairly simple.  You attach a RigidBody component and one (or more) colliders to your GameObject, and then you are good to go.  In Godot, there are three types of physics objects (KinematicBody, RigidBody, and StaticBody).  Your object has to have a CollisionShape or CollisionPolygon as well, and everything has to be parented correctly under your main object.  It was very confusing, especially with the bounding boxes, and it just never did work correctly for me.

After about four hours into development, I knew I wasn’t going to have the time to successfully make a game in Godot.  Therefore, I fell to my backup plan which was to make a GameMaker game.  I had heard a lot of bad things about how GameMaker handles things like collisions.  Although, I have been impressed with some games that I’ve played recently, such as Crashlands, which was created in GameMaker.

Shape Quest GameMakerFortunately, most of my initial development was creating the vector graphics for the game characters, so switching to GameMaker didn’t sacrifice too much work.  I had worked through some GameMaker tutorials before, but this was my first time creating a full original GameMaker game.  The GameMaker development environment is very similar to Stencyl, which I used to create Dream World for Ludum Dare 30.

All of the graphics were created with Inkscape.  I made a simple tree, which was composed of the union of three circles for the leaves, and a simple path for the trunk.  I created other obstacles such as rocks (rounded gray rectangles) and water (curved blue bezier lines) I created a red square, green circle, and blue triangle characters, which all had two frames of walk animation.  I had originally envisioned the heroes to use an additive color model, while the enemies used a subtractive color model (magenta, yellow, and cyan).  I abandoned that idea, since a yellow circle looked much better like an emoji.  I created a purplish trapezoid as the first enemy.  I also had the idea of making the heroes parallelograms with sides of equal length, while the enemies would have sides of unequal length.

Shape Quest InkscapeWhen I first started designing the movement of the playable character, I used the default GameMaker actions.  The problem with this method, is that the character is stopped whenever one of the movement keys is released.  So the player could be holding two movement keys (such as up and right arrows), but the player would completely stop whenever either of those keys are released.  For instance, the character would expect to keep walking right if the up key was released.  Also, with the default GameMaker movements, the chacter would move when the key was initial pressed, and would pause for a moment before it would continue moving.  This is similar to typing into a text document, when a key is held down.  First it adds the character, then pauses, then repeatedly adds the character multiple times.

To resolve this, I found a tutorial on making a platformer in GameMaker, so I just modified that method to work with a game in overhead view with no jumping.  This method keeps track of a horizontal a vertical movement speed, and the speed values are modified based on which keys are held down.  Now, the movement controls felt much more accurate and responsive.

Now that I had everything necessary to create a level, there needed to be a goal.  I made a simple cyan diamond as a crystal.  To differentiate it from the other world objects, I made it spin and flash between cyan and white.  Adding custom scripts to GameMaker objects is fairly simple, and the GameMaker API is well documented.

The first enemy that I created was the purple trapezoid.  It simply just moves vertically on the screen until it collides with an object, then it reverses direction.  When the player collides with an enemy, the player is returned to the starting position.  If I had more time, I could have added a health meter so the player wouldn’t have to restart after being hit just once.  I gave the enemies angry faces with two frames of animation, which reminded me of the boxer profiles in Mike Tyson’s Punch-Out!!.

The second enemy that I created was the yellow circle, which was modified from my previous green circle hero.  I just had to remove the arms and legs.  The yellow circle just moves in a random direction for two seconds and then changes to a random direction and moves for another two seconds.  This behavior is very easy to create in GameMaker, and I had remembered implementing the behavior in the “Catch the Clown” tutorial that comes bundled with GameMaker.

The third character I created was the green triangle.  I wanted this to be a water dwelling enemy that shoots projectiles at the player.  This behavior is similar to the Zora in the original Legend of Zelda.  If the player stands in one position for too long, then they will be shot, so the player has to keep moving to stay out of the line of fire.  The third level becomes more difficult with four green triangles shooting at the player at once.

The final enemy that I created was the orange pentagon.  Originally, I had made the pentagon cyan, but I thought that would be too confusing with the cyan crystal goal, so I changed the color.  The orange pentagon shoots in four directions at once and randomly changes location after every shot.  These characters are similar to the Wizzrobes in the original Legend of Zelda, except they shoot in four directions.  Their projectiles can be easily avoided, as long as the player doesn’t stand directly horizontal or vertical from one of the orange pentagons.

For the music, I used GarageBand again on my MacBook Pro.  A few weeks ago, I had read an article on Gamasutra about music theory, and to watch the number of steps and skips, so hopefully my music sounds a little better for this game.  I usually try different instruments until I find something that sounds good.  I use the command + left mouse button to add new notes to the piano roll.  I’ve found that it is much easier to modify the lengths and positions of the notes in Piano Roll editor than the Score editor.  I used the C major key, so I just made sure I just stuck with all of the “white keys”.  Overall, I think it took about an hour to create the music.  Like I’ve done with my previous games, the title screen music is just the game music slowed down with some of the instruments modified or dropped.

Shape Quest audioI used BFXR for creating the sound effects when the player is hit or when the crystal is collected.  I used Audacity for touchup work.  I also recorded my voice again for the title screen and game complete screen.  I used Audacity to add a bit of an echo sound.  Unfortunately, my voice sounded a little faint against the background music, and I never found a way in GameMaker to make it louder.

There are many ways the game can be improved.  First, I would like to give the player a method for attacking the enemies.  I would also like to have a way to move from room to room, instead of collecting crystals.  I would also like to have various items, money for purchasing new equipment, and many more enemies.

Finally, I played the game MANY times to ensure that all five levels were completable and also not too easy to finish.  I made both Windows desktop (EXE) and HTML5 (web) builds, and uploaded to Itch.io and GameJolt.  I think the Windows build is the better experience, but I know some people only prefer playing the web version.  It just seems like there is more lag and dropped frames in the web version.

Overall, I was happy with the simple game that I was able to make in GameMaker.  I really appreciate everyone who has played it already.  It already has over 60 votes, which is by far the most votes of any of my Ludum Dare games have received.

 

Let’s Play Videos

 

Released

Delivery Kid

Delivery Kid is a game with classic arcade gameplay.  Deliver newspapers to all of the subscribers.  Avoid hitting obstacles or the delivery kid will be fired.  Break windows and topple garbage cans for bonus score.  Are you good enough to complete deliveries through the entire week?

Game Design

For this game, I am analyzing the gameplay of the source material and will attempt to implement that gameplay in a 3D world using Unity.  I am documenting my thought process before I implement each component in order to capture all of the game’s rules in writing.  First of all, I identified all of the objects in the game, and I implemented those objects with primitive 3D Unity objects..

Player – The player will be represented by an object with a capsule collider.  The capsule collider will allow the player to smoothly move up ramps and other objects.  The player will move forward in the world Z axis at a constant rate.  If the user presses up on the controls, then the player will move faster.  If the user presses down on the controls, the the player will move slower, but not completely stop.  The camera will be parented to the player, so that the camera always follows the player.

The player will have a Rigidbody so that it responds to physics, and the X and Z rotation axes will be frozen.

The player starts with three lives.  One life is deducted whenever the player collides with a house or enemy.  The game is over when the player’s available lives falls below zero.  The number of player lives will be displayed on the screen.

The player will have a Playmaker FSM with one state that controls the player movement, using the Get Axis Vector action which stores the user’s input into a Vector3 variable.  The player’s location is then translated by that vector in world coordinates.

House – There will be various houses placed in a row on the right side of the bounding box.  The objective will be to deliver newspaper to the target houses.  Target houses will have a brighter color to differentiate them from the other houses.  Each target house will have a mailbox.  The house will initially be implemented with a box collider, with a short box trigger surrounding it for the yard.  If the player fails to deliver the newspaper to the target house, then it will no longer be a target house on the next level.

Newspaper – The objective is to throw newspapers so that they land in the yard trigger area of the target houses.  The player will throw newspapers in the negative X axis towards the houses by pressing an action button on the keyboard, gamepad, or mouse.  Some force will need to be applied to the newspaper in the positive Z direction, since the majority of the screen is filled with the world in front of the player.  The Z force could possibly be based on how fast the player is moving forward.  Newspapers can also be used as weapons to stun enemy characters.  The newspaper will contain a sphere collider.

The player starts with a stock of 10 newspapers.  One is subtracted whenever a newspaper is thrown.  The player cannot throw any newspapers when their stock is zero.  The number of newspapers in the players stock will be displayed on the screen.

Newspaper Refill – The newspaper refill object will set the player’s stock back to 10 newspapers.  Newspaper refills will appear randomly next to houses.

Mailbox – One mailbox will be available for each target house.  Bonus points are awarded for landing a newspaper in the mailbox.  The front of the mailbox will have a box trigger.  When a newspaper enters the trigger, then the newspaper will stop moving by setting the kinematic value to true.  The mailbox will also have a regular collider that surrounds the mailbox object.

LevelManager – There will be a set number of houses for each level.  After the player passes the final house, the level is completed.  The Level Manager will instantiate the player when the level starts.  At the start of each level, the LevelManager will instantiate the Player object.

For the first level, the LevelManager will instantiate twenty houses.  Ten random houses will subscribers and the other ten houses will be non-subscriber houses.  The subscriber information will be stored in an array of booleans.  During the game, another boolean array will track which houses have been delivered a paper.  The index for that house will have their delivery set to true if a newspaper is delivered to the mailbox or delivery area.  After the level, the subscriber array will be compared with the delivery array.  Any subscriber who did not get a delivery will be set as a non-subscriber.  The game is over if all houses become non-subscribers.

If the player successfully delivers newspapers to all of the houses that are subscribers, then the player will have a perfect delivery and one of the non subscriber houses will be chosen at random and converted to a subscriber house.

The level number will start at zero and increased by one after reaching the exit object.  The level number corresponds with a day of the week, which will be displayed before the beginning of each level.

Enemies – Various types of enemies will try to attack the player.  If an enemy collides with the player, then the player loses a life.  When all player lives are lost the game is over.

Obstacles – When the player collides with an obstacle, they will lose one life.  Unlike enemies, obstacles do no move.  Below is a list of obstacles.

  • Trash Can – Originally 100 points;  I think it should be 100 breakage points for unsubscriber
  • Fence – This could be a part of the house, but I decided to make it a separate non-moving object
  • Yard Sign – Another non moving object.  It displays the house number which starts at 120 and decrements by one for every house.
  • Breakdancer and Radio – Stationary objects.  Breakdancer stops spinning if hit with a newspaper
  • Brick Barbeque – Stationary object in yard.
  • Fire Hydrant – Stationary object that is always in the sidewalk.
  • Car – Cars move in the negative Z direction in world coordinates on the road at a constant velocity.  Cars spawn at the end of the street at regular intervals.  Cars also spawn at the second and third intersections at random intervals and move in the positive X direction.
  • Jackhammer Guy – Always spawns on the sidewalk or in the road.
  • Dog – The dog chases player if player gets too close.  The dog move slightly slower than the player, giving the player the chance to escape.
  • Grates – Grates are always on the edge of the road next to the sidewalk.

 

Lot – The lot one is gameplay unit where one house resides.  There will be a large plane representing the ground area that is not covered by the houses.  The lot is the gameplay area where the player can move.  The lot consists of the yard around the house, the sidewalk, and the road.  This object has a plane collider to prevent the player from falling through the world.  There are also two cubes spanning the length of the lot, which are placed on the left and right side side of the ground plane, which are required to keep the player from leaving the gameplay area.  The mesh renderer and mesh filter are removed to keep the user from seeing the invisible walls.

Intersection – An intersection is a road that runs horizontally with no houses.  There is an intersection at the start of the level, and then intersections after the fifth and tenth lot.  The player will need to avoid cars in the second and third intersections.  The intersection will also have left and right boundaries to prevent the player from leaving the gameplay area.

Exit – The exit is placed after the last house, and when the player collides with the exit the game will proceed to the level complete state.  The exit is an invisible cube collider, and it must be big enough to completely block the player’s path to prevent the player from moving around it.

Score Points – Not an actual object in the world, but there will be a global variable which tracks the number of points that they player has accumulated.  Below are the point values associated with various tasks.

  • Regular paper delivery: 100
  • Mailbox paper delivery: 250
  • Hit enemy (lawnmower) with newspaper: 100
  • Hit breakdancer: 350

A separate point value is kept for breakage bonuses.  The breakage values are listed below.

  • Break window: 100
  • Break window combo: +25 for each additional window on same house (100 for first window, 125 for second window, 150 for third window, and so forth)

Videos

 

 

Released