ID:170939
 
Hello. I am planning to go into the videogame design and programming career but I am having major problems figuring out the simplest codes in Dream Maker. I know that this launguage is sort of like C (used in video games) but how close is it to C? Like out of 100% how much is it like C?

**Also if you can reccomend any tutorials I'd love it! I checked out the one at http://zilal.byond.com/tutorials/zbt.html and loved it! But when I searched for tutorials on the site most of them didn't really help... :/ Anyway thanks for the help!
Well, I don't know much about C++, but I think DM is pretty close to it, as they're both object-oriented. Anyway, my advice is to read the Blue Book(Also known as the "DM Guide")
In response to Wizkidd0123
Thanks for the help. I'll read this long thing and hopefully I can understand this more! Thanks again!
In response to Lorddonk
np :)
In response to Wizkidd0123
Wizkidd0123 wrote:
np :)

O.O wasnt he being sarcastic. ROFL oh well.

Ive never bothered to learn C actually C++ I have learned. By the looks in comparisin BYOND uses alot of OOP(Object Oriented Programming). If you have learned C I would think Byond would be a piece of cake.

What I did was look at demos and read articals. Also went through almost all the reference on Dream Maker. I never really read the Blue Book or the Guide intell about 2-3 years after I entered byond. So just reading the guide is not the only way to learning dm. Although I have to admit. It probley is the best way. Since its written by the people who made byond instead of some coder.
In response to Green Lime
Na, he wasn't being sarcastic; when he was talking about reading, he met the Blue Book, not my post. lol
In response to Wizkidd0123
"People who made BYOND"?

"Coder"?

It's programmer, and, DanTom DID program BYOND.

(I believe they did it in "teh assembly" language?)
(01010111010101)
In response to Kholint
I wasn't being sarcastic... if you meant me... anyway thanks for the help to both of my posts!
In response to Kholint
Kholint wrote:
It's programmer, and, DanTom DID program BYOND.

(I believe they did it in "teh assembly" language?)

No, they used VC++. I recall seeing either Dan or Tom say that somewhere.

(01010111010101)

That is usually called machine code. I don't think assembly languages have you type out binary like that.
In response to Loduwijk
Actually, I'm pretty sure they used just plain C++. I don't really know what VC++ is, so we might be talking about the same thing <_<
In response to Wizkidd0123
Wizkidd0123 wrote:
Actually, I'm pretty sure they used just plain C++. I don't really know what VC++ is, so we might be talking about the same thing <_<

When you code C++ you are reffering to mainly dos inhibited programs. They are run in a consoul. While VC++ uses some librarys and you basically use it to make windows applications and stuff like that.

And they used VC++, I know because I .... Ahem well lets just say I know :).
Lorddonk wrote:
Hello. I am planning to go into the videogame design and programming career but I am having major problems figuring out the simplest codes in Dream Maker. I know that this launguage is sort of like C (used in video games) but how close is it to C? Like out of 100% how much is it like C?

DM isn't really like C except that some of the ways it handles loops and program logic are similar. It also has some of the same operators. DM's strength is in making game logic clearer without tying it into the murky logistical depths of a game engine.

C itself is quite different, but then any language based on C is going to have differences from it. Major differences are:

  • C is strongly typed; DM is loosely typed. In C, when you declare a variable for a number, it needs to be "int a" or "float b" or such; even the type of number matters. In DM, the type you give a variable is only used for sanity checking in the compiler and a few handy syntax shortcuts. Type matters in DM but you don't have to pull your hair out over it.
  • In C, commands can be stacked to gether in odd ways that don't work in DM.
  • C relies on braces to define blocks of code. DM uses indentation alone, which looks a lot cleaner.
  • C supports more data types than DM, including several types of numbers.
  • DM is very string-friendly and makes it especially easy to produce text and HTML output.
  • DM handles arrays (lists) in a very nice way, even easily allowing them to be used like hash tables.

    Lummox JR
In response to Green Lime
Green Lime wrote:
Wizkidd0123 wrote:
Actually, I'm pretty sure they used just plain C++. I don't really know what VC++ is, so we might be talking about the same thing <_<

When you code C++ you are reffering to mainly dos inhibited programs. They are run in a consoul. While VC++ uses some librarys and you basically use it to make windows applications and stuff like that.

And they used VC++, I know because I .... Ahem well lets just say I know :).

