Hi there. In this post I want to collect a few pearls I have seen over time in the forum, some generic algorithms and tools that people may use in a variety of situations. (Note this is a Wiki and not all edits are mine).
The table below (by @cup_half_empty) has links you can follow to find code examples and information on usage. You will find some common algorithms (sorting, shuffling) and some interesting ChoiceScript extensions, useful to develop and debug your game.
Feel free to contribute to this thread with other examples. Have fun!
General algorithms in Choicescript
|Insertion Sorting||Sorting algorithm. It can be used to sort arrays, find the max/min of several values and more.||@stainedofmind|
|Array Shuffle||Creates a random shuffle of a sequence of values. It can be used to make your game different every time.||@Lan|
|Library for strings and arrays||String manipulation and list simulation. Functions: substring, indexOf, contains, replaceFirst, replaceAll||@Twiger_Fluff|
These extensions modify the Choicescript engine and/or use *script. As such, they may not be fully supported.
|Game Transcription||A modified version of the ChoiceScript engine that will output a transcript of the game, based on the player’s choices.||@Sargent|
|Game Statistics||A modified version of the ChoiceScript engine that will output statistics of the game.||@Sargent|
|Multi-player library||Implement multiplayer in ChoiceScript, by sending requests to a 3rd-party server.||@Twiger_Fluff|
|Debugging tool||Debugging plugin which offers choice recording and playback .||@Twiger_Fluff|
|CSIDE||ChoiceScript development environment. Edit and run your game in a very flexible environment||@CJW|
|Visual Studio extension||Develop your game in Visual Studio||@Sargent|