We will start out with the source code for the text based game.
that should be good for starting you off, next we will be demonstrating how to play a music file(has to be a .wav to work, convert any music or sound before entering the code, and you have to place it next to the .exe to work, unless you specify a directory)
just change the 'backgroungmusic.wav' to '.wav' and your good to go, it loops as well, so it could be used as an overcomplicated music player
now for the TextBased game download, since I cant upload it as an attachment, here is the last version of my text based game http://www.moddb.com/members/ordoabchao/downloads/my-text-based-game-version-05
Do the sex slave route first! have a nice day
- Code:
#includes <iostream>
using namespace std;
int main()
{
char x[128];
cout << "insert starting text here. what do you do? insert options here ";
cin >> x;
if(x == choice1)
{
//your code here
}
else
if(x == choice2)
{
//your code here
}
system("PAUSE");
return 0;
}
that should be good for starting you off, next we will be demonstrating how to play a music file(has to be a .wav to work, convert any music or sound before entering the code, and you have to place it next to the .exe to work, unless you specify a directory)
- Code:
#include <iostream>
#include <windows.h>
#include <MMsystem.h>
using namespace std;
int main()
{
PlaySound("backgroundmusic.wav", NULL, SND_ASYNC | SND_LOOP);
system("PAUSE");
return 0;
}
just change the 'backgroungmusic.wav' to '
now for the TextBased game download, since I cant upload it as an attachment, here is the last version of my text based game http://www.moddb.com/members/ordoabchao/downloads/my-text-based-game-version-05
Do the sex slave route first! have a nice day