FMCL Tutorial, Anyone?

Come talk about the game, your Contraptions, and your solutions!

FMCL Tutorial, Anyone?

Postby Season on Sun Nov 30, 2008 8:37 pm

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
____________________________________________________________

link: http://fc.therisenrealm.com/webfcml/

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.
Image
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 area
BuildArea (0, 100), (500, 200), 0
GoalArea (-160, -200), (60, 60), 0

; You can add more FCML below

; Generated circle at (0, -200), radius=200, bar=35x25
StaticRect (-200, -200), (35, 25), 270
StaticRect (-196, -165), (35, 25), 260
DynamicRect (-187, -131), (35, 25), 250
StaticRect (-173, -100), (35, 25), 240
StaticRect (-153, -71), (35, 25), 230
StaticRect (-128, -46), (35, 25), 220
DynamicRect (-99, -26), (35, 25), 210
StaticRect (-68, -12), (35, 25), 200
StaticRect (-34, -3), (35, 25), 190
StaticRect (0, 0), (35, 25), 180
DynamicRect (34, -3), (35, 25), 170
StaticRect (68, -12), (35, 25), 160
StaticRect (99, -26), (35, 25), 150
StaticRect (128, -46), (35, 25), 140
DynamicRect (153, -71), (35, 25), 130
StaticRect (173, -100), (35, 25), 120
StaticRect (187, -131), (35, 25), 110
StaticRect (196, -165), (35, 25), 100
StaticRect (200, -200), (35, 25), 90
; End generated circle
StaticRect (0, 200), (1000, 50), 0
StaticCircle (0, -200), (300, 300), 0
GoalCircle (170, -1000), (35, 35), 0
User avatar
Season
 
Posts: 817
Joined: Wed Oct 01, 2008 9:40 pm
Location: San Antonio, Texas

Re: FMCL Tutorial, Anyone?

Postby tmusquiez on Sun Nov 30, 2008 8:37 pm

I'm a CS major myself, so this would be awesome to learn!
User avatar
tmusquiez
 
Posts: 1880
Joined: Sun Oct 05, 2008 11:29 am
Location: San Antonio, Texas

Re: FMCL Tutorial, Anyone?

Postby qweg33 on Sun Nov 30, 2008 8:44 pm

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?

Postby Season on Sun Nov 30, 2008 8:46 pm

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.
User avatar
Season
 
Posts: 817
Joined: Wed Oct 01, 2008 9:40 pm
Location: San Antonio, Texas

Re: FMCL Tutorial, Anyone?

Postby Season on Sun Nov 30, 2008 9:15 pm

FCML is a map editor for Fantastic Contraption, qweg.
Here's the link:
http://fc.therisenrealm.com/webfcml/
User avatar
Season
 
Posts: 817
Joined: Wed Oct 01, 2008 9:40 pm
Location: San Antonio, Texas

Re: FMCL Tutorial, Anyone?

Postby Dr. Phil on Sun Nov 30, 2008 9:26 pm

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.
Image
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 area
BuildArea (0, 100), (500, 200), 0
GoalArea (-160, -200), (60, 60), 0

; You can add more FCML below

; Generated circle at (0, -200), radius=200, bar=35x25
StaticRect (-200, -200), (35, 25), 270
StaticRect (-196, -165), (35, 25), 260
DynamicRect (-187, -131), (35, 25), 250
StaticRect (-173, -100), (35, 25), 240
StaticRect (-153, -71), (35, 25), 230
StaticRect (-128, -46), (35, 25), 220
DynamicRect (-99, -26), (35, 25), 210
StaticRect (-68, -12), (35, 25), 200
StaticRect (-34, -3), (35, 25), 190
StaticRect (0, 0), (35, 25), 180
DynamicRect (34, -3), (35, 25), 170
StaticRect (68, -12), (35, 25), 160
StaticRect (99, -26), (35, 25), 150
StaticRect (128, -46), (35, 25), 140
DynamicRect (153, -71), (35, 25), 130
StaticRect (173, -100), (35, 25), 120
StaticRect (187, -131), (35, 25), 110
StaticRect (196, -165), (35, 25), 100
StaticRect (200, -200), (35, 25), 90
; End generated circle
StaticRect (0, 200), (1000, 50), 0
StaticCircle (0, -200), (300, 300), 0
GoalCircle (170, -1000), (35, 35), 0
User avatar
Dr. Phil
 
