BYOND CHAPTER I
By: Raivu
WHAT IS BYOND?
BYOND is the premier community for making and playing online multiplayer games. As a player, enjoy hundreds of games created by our community, by people just like you. As a developer, make your own indie sensation with an easy-to-learn language, built-in online support, tools for developers, and plenty of articles and tutorials.
WHERE CAN I GET IT?
As I mentioned before, Byond is absolutely free, and the coding is incredibly easy to learn and gives you a basic understanding of how coding works for any style. In this tutorial, I'll get you started and teach you how to make your own game.
LETS GET STARTED
First, make sure you download Byond (link above). When you do, it'll come with 3 tools.
-"BYOND" which is the pager so you can play games right from your desktop and IRC with friends
-"DREAM MAKER" which is the program we'll be using to code and create our own games
-"DREAM DAEMON" which is the program used to host your games online for others to play
So for now, open "DREAM MAKER" and we can get started.
STEP 1:
When you open Dream Maker, this is the first thing you'll see. This is the general interface of the program.
Click "File > New Environment" and lets name it "Test World"
Now it'll ask you to create a Code (.dm) file. Just name it "Test World"
STEP 2:
Okay, so now we're going to make our Sprites first.
Click "File" > "New" and change the box from "Code File" to "Icon File" in the dropdown box. Lets name that "Player" and click [OK]. It'll open a new (.dmi) file on the left-hand side with an image of a Paint Pallet and a Video Camera.
For this example, I'll use sprites from Spriters Resource.
Click Here: The Spriters Resource | Main Page
That will take you to a website with ripped videogame sprites.
1. Go to "Gameboy Advance" on the left hand side bar.
2. Click "P" on the alphabet on the top of the webpage.
3. Look for "Pokemon FireRed/Leaf Green", and click it. It'll open sprite images.
4. Click "Ruby and Sapphire Heroes" and it'll open a new page with the sprite sheet.
5. "Right Click > Save As" and save it somewhere you'll remember it.
6. Go to the path you saved the sprite sheet in, right click it, and Open it with Paint.
7. You should see multiple directions for each character. Zoom in, and use the Selection tool to select your character.
8. CTRL+C (copy) the selected sprite
9. Go back to DREAM MAKER, and click the Video camera icon. It will open a 3x4 cell page with Directional arrows pointing Down, Up, Left, and Right. These are the directions you push on the keyboard to make your character move.
10. Double Click on the first cell in the Down section (top left corner), and Paste your copied sprite into the Pallet. Click the "Flood" option on the left and right-click around your character until all you have is the character itself, as seen below.
11. After that's done, do the same with the other motions of your sprite on the sprite sheet you have open in MSPaint until you get a screen that looks like this.
12. Click the number above each cell "should be 1" and change it to "2". The higher the number, the slower their sprite moves. No sense running a million mph to go 2 feet.
13. Click "Back" on the bottom right hand corner, and it'll bring you back to the sprite sheet. Right-Click on the small image of the sprite you just made, and click "Edit State". Name it "male" and select the box "Movement State"
STEP 3:
Now we'll make our Turf (Grass, Water, etc.)
To do this, go to "File>New" and create another icon file (.dmi) but name this one "turf"
Now instead of selecting the Videocamera, we'll select the Paint Pallet icon.
Select the "Flood" tool, and Green on the color pallet. Paint it all green, and name it "grass".
Make another one, make it blue, and name it "water"
Now, we'll go ahead code all of this in. Make 2 new code files
Click "File>New" and select "code file (.dm)" in the first box, and name the second one Player, then do the same and name the second code file "Turf"
Below is the code we'll enter for the Turf. I'll break it down for you.
Code:turf (you put it as the parent code for environment icons)Code:Grass (the title of the icon)Code:icon = 'turf.dmi' (This means the icon is in the "turf.dmi" file)Code:icon_state = "grass" (This means the icon in that file is titled "grass"Code:density = 1 (This means you can't pass through it.)Code:verb (we're going to make the water have an option)Code:Look() (the name of the option. We want to look at the water)Code:set src in oview(1) (The src(icon) has to be one pixel away in your view for you to use the "look" option)Notice, we have the code indented (press Tab to do so after each line)Code:usr << "You see your reflection" (You get a message on the side telling you "You see your reflection"
This means that the child code (icon, density, etc.) is in the parent code (grass)
Think of it as an Adjective. Something describing something else.
Verb means we're making this icon do something, or have an option. Now this water in game will have a "Look" option when we right click on it.
Now lets go to "Player.dm" and enter this code for the Male
It's the same as before, we're just establishing that the Mob (user/character) is an icon named "male" in the file 'player.dmi'
**IMPORTANT NOTE**
Capitalization and correct spelling is key in coding
STEP 4:
Now that we have that, lets create our World.
Click "File>New" and make a Map file now. The Map works on an "X,Y,Z" basis.
X is how many icon-spaces horizontal
Y is how many icon-spaces vertical
Z is how many of these sections exist.
Lets name our Map file "world"
Before we click it, we're going to click "Ctrl+K" on the Keyboard. This Compiles (saves) your project and checks it for Errors. Right now, you should have no errors.
Now, we're going to fill the blank space with Grass and Water. DO NOT cover the bottom left hand corner of the map in Water, because that's where you start.
our water is Dense. If you start in it right now, you can't move. So make the water go around it.
When that's finished, click the "File" tab on the left hand side above your list of icons, and click the "TestWorld.dm" option. That'll bring us back to the code. Now we want to code in our character so we can actually start in this world.
Make sure your code looks Exactly like mine.
we're going to name our world "Test World", as you can see
we're also going to put in "/turf/Grass".
What this does, is automatically fills our map with Grass as the base icon so we don't have to.
We're going to also put our character in the Mob section, only this time we're not going to put "male" after the "mob".
Mob (Stating it's your character)
Icon = 'player.dmi' (this is where the Icon is)
Icon_state = "male" (this is what the icon is called)
Now lets Compile (ctrl+K) our game, and Run it (ctrl+R)
SEE MORE IN CHAPTER II
Quick Notes and Meanings
MOBS
"Mob" means in order for the verb trk, a mob must exist in the world
Mobs can be NPCs, You, and other players.
Mob is short for "Mobile"
Mob is a "parent", which is the code the verb, proc, etc. belongs to. Those are the children.
VERBS
"Verbs" are what you do. Verb is a child code to Mob (parent), but can also be a parent to other code such as "Say". (Since "Say" is what you're doing)
Verbs take "Arguments"
With a verb, Arguments come from the player.
ARGUMENTS
Arguments are "Input" for the player.
Common Arguments are abbreviations for bigger words.
In this case, it's "msg", short for "message".
You can call an argument anything you want. it's best to go with something short and easier to type
OPERATOR
The Operator is the "<<" signs. (Two lesser-than signs)
Operators are Symbols placed between things that cause specific things to happen.
Example:
with "<<" the Right side is being output to the left side, which is the Whole world.
"world << "hello my name is Plague"
"world >> "eugalP si eman ym olleh"
IMBEDDED EXPRESSIONS
Imbedded Expressions are the quotes that go around something, or anything similar.
With quotes around something, it means the whole thing is a text string. What the player typed in, our msg, is a text string. or "text".
When something is a text string, it has the [] brackets around it. That's called an embedded expression.
Example:
A nugget buried in our text string
KEY: Whenever you embed something in brackets, that means its going to get replaced as the user sees it.
Example: [usr] is replaced by the Username.
Example: [msg] is replaced by the Message
COMPILING AND RUNNING
Go under the Build menu and choose "Compile."
Bottom menu will say:
Loading Testworld.dme
Saving Testworld.dmb
Testworld.dmb - 0 errors, 0 warnings
ICONS
To make a new icon, go to File>New>Icon File(.dmi)
Use Icon files to create Icons for your game. Its best to keep them seperate
ICON STATES
After you've made your icon, go to the .dmi file it's located in, double click underneath your icon, and you'll be able to change the name of it.
The name of that icon that you choose is its Icon State.
PROCS
Proc is short for Procedure.
Procs are littel bits of code that make all the action happen
Every proc has Parentheses () after its name.
When your game is ordered to do something, it "calls" a Proc.
Example: Login() gets called automatically when a player logs in
Example: Logout() gets called automatically when a player logs out
Example: the ..() command says to go call the actual Built-in Login() proc. Thats what puts us on the map.
IMPORANT: The Login() I coded is a child, and it doesn't know everything the parent does. So we tell it to go ask its parent what to do with that ..() line.
VARS
Var is short for Variable.
Characteristics of Mobs and Turfs (such as Icon and Gender) are built-in variables.
A variable is a place where a bit of data is stored. It's called a variable because we can change it at will, so the info it gets can vary
Results 1 to 31 of 31
- 01 Feb. 2012 06:13pm #1
- Age
- 33
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 15.00
BYOND chapter I: What is Byond? Basic Coding
☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 01 Feb. 2012 06:15pm #2
- 01 Feb. 2012 06:18pm #3
- Age
- 33
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 1027.00
Thanks. yeah, I've been working on one game by myself for 2 1/2 years that's not even halfway done. More heads are better than one, and the coding is very easy to grasp and you can get as complex as you want with it.
With multiple heads who have a basic grasp of it, we can push a game for LG in no time, put it up for thousands (or just us) to play online together whenever we want. We can even incorporate forums into an in-game browser when your character logs onto a computer or something in game haha.☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 01 Feb. 2012 06:29pm #4
for a Custom User Title
- Age
- 33
- Join Date
- Apr. 2010
- Location
- Louisiana
- Posts
- 2,835
- Reputation
- 157
- LCash
- 15.00
I was wondering if you started one already.
Just reading over this it takes me back to the days my Ex and I started work on a MMO to fit our likes. It took 4 people, 2 artists and 2 coders; and almost 3 years of work. Still never got it finished, we all got bored of it after awhile.
I listen for the whisper of your sweet insanity.
While I formulate denial of your effect on me.
- 01 Feb. 2012 06:41pm #5
- Age
- 33
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 5159.00
This is the Pokemon Game I've been working on.
It's what I've got put into it already.
STORY:
Your mom left the day before you begin your Journey to get your father.
You wake up, and she's not there, but your grandmother, who's living with you, still is.
So you arrive at Oaks lab late. He tells you to get a late slip from your mother/grandmother.
So you go to your house, get a slip signed by your Gmom, who explains she hasn't heard from your mother.
You return it to Oak and he tells you to choose which starter pokemon you'd like "one of 9 (first 3 gens)" and there are 3 already open Pokeballs on the Table. 3 anonymous trainers donated them to Professor Oak, and the first 3 got them, but he doesn't know what they were. Throughout the game, you run across these 3 trainers with those unknown Pokemon and you have to beat them If you choose to do so. You find out Team Rocket kidnapped your parents along with a number of other random civilians whom they've killed off or held ransom for rare Pokemon from the japanese government.
Features:
-Take on Jobs/Apprenticeships
--Merchant
--Nurse/Doctor
--Farmer
--Breeder
--Thief
--Police
--Thug (Team Rocket/Magma/Aqua)
--Entertainer
--Musician
--Artist
--Gym Leader apprentice
--Miner
--Fisherman
--Hacker
--Bounty Hunter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Pokemon Stat increase by item/Clothing combo
--Cigarette (Poison/Fire Pokemon)
--Bandana (Fighting/Ground pokemon)
--Magma Clothes (Fire)
--Aqua Clothes (Water)
--Ruby Clothes (3rd gen pokemon)
--FireRed Clothes (1st,2nd gen pokemon)
--Bandage (+HP)
--Bug Hat (Bug pokemon)
--CoolTrainer (Pokemon Speed)
etc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Wardrobe in your Room/Backpack
--Change Clothes whenever
--Change Hairstyles through Books
--Change Eyecolors with Contacts
*All Effect Pokemon Stats
*USER HAS HEALTH AS WELL (Be Careful around Pokemon/Trainers)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-OTHER
-Jail System
-Bounty System (user can break out by use of Pokemon. Broadcast on the News for trainers to hunt down and bring to Justice)
-Thieving System (For Thieves/Team Rocket)
-Team Rocket Automated and Users
-Different Pokemon appearances at Night/Day and Stat Increases
-user can get different jobs anywhere either part time/full time
-user can collect items
-Tree House enabled!
-Regular House Enabled!
-Furniture Store
-Families Enabled
-Party System Enabled
-Cell Phones
-Rideable Pokemon for any Terrain
-Bikes/Motorcycles
-Martial Fighting System (Increases Stats in Fighting pokemon)
**as USR skill increases, as does POkemons**
-Training System☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 01 Feb. 2012 06:45pm #6
for a Custom User Title
- Age
- 33
- Join Date
- Apr. 2010
- Location
- Louisiana
- Posts
- 2,835
- Reputation
- 157
- LCash
- 209.00
That game would have appealed to me more if I loved pokémon with the passion of a scenester girl.
I listen for the whisper of your sweet insanity.
While I formulate denial of your effect on me.
- 01 Feb. 2012 06:54pm #7
Administrator Best Avatar Award
- Age
- 32
- Join Date
- Nov. 2009
- Location
- Buenos Aires, Argentina
- Posts
- 6,251
- Reputation
- 790
- LCash
- 259.00
I have that installed, I got it when it was featured in Kongregate, made a couple of crappy sidescrollers and got bored...
- 01 Feb. 2012 06:55pm #8
Mine just force closed ;A;
- 01 Feb. 2012 06:55pm #9
- Age
- 33
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 741.00
haha. I've been a fan since I was a kid. It's one of those ideas that just stuck with me, and made me want to create a very adult-oriented Pokemon game with a deeper more dramatic story line.
Like one of those "What would happen if Charizard really used Flamethrower in the woods? or Pikachu used Thunderbolt on a boat?"
Many would die, and I want that to happen.☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 01 Feb. 2012 07:02pm #10
Administrator Best Avatar Award
- Age
- 32
- Join Date
- Nov. 2009
- Location
- Buenos Aires, Argentina
- Posts
- 6,251
- Reputation
- 790
- LCash
- 411.00
- 01 Feb. 2012 07:14pm #11
for a Custom User Title
- Age
- 33
- Join Date
- Apr. 2010
- Location
- Louisiana
- Posts
- 2,835
- Reputation
- 157
- LCash
- 555.00
I listen for the whisper of your sweet insanity.
While I formulate denial of your effect on me.
- 01 Feb. 2012 07:28pm #12
- Join Date
- Dec. 2009
- Location
- Ontop of a box
- Posts
- 5,090
- Reputation
- 480
- LCash
- 261.00
- Awards
Joe when your game is done... For the love of god let me play it. ;__;
I fucking love pokemon and this game sounds awesome.
All hail kitty pig.
- 01 Feb. 2012 07:32pm #13
- Age
- 33
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 77.00
☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 01 Feb. 2012 08:21pm #14
Global Moderator Literally Hitler
Morbidly Obese
Bird Jesus
- Age
- 34
- Join Date
- Nov. 2009
- Location
- The Land Of Ooo
- Posts
- 8,569
- Reputation
- 711
- LCash
- 35.00
- 01 Feb. 2012 10:06pm #15
Oh jeeze, I haven't used Byond coding since it was back in 3.5 (or earlier, but i think only played before byond 3.5, and 3.5 is when i started coding)
Its not that hard of a language to learn, and it comes with alot of nice tools to help host your game Great work on the game so far, Even though i don't use byond anymore, if I remembered the slightest clue of the coding I'd help if you got stuck, but That was long ago.
Back in the day i made the original Icons for DNO(Not sure if they changed stuff around yet or not) and alot of work with some of the KH fan made games.
- 01 Feb. 2012 10:34pm #16
- Age
- 33
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 215.00
Get back into it bro, definitely.
I've found myself on hiatus a couple times, but I keep coming back☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 01 Feb. 2012 10:38pm #17
- 01 Feb. 2012 11:06pm #18
- Age
- 33
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 483.00
☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 01 Feb. 2012 11:49pm #19
- 02 Feb. 2012 12:09am #20
- Age
- 33
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 329.00
☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 02 Feb. 2012 12:24am #21
My "Turf.dm" code is :
Code:Turf Grass icon = 'Turf.dmi' icon_state = "Grass" Water icon = 'Turf.dmi' icon_state = "Water" density = 1 verb Look() set src in oview(1) usr <<"You see your reflection">>
Code:Turf.dm:8:error: inconsistent indentation
Code:Fakemon.dme:21:error: missing expression
Code:// DM Environment file for Fakemon.dme. // All manual changes should be made outside the BEGIN_ and END_ blocks. // New source code should be placed in .dm files: choose File/New --> Code File. // BEGIN_INTERNALS // END_INTERNALS // BEGIN_FILE_DIR #define FILE_DIR . // END_FILE_DIR // BEGIN_PREFERENCES // END_PREFERENCES // BEGIN_INCLUDE #include "Fakemon.dm" #include "Player.dm" #include "Turf.dm" // END_INCLUDE
---------- Post added at 12:24 AM ---------- Previous post was at 12:14 AM ----------
I did that :/ the only error i get now is :
First world.dme:21:error: missing expression
- 02 Feb. 2012 01:54am #22
- Age
- 33
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 247.00
The Icon_State in the Water code isn't Indented lol. It has to be under the "Icon = Turf.dmi" like in the Grass code
☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 02 Feb. 2012 07:40pm #23
- 02 Feb. 2012 08:05pm #24
- Age
- 33
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 305.00
☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 02 Feb. 2012 08:30pm #25
- 02 Feb. 2012 10:04pm #26
- Age
- 33
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 307.00
☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 02 Feb. 2012 10:39pm #27
- 02 Feb. 2012 10:45pm #28
- Age
- 33
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 97.00
☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 02 Feb. 2012 10:56pm #29
- 02 Feb. 2012 11:06pm #30
- Age
- 33
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 113.00
☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 03 Feb. 2012 03:09pm #31