Error vid_bpp (24)
Displaying 41-50 of 50 total.
prev 1 2 3
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Kreplyn

Lol you guys are funny... so you want me to post anything about sections 2-4?

Posted on 2004-08-17 22:26:59

Zip

Sounds good to me! (44p and nine hours till shop opens)

Zip

Posted on 2004-08-17 23:14:55

Kreplyn

OK Let's get cracking (cracks Fingers while eating loaf of bread) in the second program... well i can't really say much about any of these programs until something is done about the first or introduction... how else will i be able to make sense of out the rest of the programs here and begin critizing them seeing as how you "supposedly made everything understandable in the intro and first... ok well ill try:


void autoexec()
{
SetAppName("Sliding Hello World");
// Give the program a name in the title bar - just to be nice
int x = ImageWidth(screen) / 2;
int y = ImageHeight(screen) / 2;
// This time we are use two variables to store where on the screen the text is put
// They are starting in the middle of the screen, using the same method as before
while (!b3) // If escape is not pressed
{
// Now we are going to check the arrow keys (or gamepad directionals) one at a time
// Then move the text around if a button is pressed at the last ShowPage() call
// We check up OR down then separately left OR right
// So the text will move diagonally if two nonconflicting buttons held down together
// We modify the x and y variables according to the button presses, moving the text
if (up) // If up arrow is pressed
{
y -= 1; // Decrease y coordinate
}
else if (down) // If down arrow is pressed
{
y += 1; // Increase y coordinate
}
if (left) // If left arrow is pressed
{
x -= 1; // Decrease x coordinate
}
else if (right) // If right arrow is pressed
{
x += 1; // Increase x coordinate
}
RectFill(0, 0, ImageWidth(screen), ImageHeight(screen), 0, screen);
// Reset the screen buffer to plain black
PrintCenter(x, y, screen, 0, "Hello World!");
// Prints said text centered from coordinates x, y
ShowPage(); // Displays the buffer on the screen
}
Exit("Bye!");
}


Here (assuming you made some sense of the first program and the intro) you will have the player ponder about the x and y coordinates... and you also have the new programer wonder what the hell are some many coordinate words placed on there and the pressed word? "Hunh?" "y -= 1; // Decrease y" this can pretty confusing to the noob verger. For me it looks like variables and to someone else it might look like letters with some mumbo jumbo slashes added with a dash and equal sign. Remember if you are trying to make some sense into noobs you have to be the noob yourself. Think "if i was a noob would i understand it?" Think back to your first few days of being on Verge annd ask yourself "on my first day would i really understand all of this crap?"
On to the THIRD!!!


