Idle Game Maker | Help

Idle Game Maker Handbook
last updated 09/01/2014

The basics of Idle Game Maker

What is Idle Game Maker?

Idle Game Maker is an online tool that lets you create idle games (browser games focused on clicking and waiting for resources to build up), simply by writing a text file. No programming knowledge needed!

A word of warning

Idle Game Maker is still a very new project, and as such it is riddled with bugs, oddities, and oversights. Features will be added, changed and fixed regularly, and we cannot guarantee 100% smooth sailing at this point. Please be patient, and don't forget to report bugs (or ideas!) on our forum at http://forum.dashnet.org.
-Orteil

How do I make a game?

An Idle Game Maker game is simply a text file that our website converts into a browser game.

To make your own game, you will have to write that text file using the commands and syntax described below (you'll see, there's a whole array of cool things you can do). Here's what a finished game file looks like : http://pastebin.com/raw.php?i=YrmTqheS. Pretty readable, huh?

You will then have to find a place online to store your text file (pastebin.com is a good one; your text files are hosted for free and, if you register, you can edit them as much as you want. Here are some other text-hosting sites).

Once you're happy with your new game, all that remains to do is to share it with the world!

How do I play my game?

To play a game, take its source file's URL and append it to http://orteil.dashnet.org/experiments/idlegamemaker/?game=.
A game stored at www.example.com/mygame.txt would be playable at http://orteil.dashnet.org/experiments/idlegamemaker/?game=www.example.com/mygame.txt.

  • If your game is hosted on pastebin.com, you only have to refer to its identifier (the letters at the end of its url). For example, http://pastebin.com/YrmTqheS becomes http://orteil.dashnet.org/experiments/idlegamemaker/?game=YrmTqheS.
  • Note : when hosting your file on pastebin.com, make sure you're registered - or you won't be able to edit your game later! Also make sure to set the file to never expire, and to make it either public or unlisted.
  • If you're not hosted on pastebin.com, make sure your file is a .txt file! Your game won't work with any other file type.

