## FMCL Tutorial, Anyone?

### FMCL Tutorial, Anyone?

Would anybody like me to convert all the techno blabber in the FMCL Help Guidelines page for you or to make a YouTube video tutorial on how to make awesome designs with FMCL code?
The program isn't exactly friendly to people who know nothing about computer programming.
If I can get enough supporters, I'll make something to help y'all.
____________________________________________________________
Adding tutorial to OP for ease of use -Phil
____________________________________________________________

First, lets decipher what all the numbers mean when you create an object

Example: DynamicRect (200, -200), (35, 25), 90
DeynamicRect is the name of the object
(200, -200) is where the object is located on the coordinate plane
(35, 25) is the respective width and length of an object
90 pertains to the rotation of the object, 0-360 degrees

Here is what you need to know. There are four quadrants on the design plane as seen here.

If you wan to place an object in each quadrant you will have to have the correct negative and positive values for the quadrant you want an object in. The quadrants go as follows

II ---------------- I

---------|----------

III-----------------IV

I- (+,-)
II- (-,-)
III- (-,+)
IV- (+, +)

If I want a static rectangle (green object) 1000 units in each direction in the fourth quadrant I would have to make the coordinates (1000, 1000)

You can manually input objects into the fcml editor by selecting the 'Insert: level objects' tab and pick an object.

Plugins
You can use the circle generator or level rotator. The level rotator is self explanatory.

The circle generator is also pretty self explanatory. The only thing you really need to know is how to remove parts of the circle. You can do this by unchecking the box of the quadrant you do not want part of a circle in.

Here is a sample level in FCML format as well as the link to the level, feel free to copy this and paste it into the editor to play around with it.

Code: Select all
`; The following is the name of the level@name Repair; Below is the description@description Repair the pipe; And you must define a build area and goal areaBuildArea (0, 100), (500, 200), 0GoalArea (-160, -200), (60, 60), 0; You can add more FCML below; Generated circle at (0, -200), radius=200, bar=35x25StaticRect (-200, -200), (35, 25), 270StaticRect (-196, -165), (35, 25), 260DynamicRect (-187, -131), (35, 25), 250StaticRect (-173, -100), (35, 25), 240StaticRect (-153, -71), (35, 25), 230StaticRect (-128, -46), (35, 25), 220DynamicRect (-99, -26), (35, 25), 210StaticRect (-68, -12), (35, 25), 200StaticRect (-34, -3), (35, 25), 190StaticRect (0, 0), (35, 25), 180DynamicRect (34, -3), (35, 25), 170StaticRect (68, -12), (35, 25), 160StaticRect (99, -26), (35, 25), 150StaticRect (128, -46), (35, 25), 140DynamicRect (153, -71), (35, 25), 130StaticRect (173, -100), (35, 25), 120StaticRect (187, -131), (35, 25), 110StaticRect (196, -165), (35, 25), 100StaticRect (200, -200), (35, 25), 90; End generated circleStaticRect (0, 200), (1000, 50), 0StaticCircle (0, -200), (300, 300), 0GoalCircle (170, -1000), (35, 35), 0`

Season

Posts: 817
Joined: Wed Oct 01, 2008 9:40 pm
Location: San Antonio, Texas

### Re: FMCL Tutorial, Anyone?

I'm a CS major myself, so this would be awesome to learn!

tmusquiez

Posts: 1880
Joined: Sun Oct 05, 2008 11:29 am
Location: San Antonio, Texas

### Re: FMCL Tutorial, Anyone?

i have no idea what you are talking about lol
qweg33

Posts: 54
Joined: Mon Aug 18, 2008 12:00 pm

### Re: FMCL Tutorial, Anyone?

Oh really?! Awesome!
Yeah actually you should be able to pick this up really easy.
Go in and take a look at it. It's basically just objects with parameters for creating designs that are very neat and tidy. They're circle-creating method is extremely useful and impressive.

Season

Posts: 817
Joined: Wed Oct 01, 2008 9:40 pm
Location: San Antonio, Texas

### Re: FMCL Tutorial, Anyone?

FCML is a map editor for Fantastic Contraption, qweg.
http://fc.therisenrealm.com/webfcml/

Season

Posts: 817
Joined: Wed Oct 01, 2008 9:40 pm
Location: San Antonio, Texas

### Re: FMCL Tutorial, Anyone?

Ill give it a shot, and feel free to quote this and move it to your original post if you find it helpful.

First, lets decipher what all the numbers mean when you create an object

Example: DynamicRect (200, -200), (35, 25), 90
DeynamicRect is the name of the object
(200, -200) is where the object is located on the coordinate plane
(35, 25) is the respective width and length of an object
90 pertains to the rotation of the object, 0-360 degrees

Here is what you need to know. There are four quadrants on the design plane as seen here.

If you wan to place an object in each quadrant you will have to have the correct negative and positive values for the quadrant you want an object in. The quadrants go as follows

II ---------------- I

---------|----------

III-----------------IV

I- (+,-)
II- (-,-)
III- (-,+)
IV- (+, +)

If I want a static rectangle (green object) 1000 units in each direction in the fourth quadrant I would have to make the coordinates (1000, 1000)

You can manually input objects into the fcml editor by selecting the 'Insert: level objects' tab and pick an object.

Plugins
You can use the circle generator or level rotator. The level rotator is self explanatory.

The circle generator is also pretty self explanatory. The only thing you really need to know is how to remove parts of the circle. You can do this by unchecking the box of the quadrant you do not want part of a circle in.

Here is a sample level in FCML format as well as the link to the level, feel free to copy this and paste it into the editor to play around with it.