VC++ is Visual C++. It's microsoft's C++ development environment. Dantom might be using it or another windows IDE to develop BYOND. And no, C++ is not "mainly dos programs".
In response to Jon88
[link]

Like I said, VC++. However, I was not thinking of the other operating systems when I said that, and they obviously do not use it.
In response to Loduwijk
Don't DM and C++(well, VC++) both ignore whitespace? (Except for DM's indentations to start)
In response to Jon88
Jon88 wrote:
Green Lime wrote:
Wizkidd0123 wrote:
Actually, I'm pretty sure they used just plain C++. I don't really know what VC++ is, so we might be talking about the same thing <_<

When you code C++ you are reffering to mainly dos inhibited programs. They are run in a consoul. While VC++ uses some librarys and you basically use it to make windows applications and stuff like that.

And they used VC++, I know because I .... Ahem well lets just say I know :).

VC++ is Visual C++. It's microsoft's C++ development environment. Dantom might be using it or another windows IDE to develop BYOND. And no, C++ is not "mainly dos programs".

Its not but I thought it was counsoul applications O.o could you provide what it is then. And perhaps some facts on a website to back it up?
In response to Green Lime
The dos-style stuff is the easy part to do, using just text stuff. However, you can use the windows API to do whatever you could do in another language, and usually more. You just need to use the Windows API functions to make a new window and do whatever you want to do to it.

Make a new C++ application with the following code in it, then compile and run.
#include <windows.h>

/* Declare Windows procedure */
LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM, LPARAM);
/* Make the class name into a global variable */
char szClassName[ ] = "WindowsApp";
int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nFunsterStil)

{
HWND hwnd; /* This is the handle for our window */
MSG messages; /* Here messages to the application are saved */
WNDCLASSEX wincl; /* Data structure for the windowclass */

/* The Window structure */
wincl.hInstance = hThisInstance;
wincl.lpszClassName = szClassName;
wincl.lpfnWndProc = WindowProcedure; /* This function is called by windows */
wincl.style = CS_DBLCLKS; /* Catch double-clicks */
wincl.cbSize = sizeof(WNDCLASSEX);

/* Use default icon and mouse-pointer */
wincl.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wincl.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
wincl.hCursor = LoadCursor(NULL, IDC_ARROW);
wincl.lpszMenuName = NULL; /* No menu */
wincl.cbClsExtra = 0; /* No extra bytes after the window class */
wincl.cbWndExtra = 0; /* structure or the window instance */
/* Use light-gray as the background of the window */
wincl.hbrBackground = (HBRUSH) GetStockObject(LTGRAY_BRUSH);

/* Register the window class, if fail quit the program */
if(!RegisterClassEx(&wincl)) return 0;

/* The class is registered, let's create the program*/
hwnd = CreateWindowEx(
0, /* Extended possibilites for variation */
szClassName, /* Classname */
"Windows App", /* Title Text */
WS_OVERLAPPEDWINDOW, /* default window */
CW_USEDEFAULT, /* Windows decides the position */
CW_USEDEFAULT, /* where the window ends up on the screen */
544, /* The programs width */
375, /* and height in pixels */
HWND_DESKTOP, /* The window is a child-window to desktop */
NULL, /* No menu */
hThisInstance, /* Program Instance handler */
NULL /* No Window Creation data */
);

/* Make the window visible on the screen */
ShowWindow(hwnd, nFunsterStil);
/* Run the message loop. It will run until GetMessage( ) returns 0 */
while(GetMessage(&messages, NULL, 0, 0))
{
/* Translate virtual-key messages into character messages */
TranslateMessage(&messages);
/* Send message to WindowProcedure */
DispatchMessage(&messages);
}

/* The program return-value is 0 - The value that PostQuitMessage( ) gave */
return messages.wParam;
}

/* This function is called by the Windows function DispatchMessage( ) */
LRESULT CALLBACK WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) /* handle the messages */
{
case WM_DESTROY:
PostQuitMessage(0); /* send a WM_QUIT to the message queue */
break;
default: /* for messages that we don't deal with */
return DefWindowProc(hwnd, message, wParam, lParam);
}
return 0;
}
In response to Lenox
As long as any extra space is not in the indentation or in the middle of a word, and as long as you do not seperate an expression into 2 lines, then everything should work fine.
In response to Loduwijk
Loduwijk wrote:
The dos-style stuff is the easy part to do, using just text stuff. However, you can use the windows API to do whatever you could do in another language, and usually more. You just need to use the Windows API functions to make a new window and do whatever you want to do to it.

