Table of Contents

Contributing to the Examples

If you would like to contribute an example, please follow the easy steps below:

Category

Please visit Examples and locate a suitable category. Click the category and move to the Example Headline section below.

If none exists you can make one with the following template:

<wrap headline-image>[[objects|{{examples:headline-objects.png|}}]] 
<span>Objects / Sprites</span></wrap>
objects 

is the name of the path for your category, and is the actual link to your category page.

{{examples:headline-objects.png|}}

is the piece of code to use to bring in a suitable 180×100 pixel graphic to represent your category. This one will load headline-objects.png from the examples section. You can upload your own 180×100 image or choose from the ones available in the media manager. If you don't have an image, just use: examples:replace-me.png to use as a placeholder and someone will come along later and put a nice image on it.

<span>Objects / Sprites</span> 

is the title of the category.

Save the page to see your new category. Which will look something like this:

Objects / Sprites

Click the category to go to your new page. Click create to make it for the first time.

Category Page

This is the new category page. Add a major heading to show what category the user is in, for example:

====== Object Examples ======

Example Headline

Create your new example link using the following format on the category page:

<wrap headline-image>[[examples:objects:create_object|{{examples:replace-me.png|}}]] 
<span>Create Object</span></wrap>

Same deal, but take careful note on your new example page's link. The one above shown as:

examples:objects:create_object

This is the path to your new example page to create create_object under examples/objects.

Choose a good image and name of your example.

Save the page, and your link to your example will look something like this:

Create Object

Click the new link and go to your new page to create.

Example

Create the page.

Use the following suggested format in order to show your example:

====== Create Object ======

===== Code =====

<code=c>
orxOBJECT *heroObject = orxObject_CreateFromConfig("HeroObject");
</code>

===== Config =====

<code=ini>
[HeroObject]
Graphic  = HeroGraphic
Position = (320, 200, 0)

[HeroGraphic]
Texture = hero.png
</code>

And you're done!