Code: Select all
`; The following is the name of the level@name Repair; Below is the description@description Repair the pipe; And you must define a build area and goal areaBuildArea (0, 100), (500, 200), 0GoalArea (-160, -200), (60, 60), 0; You can add more FCML below; Generated circle at (0, -200), radius=200, bar=35x25StaticRect (-200, -200), (35, 25), 270StaticRect (-196, -165), (35, 25), 260DynamicRect (-187, -131), (35, 25), 250StaticRect (-173, -100), (35, 25), 240StaticRect (-153, -71), (35, 25), 230StaticRect (-128, -46), (35, 25), 220DynamicRect (-99, -26), (35, 25), 210StaticRect (-68, -12), (35, 25), 200StaticRect (-34, -3), (35, 25), 190StaticRect (0, 0), (35, 25), 180DynamicRect (34, -3), (35, 25), 170StaticRect (68, -12), (35, 25), 160StaticRect (99, -26), (35, 25), 150StaticRect (128, -46), (35, 25), 140DynamicRect (153, -71), (35, 25), 130StaticRect (173, -100), (35, 25), 120StaticRect (187, -131), (35, 25), 110StaticRect (196, -165), (35, 25), 100StaticRect (200, -200), (35, 25), 90; End generated circleStaticRect (0, 200), (1000, 50), 0StaticCircle (0, -200), (300, 300), 0GoalCircle (170, -1000), (35, 35), 0`

Dr. Phil

Posts: 2509
Joined: Wed Aug 27, 2008 2:02 pm

### Re: FMCL Tutorial, Anyone?

Well done.
See, it's not as difficult as it looks. Especially for a CS major =P.

Season

Posts: 817
Joined: Wed Oct 01, 2008 9:40 pm
Location: San Antonio, Texas

### Re: FMCL Tutorial, Anyone?

took me a while to get it, the most confusing thing is how the quadrants are assigned numerals

I- (+,-)
II- (-,-)
III- (-,+)
IV- (+, +)

this table is super important when wanting to know "do i make my number greater to move the object left or smaller?"

Dr. Phil

Posts: 2509
Joined: Wed Aug 27, 2008 2:02 pm

### Re: FMCL Tutorial, Anyone?

Yeah when I started using FCML, I instantly picked it up. Except I still don't understand why, to move an object up 5 spaces, you put a (-) sign in front of the second coordinate parameter. Can you explain this to me? We silly high school sophomores are curious! =P

Algebraically, shouldn't it be:
I - (+,+)
II - (-,+)
III - (-,-)
IV - (-,+)

Season

Posts: 817
Joined: Wed Oct 01, 2008 9:40 pm
Location: San Antonio, Texas

### Re: FMCL Tutorial, Anyone?

Cartesian coordinate system != most 2D computer game coordinate systems

sk89q

Posts: 577
Joined: Mon Aug 11, 2008 11:07 pm

### Re: FMCL Tutorial, Anyone?

sk89q wrote:Cartesian coordinate system != most 2D computer game coordinate systems

makes me wonder what good high school algebra ever did me...

Dr. Phil

Posts: 2509
Joined: Wed Aug 27, 2008 2:02 pm

### Re: FMCL Tutorial, Anyone?

Wow, I've never heard about that coordinate system. Oh well. Thanks for clarifying!

Season

Posts: 817
Joined: Wed Oct 01, 2008 9:40 pm
Location: San Antonio, Texas

### Re: FMCL Tutorial, Anyone?

Only the quadrants are flipped. Nothing much more.

sk89q

Posts: 577
Joined: Mon Aug 11, 2008 11:07 pm

### Re: FMCL Tutorial, Anyone?

Alright cool thanks.

Season

Posts: 817
Joined: Wed Oct 01, 2008 9:40 pm
Location: San Antonio, Texas

### Re: FMCL Tutorial, Anyone?

Dr. Phil

Posts: 2509
Joined: Wed Aug 27, 2008 2:02 pm

### Re: FMCL Tutorial, Anyone?

Sigh. The irony is killing me.

Nice guide!
A little more detail on the basics perhaps but other than that it is fine.
I picked it up instantly (mostly due to me having some knowledge of code from playing around on my TI calculator during math class)

I think more elaboration is needed on the template.
Maybe something like this:
StaticRect (-200, -200), (35, 25), 45
.....^...............^.............^...........^
.....|...............|.............|......Degrees Rotated
.....|...............|.............Dimensions of the object
.....|...............Where it is located
.....What kind of object it is

Afronanny
OUTRAGED!!!1

Posts: 1625
Joined: Thu Sep 18, 2008 5:32 pm
Location: Eating your pie. Don't bother to stop me, I'm finished now.

### Re: FMCL Tutorial, Anyone?

Example: DynamicRect (200, -200), (35, 25), 90

DeynamicRect is the name of the object
(200, -200) is where the object is located on the coordinate plane
(35, 25) is the respective width and length of an object
90 pertains to the rotation of the object, 0-360 degrees

seemed simple enough to me

Dr. Phil

Posts: 2509
Joined: Wed Aug 27, 2008 2:02 pm

### Re: FMCL Tutorial, Anyone?

sk89q

Posts: 577
Joined: Mon Aug 11, 2008 11:07 pm

### Re: FMCL Tutorial, Anyone?

very nice, im going to steal that image and put it in the OP

Dr. Phil

Posts: 2509
Joined: Wed Aug 27, 2008 2:02 pm

### Re: FMCL Tutorial, Anyone?

Season

Posts: 817
Joined: Wed Oct 01, 2008 9:40 pm
Location: San Antonio, Texas

Next