void autoexec()
{
SetAppName("Stepping Hello World");
int x = ImageWidth(screen) / 2;
int y = ImageHeight(screen) / 2;
// Setting the same variables as before to center coords
while (!b3) // If escape is not pressed
{
// We use the same basic format for checking inputs
// But this time manually 'unpress' the buttons each time
// As it relies on discrete button presses, we move by a larger amount
if (up) // If up arrow is pressed
{
y -= 10; // Decrease y coordinate
Unpress(5); // Turn off up button
}
else if (down) // If down arrow is pressed
{
y += 10; // Increase y coordinate
Unpress(6); // Turn off down button
}
if (left) // If left arrow is pressed
{
x -= 10; // Decrease x coordinate
Unpress(7); // Turn off left button
}
else if (right) // If right arrow is pressed
{
x += 10; // Increase x coordinate
Unpress(8); // Turn off right button
}
// Reset the screen buffer to plain black
RectFill(0, 0, ImageWidth(screen), ImageHeight(screen), 0, screen);
// Prints said text centered from coordinates x, y
PrintCenter(x, y, screen, 0, "Hello World!");
ShowPage(); // Displays the buffer on the screen
}
exit("Bye!");


Well im going to be simple here and just do what you did to the second program it looks the same but if there are areas which you haven't touched upon or feel you haven't touched upon than go ahead and divluge into more detail.
To The FORUTH!!!


int x = ImageWidth(screen) / 2; // Sets variable x to middle of screen
int y = ImageHeight(screen) / 2; // Sets variable y to middle of screen
// Because we need to use the x and y outside the autoexec function in this program
// They need to be made global variables - so outside all functions and accessible to all
// It is generally thought good practice to avoid having too many global variables

void autoexec()
{
SetAppName("Stamping Hello World");
// This time we set a specific function for each of the four directionals before the loop
// This means whenever on of the keys is pressed, it will call the set function
// Notice we are using keyboard keys here, rather than generic buttons
HookKey(SCAN_UP, "KeyDown_Up");
HookKey(SCAN_DOWN, "KeyDown_Down");
HookKey(SCAN_LEFT, "KeyDown_Left");
HookKey(SCAN_RIGHT, "KeyDown_Right");
while (!b3) // If escape is not pressed
{
// Reset the screen buffer to plain black
RectFill(0, 0, ImageWidth(screen), ImageHeight(screen), 0, screen);
// Prints said text centered from coordinates x, y
PrintCenter(x, y, screen, 0, "Hello World!");
ShowPage(); // Displays the buffer on the screen
}
Exit("Bye!");
}

// These functions are called once and only once when the specified key is pressed
void KeyDown_Up() // Runs when up arrow is pressed
{
y -= 10; // Decrease y coordinate
}

void KeyDown_Down() // Runs when down arrow is pressed
{
y += 10; // Increase y coordinate
}

void KeyDown_Left() // Runs when left arrow is pressed
{
x -= 10; // Decrease x coordinate
}

void KeyDown_Right() // Runs when right arrow is pressed
{
x += 10; // Increase x coordinate
}


Let's see here... there seems to be a lot of code in there so it would be much more simple and understandable if you were to break it up into parts. Once again use the same strategy i suggested into the third program... go into detail about the hookkey thing seeing as how i did not see it in the third program. So just follow this suggestion and you will be fine. Next up 5- Outroduction. Unless you already edit the 1-2 programs than i will return to critisize them! YAY!

(added pre-tags. -Grue)

Posted on 2004-08-18 02:25:55 (last edited on 2004-08-18 18:33:38)

Zip

Right Krep, I've added to the introduction and started a new section after it as a glossary of some basic concepts, on the assumption most people will be to lazy to follow the links I provide anyway. Feedback on these (presuming I finish the latter today) would be great.
Quick question: have you tried running any of the programs at all? Knowing what they do is a big help to understanding them, and remember "more detail" is always provided in the specific links.
Also, for the final program that has "a lot of code" - this is precisely the same as before, but broken "into parts". I hope the new section helps you out.

Zip

Posted on 2004-08-19 15:23:55

Zip

Ok, basics of the ideas and terms page are done, and I've added a little more guidance in the first program as well.

Zip

Posted on 2004-08-19 20:09:26

Kreplyn

Nice Zip... thnx a lot your awsome ill be sure to credit you in my game...(another 4-5 years and ill be done) Ill take a look at it today and give you my thoughts tommorow it's gonna be a looong night...

Edit: Heh forget about what i said listen to this... i was going through the new section that you added beatufiul more noob friendlier and actually one of my friends had a question...

"for step 2... i'm familar with arrays... but ints? is that instructions?? like what tell a program what to do??"

So than later i showed him this... curtosy of your new section: "An instruction is a particular action for the program to take, such as changing or reading some information. In code, each action is given its own line which MUST end with a ; semicolon. These are very important, if you forget them verge will give you an error rather than running the program. Not every line of code is an instruction however."

He hasn't responded yet but i think i answered his question and because of me telling you to help others i was able to help someone thanks to your help!!! See it's good to listen to a noob everyonce in a while ain't it?


Now im gonna go through this througly and ill post my updates either shortly or tommorow... getting kinda tired.

Posted on 2004-08-20 03:17:42 (last edited on 2004-08-20 03:40:04)

Toen

An int is an integer. I think that would answer his question better.

Posted on 2004-08-20 08:40:44

Kreplyn

Yes yes i know that...

Posted on 2004-08-21 01:16:29

Zip

I've cleared up the relevant sections a bit, I hope it helps. Also, DO make sure you click on all the links I give, the extra sections tend to have this information in moar depth.

"A variable is a way to store information while the program is running. There are two basic types used by verge, an integer (or int as its referred to in code) for storing numbers and string for storing text. The Variables section in the main documents covers these in much more detail."

Zip

Posted on 2004-08-24 19:24:44

Kreplyn

Sorry i haven't posted about docs 4-6 yet i've been so busy latley with my life (yes i have one)... ill get back to you on this soon maybe tommorow seeing as how i got nothing to do.

Posted on 2004-08-26 00:25:45


Displaying 41-50 of 50 total.
prev 1 2 3
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.