Posts: 2509
Joined: Wed Aug 27, 2008 2:02 pm

Re: FMCL Tutorial, Anyone?

Postby Season on Sun Nov 30, 2008 9:27 pm

Well done.
See, it's not as difficult as it looks. Especially for a CS major =P.
User avatar
Season
 
Posts: 817
Joined: Wed Oct 01, 2008 9:40 pm
Location: San Antonio, Texas

Re: FMCL Tutorial, Anyone?

Postby Dr. Phil on Sun Nov 30, 2008 9:34 pm

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?"
User avatar
Dr. Phil
 
Posts: 2509
Joined: Wed Aug 27, 2008 2:02 pm

Re: FMCL Tutorial, Anyone?

Postby Season on Sun Nov 30, 2008 10:09 pm

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 - (-,+)
User avatar
Season
 
Posts: 817
Joined: Wed Oct 01, 2008 9:40 pm
Location: San Antonio, Texas

Re: FMCL Tutorial, Anyone?

Postby sk89q on Sun Nov 30, 2008 10:15 pm

Cartesian coordinate system != most 2D computer game coordinate systems
User avatar
sk89q
 
Posts: 577
Joined: Mon Aug 11, 2008 11:07 pm

Re: FMCL Tutorial, Anyone?

Postby Dr. Phil on Sun Nov 30, 2008 10:19 pm

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

makes me wonder what good high school algebra ever did me...
User avatar
Dr. Phil
 
Posts: 2509
Joined: Wed Aug 27, 2008 2:02 pm

Re: FMCL Tutorial, Anyone?

Postby Season on Sun Nov 30, 2008 10:25 pm

Wow, I've never heard about that coordinate system. Oh well. Thanks for clarifying!
User avatar
Season
 
Posts: 817
Joined: Wed Oct 01, 2008 9:40 pm
Location: San Antonio, Texas

Re: FMCL Tutorial, Anyone?

Postby sk89q on Sun Nov 30, 2008 10:52 pm

Only the quadrants are flipped. Nothing much more.
User avatar
sk89q
 
Posts: 577
Joined: Mon Aug 11, 2008 11:07 pm

Re: FMCL Tutorial, Anyone?

Postby Season on Sun Nov 30, 2008 11:13 pm

Alright cool thanks.
User avatar
Season
 
Posts: 817
Joined: Wed Oct 01, 2008 9:40 pm
Location: San Antonio, Texas

Re: FMCL Tutorial, Anyone?

Postby Dr. Phil on Wed Dec 31, 2008 3:15 pm

bump for helpfulness
User avatar
Dr. Phil
 
Posts: 2509
Joined: Wed Aug 27, 2008 2:02 pm

Re: FMCL Tutorial, Anyone?

Postby Afronanny on Wed Dec 31, 2008 3:41 pm

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
User avatar
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?

Postby Dr. Phil on Wed Dec 31, 2008 4:24 pm

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
User avatar
Dr. Phil
 
Posts: 2509
Joined: Wed Aug 27, 2008 2:02 pm

Re: FMCL Tutorial, Anyone?

Postby sk89q on Wed Dec 31, 2008 5:48 pm

Image
User avatar
sk89q
 
Posts: 577
Joined: Mon Aug 11, 2008 11:07 pm

Re: FMCL Tutorial, Anyone?

Postby Dr. Phil on Wed Dec 31, 2008 7:25 pm

very nice, im going to steal that image and put it in the OP
User avatar
Dr. Phil
 
Posts: 2509
Joined: Wed Aug 27, 2008 2:02 pm

Re: FMCL Tutorial, Anyone?

Postby Season on Wed Dec 31, 2008 11:07 pm

Woah, I thought this thread died. Rename the thread to Lazarus!
User avatar
Season
 
Posts: 817
Joined: Wed Oct 01, 2008 9:40 pm
Location: San Antonio, Texas

Next

Return to Levels and Game Chat



Who is online

Users browsing this forum: Google [Bot]

cron