SCoban - Sokoban Library for SC2

This is basically a Library to provide the quick basics of the original Sokoban-like Gametype.

What's Sokoban?

User your worker and WASD to push all "crates" in their storage box.

  • You can only push a crate in the direction you are going (you can not pull it!)
  • You can not push more than one crate at a time

For Mappers

To use this library on your custom maps:

  • Create a Terrain; right now only cliffs will be checked whether the player can move there.
  • The default (right now hard coded) box-size is 2.0. That means if you want a corridor a player can pass you need to make it at least 2.0 units in width. This will be the minimum box-size, because right now you are unable to create cliffs which are smaller than 4x4.
  • Set up a nice interface if you want one, or use the one of the demo map
  • Place Points on your map (align it to the grid) for the Player, each Crate and each Storage Box.
  • Add/Edit the following in the Map Initialisation Trigger
SCobanInit(<Crate Unit Type>, <Player Unit Type>)
SCobanReset()
SCobanAddGameElement(<Element Type>, <Point>) for each Game Element
SCobanStart()

Things to do/Known Issues

  • Timer and Number of Moves
  • Competition mode for more than one player
  • Right now there is an offset of 1 for aligning the game elements, meaning they are aligned to odd offset positions for X and Y, you could get odd results when using even numbers of grid positions
  • Few performance enhancements
  • Tons of formatting, documentation, etc. :)
  • Whatever comes to my mind...

Feel free to post bugs/suggestions.

Have Fun Naim

You must login to post a comment. Don't have an account? Register to get one!

  • 2 comments
  • Avatar of Naim2k10 Naim2k10 Jun 16, 2010 at 06:13 UTC - 0 likes

    The problem persists with different versions of the Galaxy Editor. The lib was made using the german one, I switched to the english one afterwards. However, I am going to release a "clean" version soon. :)

    Pushing units is simple: The map is subdivided into a flexible point grid. If there is a "crate" on the target point and the crate can be move to the direction the pusher is moving, I simply order an issue with the target point. I tried smoothing the movement by minimizing the triggers and let the player move the pusher into the same direction by holding down a key. It uncovered additional problems when checking the target point for crates when crates were still on the move.

    I'll work on it...some day :p

  • Avatar of koffiegast koffiegast Jun 03, 2010 at 23:02 UTC - 0 likes

    It looks interesting.

    I tried to check it out but in the trigger editor everything showed up as "Untitled Action". I'm kind of wondering how the push mechanism works and whether this could be based on 'energy' to have different units push each other.

  • 2 comments

Facts

Date created
May 22, 2010
Categories
Last update
May 22, 2010
Development stage
Beta
Language
  • enUS
License
GNU General Public License version 2 (GPLv2)
Downloads
155
Recent file

Authors