Make a new C++ application with the following code in it, then compile and run.
> #include <windows.h>
>
> /* Declare Windows procedure */
> LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM, LPARAM);
> /* Make the class name into a global variable */
> char szClassName[ ] = "WindowsApp";
> int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nFunsterStil)
>
> {
> HWND hwnd; /* This is the handle for our window */
> MSG messages; /* Here messages to the application are saved */
> WNDCLASSEX wincl; /* Data structure for the windowclass */
>
> /* The Window structure */
> wincl.hInstance = hThisInstance;
> wincl.lpszClassName = szClassName;
> wincl.lpfnWndProc = WindowProcedure; /* This function is called by windows */
> wincl.style = CS_DBLCLKS; /* Catch double-clicks */
> wincl.cbSize = sizeof(WNDCLASSEX);
>
> /* Use default icon and mouse-pointer */
> wincl.hIcon = LoadIcon(NULL, IDI_APPLICATION);
> wincl.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
> wincl.hCursor = LoadCursor(NULL, IDC_ARROW);
> wincl.lpszMenuName = NULL; /* No menu */
> wincl.cbClsExtra = 0; /* No extra bytes after the window class */
> wincl.cbWndExtra = 0; /* structure or the window instance */
> /* Use light-gray as the background of the window */
> wincl.hbrBackground = (HBRUSH) GetStockObject(LTGRAY_BRUSH);
>
> /* Register the window class, if fail quit the program */
> if(!RegisterClassEx(&wincl)) return 0;
>
> /* The class is registered, let's create the program*/
> hwnd = CreateWindowEx(
> 0, /* Extended possibilites for variation */
> szClassName, /* Classname */
> "Windows App", /* Title Text */
> WS_OVERLAPPEDWINDOW, /* default window */
> CW_USEDEFAULT, /* Windows decides the position */
> CW_USEDEFAULT, /* where the window ends up on the screen */
> 544, /* The programs width */
> 375, /* and height in pixels */
> HWND_DESKTOP, /* The window is a child-window to desktop */
> NULL, /* No menu */
> hThisInstance, /* Program Instance handler */
> NULL /* No Window Creation data */
> );
>
> /* Make the window visible on the screen */
> ShowWindow(hwnd, nFunsterStil);
> /* Run the message loop. It will run until GetMessage( ) returns 0 */
> while(GetMessage(&messages, NULL, 0, 0))
> {
> /* Translate virtual-key messages into character messages */
> TranslateMessage(&messages);
> /* Send message to WindowProcedure */
> DispatchMessage(&messages);
> }
>
> /* The program return-value is 0 - The value that PostQuitMessage( ) gave */
> return messages.wParam;
> }
>
> /* This function is called by the Windows function DispatchMessage( ) */
> LRESULT CALLBACK WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
> {
> switch (message) /* handle the messages */
> {
> case WM_DESTROY:
> PostQuitMessage(0); /* send a WM_QUIT to the message queue */
> break;
> default: /* for messages that we don't deal with */
> return DefWindowProc(hwnd, message, wParam, lParam);
> }
> return 0;
> }
>


O.o thats what I call VC++ or Win32 and so does every one I know that programs in C++ including collage people. Either alot of people are wrong or Im right :P. Even if a lot of people are wrong they are right because of majority :P.

As I said before, if you can give a site that states that that is specifically C++ then I will appoligize and admit I was wrong. Other wise :P Im right.

Also I balive that the above is known as VC++ or Win32 rather than C++ becuase it uses the window API's. Of course I think those window apis are coded in C++ and are from the C++ langugage. Using them in your program turns ur program into what is called VC++ or Win32.

PS. ROAR! Simply Green, Simpley the un fooled around with lime.
In response to Lorddonk
Okay I need some more help...

(1) I have created a game. And my friend said he'd do testing and stuff for me. So what do I do? Does he just download Byond and then I give him the code ? And if I do that will we 'see' each other in game?

Also I'm having some problems coding a part of the game that I didn't find in manuals, tutorials, etc. How would I I...

(2)what would the code look like if I wanted to make a monster, say, 'bug' move?

(3)And if I wanted to create a boat or something that carries people acrosst the ocean would I do the same thing only make a turf move?

(4)And how do I make stuff re-spawn? The F1 help thing had a code but it didn't work.
Page: 1 2