Omni
|
I don't know about that. I still can't draw or anything, but you just need a common vision of your RPG to start, I guess. As for music, or pixel art, use the CHRmak series of programs and whatnot, and for music, Verge uses .mods, .s3ms, .xms, and something else, I think, anyway, you can use Modplug Tracker (www.modplug.com) to create music. Highly recommend you download their quick start kit or whatever, as it explains how it works.
For programming, well....All I can say is, you must know how to use variables, but do you know how the C structure works? Everything is in functions. you can declare functions, like so...
void {name}(arguments)
so I could create a function like
void text(string a)
where string a is an argument I will create. Any argument that uses a variable will be defined, so you do not have to declare it in code. For example,
void text(string a)
{
MsgBox(" " & a & " ", 100);
}
where MsgBox is a verge2 function that displays a message. I pass the argument, a, to it, and I add 100 as an argument to MsgBox, where 100 is the number of ticks (in hundreths per second) that I want the message to remain on screen. Once you declare a function, you can "call" it at any time, like this:
text("What are you doing?");
and it would work. To declare stuff, besides, functions, there are integers, and strings, declared like so:
int name;
string name, name2;
You can separate them by commas. Integers are numbers, strings are alphanumerical (duh.). You can also declare arrays, you studied those, right? The groups of variables, like so:
int name[slots];
or
string name[slots];
so I could type
int HP[4];
where 4 is the number of slots the array holds. Each one can hold a separate number. All slots are initialzed as zero if they are integers, and blank if they are strings. You could assign them a value at declaration, like this:
int versionnumber=2;
Verge integers cannot handle floating point, last I checked, so no decimals.
Arrays always start at zero, so if I declare int HP[4] I then have to start assigning values like so:
int HP[4];
HP[0]=200;
and whatnot. All lines in VergeC and real C code end in a semicolon ";".
int name;
If a function has no arguments then just use parentheses, like
void Exit()
{
Exit("This game has terminated.");
}
When you declare a function, its code is encased in brackets. Verge does not support object-oriented programming (though there are workarounds, I think...)
There are no semicolons on the line after the declaration of a function, like
void Exit(); ----this is wrong.
Notice the "void"? There are two types of functions. Ones that return values and ones that don't. A function beginning with int returns a value, like the Cachesound function.
With Cachesound, it loads a file into RAM and gives you the memory address for it. So to play a sound, try this:
Int pointer;
pointer = Cachesound("dong.wav");
Playsound(pointer, 120, 60);
where pointer is the pointer to the file in memory, 120 is the center between stereo speakers (I think), and 60 is volume.
Like I said, all VergeC is in functions. If you are using Winv2 or V2.5, then at the start of your system.vc you need an autoexec() function, which is like a startup script.
void autoexec()
{
// insert whatever startup code here.
}
"//" denotes short one line comments.
*/ denotes long comments and ends with */.
As for variables, you can declare them in two places: inside a function, and outside in a system.vc file. If you declare them for a function, like this:
void variable()
{
int variable;
}
then the variable can only be used inside the function. If you declare it outside a function (preferably at the top of VC files) then it is global and can be used with any function. Some weird version of verge actually had you tell the global or local type, like
global int versionnumber;
or
local int ID;
but most don't. Um, as for MAP VC code, this is the code used by your maps. When you specifiy the actions for zones or entities to do with Maped, type in the number of the event of the code. An event is declared as
event
{
// event code here
}
You can use any command inside an event function, but you cannot declare variables. Also, the MAP VC file must have the same name as the actual MAP file it goes to.
The very first event you have in any MAP VC file is the "Zero" event, and is automatically executed when you enter the map, like an intro event in RPGMaker 2000.
event
{
// event 0 code (auto)
}
event
{
// This is the first event
}
Again, you cannot declare variables in event functions, but can use any other code or functions you declared. For usable functions and built in variables see the VergeC.txt file or read it on the Vergesource Article page. Also read the FAQ on Vergesource.
Also, for the preprocessor directives, there are two:
#define and #include.
Include is used to include another VC file in another one, which is useful because all VC files you wish to use (except MAP VC) must be linked to system.vc.
So, in system.vc, you could put
#include battle.vc
and whatnot, if you decided to split your code up that way. Define is used to make constants. We are familiar with these, sure...
#define VERSION=2
And you cannot change a constant. As far as I know, includes and defines (and variables and strings declared) should go at the top of the VC file. Unless they are local and declared inside a function of course. If a VC function has a local variable which has the same name as a global one, like this:
--------------------
int globalvar;
void nothing();
{
int global;
global=10;
MsgBox(" " & global & " ", 100);
}
Then it will not use the local variable but will se the global variable to 10, and then print it. As far as I'm told, anyway.
If you understood any of this, let me know at Jud_craft@engineer.com. Or just reply to this. A couple more things.
I believe you can create your own functions that return integers and strings. In this case, I believe they have an int prefix, although I could be wrong, like this:
-----------------
int myadditionfunction(int a, int b)
{
return a+b;
}
-----------------
Yeah, I think it works like that. You can also specify a string to be returned in Winv2 and in V2kj, I think....
There are no structures or classes, if you know those, in VergeC. There was something else...
Oh yeah, one of the perks of VergeC and C in general is its function structure. This allows you to mix and use various functions within others instead of typing the same code over again, by allowing you to use so many commands and your own functions. This is a major advantage of C.
Also, you said BASIC? You mean like ATARI 800XL Basic or Visual BASIC or QBASIC or what?
If you don't understand any of this, I'll try to explain it a bit further. Let me know.
Posted on 2002-01-24 15:10:16
|