Make the sokoban auto-win feature less restrictive

Got a cool idea that should be in R'n'D? Let's hear it!

Moderators: Zomis, Flumminator

Post Reply
ncrecc
Posts: 37
Joined: Thu Jul 12, 2018 12:59 am

Make the sokoban auto-win feature less restrictive

Post by ncrecc » Thu Jul 12, 2018 9:03 pm

Right now it works if the only content in the level is sokoban objects and purely non-decorative BD-style metal walls.

I think this is a bit too restrictive for level design, if we want a level that isn't purely Sokoban but still completes once all objects are in their sokoban targets.

I think that the aforementioned auto-win feature should either be A) applied more often, that is, applied to any level as long as there is no pre-existing exit or Supaplex exit, B) made into a level config property (checked by default for Sokoban levels that already meet this standard), or C) made into a player property (again, checked by default for Sokoban levels that already meet this standard).

User avatar
Holger
Site Admin
Posts: 2978
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Make the sokoban auto-win feature less restrictive

Post by Holger » Fri Jul 13, 2018 11:35 am

Perfectly valid point!

As the Sokoban-style auto-win functionality and an existing exit element in the level seem to be mutually exclusive to me, I think that your suggestion (A) should be the way to go.

However, things are a bit more complicated in practice, as the condition "level has no exit element" may change over time while playing the level. So if the level has a destructible exit element when starting, and the exit element was, say, bombed away during the game, the level should not auto-win after collecting the last required gem. So this would have to be checked at level start.

Then there's another possible case: The level has no exit element when starting, but contains a yam-yam (or custom element) that is able to create an exit element during the game. Such cases should then be treated like "level has an exit element" regarding auto-win.

I think this should be easy enough to be implemented for the next version of the game. :-)

User avatar
Eizzoux
Posts: 242
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Re: Make the sokoban auto-win feature less restrictive

Post by Eizzoux » Fri Jul 13, 2018 12:19 pm

You can create that by youself with only 1 custom element. (yeah, sorry, I did that XD )
Here, take a look.
tog_sokoban_auto_win.rar
(6.5 KiB) Downloaded 27 times
As you can see, when you collect all 7 emeralds, turn on all 12 lamps and fill all 6 sokoban fields, player automatically exits the level. You can check the level editor how was that done.
Nothing in here...*

User avatar
Holger
Site Admin
Posts: 2978
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Make the sokoban auto-win feature less restrictive

Post by Holger » Fri Jul 13, 2018 2:03 pm

Yes, this can indeed be done using a cleverly configured custom element! :D

While that's very cool, a generic solution for already existing levels would also be useful. Another advantage would be that such a generic solution could also be added for all non-R'n'D game engines where this functionality could not be accomplished with custom elements like in the R'n'D game engine. (Although this could also be "too much", as it could be argued that such a feature should not be added to the classic Emerald Mine or Supaplex game engine, for example, as it would change the "original" engine behaviour.)

User avatar
Holger
Site Admin
Posts: 2978
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Make the sokoban auto-win feature less restrictive

Post by Holger » Fri Jul 13, 2018 2:09 pm

Update: For the "classic" game engines (like Emerald Mine or Supaplex), this feature could indeed be added in a way as described by suggestion (B) or (C) in the first post. This would allow using this feature for newly created levels using these classic game engines.

Post Reply