Follow The Script

Oops - for a while there I forgot that people might need source code. So, to remedy the situation, here's a new section dedicated to the art of talking SLUDGE.

SLUDGE Console added Aug 29 2009 by Kieran Millar
Add a console into your game to change or view variables, add items to your inventory or swap rooms at any time so you don't need to keep recompiling a game to test things. Unfortunately due to SLUDGE's compiled nature you will need to set these up manually, but it's quick to do and comes integrated with the Verb Coin example. Can also be used to make text adventure games!

Fading and crossfading sound added May 9 2006 by Kejero, modified May 9 2006
Based on Tim's fadeMusic () script, here's fadeSound (). It takes a few more parameters, but everything is explained in a totally-sludge-help-file-look-alike word document. Also contains a function for fading up or down the currently playing sound, and for restarting the current sound after a saveGame, just like Tim's. Also contains a beautiful example that demonstrates it all!

Message Box added Mar 1 2002 by Stacy, modified Mar 20 2006
Image, more info
This will create message boxes like the ones in kings quest. This isn't exactly my code, it's my code that Tim modified so there's no bugs anymore.

Click and Hold added Mar 1 2002 by Stacy, modified Mar 20 2006
More info
This example will pop up an image after the mouse is held down for some time. Good for verb coins and other interface stuff.

The Interview added Dec 7 2003 by Squinky, modified May 16 2004
More info
Complete source code for "The Interview", a short but complete game demo. Use it as an example for starting out your own game, or for implementing a DOTT-like interface and inventory, yet another Save/Load menu system, etc. Now also includes Sam and Max-esque character following!

Crossfading Sound added Feb 16 2004 by Roastalodian Productions
I posted it in the forum, so I might as well here too. It's like Tim's fading music function, except it works with MP3/WAV/OGGs instead of MIDI/MOD/XM type stuff. It's use is self explanitory, pretty much. Questions: iwanttoknowaboutthefadingdemo@bobmoose.com or the SLUDGE forum. Enjoy. Marked as broken 2106 days ago.

Font Manager Object added Oct 15 2003 by Richard Brown
A simple object to help with managing multiple fonts in a game. Has functions like useFont, popFont, pushFont, etc. Allows you to set fonts within your game by specifying a font name string after they have been defined. Marked as broken 2106 days ago.

Game Item Management and Containers added Oct 14 2003 by Richard Brown
Two sample scripts and a short description file of their impementation. The 'gameItems' object manages a location table for each item in a game. The 'container' script is the starting point to manage containers in your game, including a player inventory if you like. Marked as broken 2106 days ago.

Music cross-fading demo added Oct 29 2002 by Tim the Furnish
Straight out of OOO and into your hearts (and probably a few of your games), it's... a load of lovely cross-fading code! Including a simple little system for restarting the correct music when you load a saved game. It's gr-eat.

Front-end game launcher menu thing added Oct 14 2002 by Tim the Furnish, modified Oct 14 2002
Image
A decent looking front-end menu for starting your game. You can use it for running your game in multiple languages, or if you want to provide alternative functionality other than just starting your game (such as visiting a website, uninstalling, reading a manual, playing a demo of something else... in fact, this is a pretty good way of making a little menu for ANYTHING, not just SLUDGE games). Oh yeah, and it's all customisable, as usual. Should work with unregistered versions, too, unless I'm very much mistaken.

Really, REALLY easy parallax scrolling added Aug 30 2002 by Tim the Furnish
SLUDGE v1.3 introduced parallax scrolling for the first time - and multi-layer parallax scrolling, at that. Here's an example of how to use it. Registered folks only, though... the code uses a few commands which aren't available in the free incarnation of the language. Sorry.

Turning strings into numbers added Jul 14 2002 by Tim the Furnish
This isn't a whole project - just an extra source file which you can add to your own project should you need a parseInt function. Give it a string and it'll give you back a number (for example, "500 cows" becomes 500, "-81.461" becomes -81 and "This string doesn't start with a number" becomes 0).

Movie demo added May 31 2002 by Tim the Furnish
SLUDGE now has movie playback support! Should you want to play movies in your games, you could do a lot worse than using the showClip function used by this demo.

Save/Load added Apr 8 2002 by Jeff Paige
This is a basic save/load script. It'll let you scroll through existing games and select one by clicking on it or by entering the game name manually. This example uses code from Tim's 'Text Box' example. Marked as broken 2106 days ago.

"Small Example" Project added Fri Jan 11 18:17:09 EST 2002 by Tim the Furnish
You know that example that comes with the engine? This is the project. OK, so it's not the most elegant way to implement a big chunky button panel... but it works.

Connection Game added Fri Jan 11 18:15:23 EST 2002 by Tim the Furnish
The source code for the 4-in-a-row counter game game. Game.

Text Box added Fri Jan 11 15:37:58 EST 2002 by Tim the Furnish
People have been asking for the source code for the text entry example - so here it is.

Scrolling Credits added Fri Jan 11 15:37:06 EST 2002 by Tim the Furnish
Thanks to a few new commands (stringWidth and hardScroll) here's a quick example of how you can add very nice scrolling credits to your game.

Bouncing object added Fri Dec 21 19:55:32 EST 2001 by Tim the Furnish, modified Fri Dec 21 19:56:32 EST 2001
A quick and not entirely unpleasant example of how to make an object bounce - for anyone wanting Kyrandia-style dropping of inventory objects. Fake physics! Hooray! Oh yeah - this one will only work with registered copies too, because of the floatCharacter function (sorry).

Smooth scrolling added Dec 7 2001 by Tim the Furnish
A few functions which create a bouncier, softer automatic scrolling effect than simply the aimCamera function in an infinite loop. Contains instructions on how to use the code, including how to follow characters other than the ego. Please note that the aimCamera command, which is used here, will only work with registered copies of the development kit.


If your example is listed here in the wrong category, please get in touch and correct me. Cheers.