General tips about game-making

  • You can make an idle game about practically anything. Just look around you!
  • Spend some time examining the games you like. You'll probably learn something from the gameplay or from the source file!
  • Test your game. A lot.
  • If people seem to like your game, consider making a forum where players can talk about it and discuss new features. Having community feedback is essential when making a good game!
  • Keep a separate version for testing only.
  • Keep backups of your game's source - you never know!
  • Add descriptions and, if possible, pictures! Flavor is everything.
  • Don't mindlessly copy other cool games you've seen. Add something of your own, be creative! (And no, replacing every instance of "burger" by "pizza" and calling it Pizza Clicker doesn't count as being creative!)
  • Beware of spelling mistakes, they can quickly make a game appear very unprofessional. Use spell-check!
  • Keep your game fresh and your players curious by adding new stuff regularly!

And now for some rules

Before you start making rad new idle games, you might want to read (and follow) these :
  • All work from games made using this engine is copyrighted to their respective owners.
  • Content creators are expected to respect copyright laws. No user-created content is hosted on our servers.
  • Don't use illegal content in your game!
  • Please no games involving overly lewd, nude or violent stuff.
  • Try not to use copyrighted images (be careful with google image search)! If you use content that demands proper attribution, make sure to provide it!
  • Don't do anything shifty with our engine! Basically, if it feels wrong, don't do it.
  • Don't try to mislead the players into visiting websites they don't want to.
  • No circumventing our system to include scripts or other disallowed HTML tags in your games!
  • Please do not use CSS to change or hide the top bar.
  • Finally, please do not attempt to hide or alter the ads through CSS, they're what keeps the site afloat! (Using adblock when playing is okay though.)

Writing source files

Sections

A source file is divided into sections : Header, Settings, Resources, Clickables, Buildings, Upgrades, and Achievements. The Header and Settings should always come first, but other than that you can rearrange (or even omit completely) the other sections as you like.

Elements

Your game is made of elements : each resource, clickable button, building, upgrade and achievement is an element.

You can create new elements under the appropriate sections. The code for this is simply creating a new line with *IdentifierForTheElement, below which you can add properties to the element through commands.

You can define their name, their picture, and lots of other things such as their price, their passive powers, what they unlock...

An element is either visible or hidden. "Unlocking" refers to making an element visible (and earning it, if it's an achievement).

A simple example element would be :
*Cow
"A placid, friendly mammal. Generates 1 milk every second."
costs 20 money
gives 1 milk
visible
picture : http://example.com/cow.png

Identifiers

Each object has a unique identifier, a name that can be used to refer to it in other objects.
  • An identifier needs to be composed only of letters and numbers, with no spaces. For example, "Slay monster" should become something like "SlayMonster".
  • You cannot have two elements that share the same identifier.
  • Identifiers are case-insensitive ("ABC" is treated the same as "Abc" or "abc").
  • Note that you can use the named X command to give an object a displayed name different from its identifier.
  • Only refer to an element's identifier in commands, not to its name!
  • Be careful about plurals. If you gave a resource the identifier cookies, the command gives 1 cookie wouldn't do anything - it should be gives 1 cookies!
  • Important : do not change an element's identifier once set! This would mess up your players' saves since the parser would treat this element as an entirely new object! Instead, change its displayed name.

Boxes

Boxes are blocks in which the game's elements are displayed. You can set, for example, all resources to be displayed in a specific box, and achievements in another (this is done in the settings section). You can even specify that one element in particular will display in a different box.
HTML-wise, boxes are simply <div>s, with a CSS class corresponding to their name. Elements within a box will still be wrapped in their corresponding block first, such as "achievements" or "buildings" - unless the element was specififcally assigned to a different box, in which case it is wrapped directly by the box.
Boxes are kind of an advanced system - make sure you know what you're doing!

Comments

Every line beginning with // will be treated as a comment and will be ignored by the parser.
Lines that the parser did not understand will also be ignored, but might throw an error.

Other syntax tips

  • Pretty much every command is optional, save for the first two lines (Let's make a game! and your game's name).
  • Tabs and multiple spaces are ignored, as are hyphens (-) when they're the first character on a line; feel free to use those to format your source and make it more easily readable.
  • HTML is ignored everywhere except in descriptions, where only <b> (bold), <i> (italics), <u> (underlined) and <q> (quotes) are allowed.
  • If you make a mistake in your source (or use commands in ways we didn't expect), you might get an error message, or the game might freeze completely. Try to undo your last changes and see where it went wrong!
  • By the way, make sure to pay attention when you edit your game. Our parser is designed to be fairly forgiving, but still - a simple typo or syntax error is all it takes to freeze the game!
  • A good way to learn more about our syntax is to simply check out the source for Burger Clicker, a game specifically made to showcase many of Idle Game Maker's functions.

The header

Let's get started!
The first section in a game's source is the header, in which you define the essential information for your game.

Let's make a game!

Every Idle Game Maker game begins with this line. This tells our parser that we're all set and ready to make something way cool.

Name of your game

The next line right after that first line will be your game's name. Call it something sweet and catchy!

by Abc

Sets the game's author to Abc (that's you!).

version X

Defines what version your game is, such as 1 or 2.13 (increase it when you add new stuff!).

created on day/month/year

Defines when your game was created.

last updated on day/month/year

Defines when your game was last updated. You don't have to keep this up to date!

Settings

Once you're done with the header, you can begin the settings section.
This contains miscellaneous settings for your game, such as price inflation, default visibility, background/text color, and others.
Again, each of these commands is optional.

Settings :

Begins the settings section.

prices increase by X%

Defines how much a building's price should increase every time you buy one; a value of 110% means each time you buy a building, it gets 10% more expensive. 100% would mean no price increase; 200% makes the price double.
The default value is 110%. (Note that Cookie Clicker uses 115%!)
  • Note : can be overridden in a specific building with the command price increases by X%.

selling gives back X%

Defines how much a building's price is refunded when selling it. 50% means we get half of its current price back.
The default value is 50%.

resources are hidden|visible by default

Sets the default visibility for resources.

clickables are hidden|visible by default

Sets the default visibility for clickables.

buildings are hidden|visible by default

Sets the default visibility for buildings.

upgrades are hidden|visible by default

Sets the default visibility for upgrades.

achievements are hidden|visible by default

Sets the default visibility for achievements.

boxes : X, Y, Z...

Defines your game's boxes. This does nothing on its own - you must specify the following commands to assign different elements to different boxes.
Box names follow the same naming rules as identifiers : plain letters and digits only, no spaces.
If you do not specify this, a default template of boxes will be used instead.

resources go in the X box

Sets resources to be displayed in the box named X.

clickables go in the X box

Sets clickables to be displayed in the box named X.

buildings go in the X box

Sets buildings to be displayed in the box named X.

upgrades go in the X box

Sets upgrades to be displayed in the box named X.

achievements go in the X box

Sets achievements to be displayed in the box named X.

title goes in the X box

Sets the game's title and author to be displayed in the box named X.

save goes in the X box

Sets the game's save and reset buttons to be displayed in the box named X.

show|hide log

Defines whether the debug log should be displayed or not. We suggest you hide it when releasing your game.

background : X

Sets your game's background to a solid HTML color ("blue", "#0033ff"...) or to the image located at the specified URL. The image will be tiled to fill the screen.

text color : X

Sets your game's base text color. Make sure your text remains readable over your background!

custom stylesheet : X

Idle Game Maker will fetch the CSS at the specified URL and use it for your game. This is very powerful and allows you to completely overhaul the way your game looks. Good places for beginners to learn CSS would be CSS Basics or W3Schools.
Your CSS must be a .txt file, not a .css file.
Note : please do not hide the ad with CSS! You can, however, move the "support" block - but make sure it is always sufficiently far away from the rest of the buttons and can't be misconstrued as game content!

fonts : X, Y, Z...

Idle Game Maker will load the specified Google Fonts (identified by their name, such as "Kavoon, Chango, Freckle Face") for use in your CSS.

Resources

A resource is something that adds up over time or through player action. It could be a currency, an amount of some generic item, a score...
A game like Cookie Clicker has only one resource (cookies), but you could imagine, for example, a game where you can cook the Chocolate resource, which you sell for the Money resource, with which you can buy the Candies resource...

Resources :

Begins the resources section.

*abc

Defines a new resource with identifier abc.

starts at X

The player will begin the game with X of this resource.

show X digits

How many digits after the floating point should be shown when displaying this resource's amount. For an amount of 3.14159, show 0 digits would display 3, show 1 digit would display 3.1 and show 2 digits would display 3.14.
Default is 0.

displayed as Abc

Gives a custom display string for this resource, where %a is replaced by its amount, %s displays an "s" if the amount is different from 1, and %r displays the resource's name with possible plural. For example, You have %a cookie%s would render as "You have 123 cookies".
Default is %a %r ("123 cookies").

on finding say Abc

When we earn an amount of this resource (and the chance of earning it is less than 100%), display a notification with the text Abc, where %a is replaced by the amount earned, %s displays an "s" if the amount is different from 1, and %r displays the resource's name with possible plural. Use this sparingly, you don't want to fill your players' notifications because of "rare" objects they find every few seconds!

Clickables

A clickable is a button on which the player can click, generally to manually increase a resource.
In Cookie Clicker, this could be the big cookie. Clickables are very versatile however, so feel free to get creative!

Clickables :

Begins the clickables section.

*abc

Defines a new clickable with identifier abc.

says Abc

Show a notification containing the text Abc when this clickable is clicked. (Don't overdo it!)

on success says Abc

Display a notification with text Abc if we clicked on this clickable and we met its requirements.

on failure says Abc

Display a notification with text Abc if we clicked on this clickable and its requirements were not met.

gains X% per Y

This clickable's powers gain +X% multiplied by the amount of resource/building Y. 100%, with 3 of Y, would mean this produces/uses up 300% more resources per click.

converts X to Y

When we click this clickable, the resource/clickable/building X transfers its amount into the resource/clickable/building Y.

Buildings

A building is anything that you can buy several of, and that generates resources for you depending on how many you have.
In Cookie Clicker, these would be the cursors, grandmas, farms...

Buildings :

Begins the buildings section.

*abc

Defines a new building with identifier abc.

starts at X

The player will begin the game with X of this building.

price increases by X%

Defines the price increase ratio for this building only, independently from the base setting.

gains X% per Y

This building's powers gain +X% multiplied by the amount of resource/building Y. 100%, with 3 of Y, would mean this produces/uses up 300% more resources.

represents X Y

Each of this building grants a passive amount X of resource Y (which is removed when the building is sold).

occupies X Y

Each of this building takes up a passive amount X of resource Y (which is freed when the building is sold).

Upgrades

An upgrade is something you can buy once to gain something such as a passive boost to resource production, or unlocking a building or clickable.

Upgrades :

Begins the upgrades section.

*abc

Defines a new upgrade with identifier abc.

multiplies efficiency of X by Y%

Having this upgrade amplifies the powers of building/clickable X by Y%. 200% would mean X produces/uses up twice as much resources.

multiplies efficiency of X by Y% per Z

Having this upgrade amplifies the powers of building/clickable X by Y%, multiplied by the amount of resource/building Z. 100%, with 3 of Z, would mean X produces/uses up 300% more resources.

multiplies income of X by Y%

Having this upgrade multiplies any income of the resource X by Y%. 200% means anytime we'd earn 10 of X, we'd receive 20 instead.
Note : these last 3 commands all stack multiplicatively!

converts X to Y

When we buy this upgrade, the resource/clickable/building X is turned into the resource/clickable/building Y, retaining its amount. The element X becomes invisible.

Achievements

An achievement is a trophy testifying a milestone or a feat, such as having 100 of a building or raising a resource over 1 million.
Unlocking an achievement is the same as earning it.

Achievements :

Begins the achievements section.

*abc

Defines a new achievement with identifier abc.

Generic commands

These are commands that can be used for all or most element types. Not all element type combinations work - watch out for bugs, freezing, and unexpected behaviors!

named Abc

Sets the element's name to Abc, independently from its identifier.

named Abc|Abcs

Sets the element's name to Abc, and its plural to Abcs.

"abc"

Anything between quotes will define the element's description, shown in tooltips.

image : X

This sets the element's picture to the specified url. This might behave differently depending on the element's type.

classed : X, Y, Z...

Adds the specified CSS classes to the element.

goes in the X box

This element will be displayed in the specified box, instead of the default box specified in the settings.

visible|hidden

Defines whether this element should be visible or hidden by default, overriding the default setting.

abstract

This means the element will never be displayed. Use this for hidden elements that affect the gameplay without being clickable or purchasable.

visible at X Y

This element will only be visible when we have at least amount X of resource/building Y. If we fall below X, the element will become hidden again.

unlocks with X

This element is unlocked when the element X gets unlocked.

unlocks at X Y

This element is unlocked when we have at least amount X of resource/building Y.

unlocks X

This clickable/building/upgrade unlocks the element X when clicked/bought.

locks X

This clickable/building/upgrade locks the element X when clicked/bought.

requires X Y

This clickable/building/upgrade can only be bought/clicked if we have at least amount X of resource/building Y.

requires X

This clickable/building/upgrade can only be bought/clicked if we have the upgrade X.

costs X Y

This building/upgrade uses up amount X of resource/building Y when bought (the cost will be rounded up if Y is a building). If this is a building, the cost is subject to price increase.

Power commands

These are special commands that only apply to clickables, buildings, and upgrades. They generate and use up resources and buildings.
A clickable will run these once per click (if it meets its requirements); a building or an upgrade will run these on a per-second basis.
A building will multiply the gains and losses by its amount.

gives X Y

This element gives amount X of resource Y per run.

gives X1>X2 Y

Same as above, but gives a random amount of Y between X1 and X2.

gives Xa Ya, Xb Yb, Xc Yc...

This element gives multiple types of resources.
Note : the last 2 commands can be mixed like so - gives X1a>X2a Ya, X1b>X2b Yb...
You can also follow the same syntax with the following commands.

takes X Y

This element takes amount X of resource Y per run.

builds X Y

This element builds amount X of building Y per run.

destroys X Y

This element destroys amount X of building Y per run.

multiplies X Y%

This element multiplies the amount of resource/building X by Y% (200% would double it). The amount gained is rounded up if X is a building.

...N% of the time

This power only takes effect a percent of the time (80% means there's 1 chance in 5 it won't run).
Note : you can mix and match this command and the others like so - gives 10 cookies 50% of the time for 5 dollars

...for Xb Yb

This power only takes effect if we have at least amount Xb of resource/building Yb, and uses that amount in the process.

...requiring Xb Yb

This power only takes effect if we have at least amount Xb of resource/building Yb.

...when bought

This power only takes effect if it's a building/upgrade and it is being bought (instead of per-second).

...when sold

This power only takes effect if it's a building and it is being sold (instead of per-second).

Conclusion

Closing words

Ready to show off your new game? Take your game's URL and share it with anyone you want. Send it to your family, your friends, your dog!
Communities such as r/idlegamemaker will be more than happy to play and comment on your game. And who knows, if your game makes enough noise, we might even end up featuring it!

Credits

Idle Game Maker is an app by Orteil and Opti, 2014. All rights reserved.
We hope you have as much fun using it as we had making it!
Need to contact us? Please do so through our forums.