Hey again -
As you read yesterday, i have started learning C++, wich is the most common language used for commercial games. I made my first 'game' or 'program' today;
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <conio.h>
#include <iostream.h>
int main()
{
srand((unsigned)time(NULL));
int i;
for (i=0; i<5; i++) {
cout <<rand() <<endl;
}
cout <<"Press a key to exit..." <<endl;
system("pause");
return 0;
}
What i learned today:
- The code for displaying text, or variables.
- Random function. Returning a random integer.
- how to make the player able to press a key to exit.
- The code is only executed once, unless you loop it. (i found that surprising, really.)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I decided to post a couple of screenshots of "Worms!", but only the menus!
I use a slightly modern, but still very military-ish font. I decided to use two colors; Yellow and black. The match set-up menu will change drastically over the next few months. Enjoy them!
Main MenuSetup MenuComments will either be harshly beat, or mildly greeted. That should make things clear.
Have a nice night!
or…
cout <<"Have a nice night!" <<endl;
cout <<"Have a nice night!";
I believe that's the correct way.Wtf is with the 5 #includes?
Firebird got it right.So you're the person who started the "Pimp my worm topic".
Oops! Typo… I knew that… :(
The 5 includes are from the previous version, wich was different. (Long story, kinda)Polystyrene Man;Yeah. That was a bad idea… The graphics forum flooded with "pimp-my" topics after that! :(You can say that again.