@JakobRobert00 I create a 2D character array and place the player and enemies on the array.
I use the functions kbhit() and getch() and capture user input and change the position of the characters on the array. You can research these functions on MSDN.
@IonicFox2nd hey im working on a small program that fighting a mob but whit numbers not like urs whit animations, its a real time just like urs but i cant figure out how the function whit kbhit() and getch() should look, can u give me some hints if possible? tnx, oh and btw thats a sick game no matter how lame it looks. WELL DONE KEEP UP!
@windowsifast, I found out how to add background music a while ago, I just haven't posted it yet. My current project is integrating a GUI into Sword Play, That will be my next post (possibly another video).
@windowsifast, if you assign a variable (type char) a value (0 - 255) and output that chracter, you get a small ASCII picture. you can also output a backslash and create a character without the variable declaration.
if you want any help or have any questions, just ask.
I started my game back in early 2008 and I'm still working on it today. I might upload what Sword Play used to be when it was first built (it had several symptoms your game is suffering from).
I just uploaded another update earlier today. Have a look at it.
do you used multithreading? i mean becouse you can move and the creatures at the same time
the69johny 3 weeks ago
How'd you make the game run without input? I saw you used getch() but I don't see how you made the game continue to run without user input.
ChuckleluckMe2 5 months ago
@ChuckleluckMe2 He used kbhit() which checks for user input
wolakec 1 month ago
good work
what functions did you use to make the player move?
JakobRobert00 8 months ago
@JakobRobert00 I create a 2D character array and place the player and enemies on the array.
I use the functions kbhit() and getch() and capture user input and change the position of the characters on the array. You can research these functions on MSDN.
Let me know if you have any more questions
IonicFox2nd 8 months ago
@IonicFox2nd thanks i will look up these functions
JakobRobert00 8 months ago
@IonicFox2nd hey im working on a small program that fighting a mob but whit numbers not like urs whit animations, its a real time just like urs but i cant figure out how the function whit kbhit() and getch() should look, can u give me some hints if possible? tnx, oh and btw thats a sick game no matter how lame it looks. WELL DONE KEEP UP!
iiperento 2 months ago
@iiperento this assigns the pressed key's value to a variable of type char.
char keypress;
if(kbhit())
{ keypress = getch(); if(keypress == '[key]'){//do function}
}
IonicFox2nd 2 months ago
@IonicFox2nd hmm i manage to do it in a different way:
input = getch()
while (!game+ove)
if (kbhit())
{ input = getch();
}
iiperento 2 months ago
I love this game... Advanced rank ftw ^_^
cannonwe2 9 months ago
Can you make a tutorial on how to make this? Is this pure c++ or did you download addtional libaires like SDL ?
rainbowcrak 10 months ago
Sword play was created in Dev C++, and doesn't require any additional
downloads, just links to -lwinmm & -lgdi32.
Look up the following functions on MSDN
I use PlaySound() & mciSendString() to play audio files (not in video)
I use GetCursorPos(), GetClientRect & ClientToScreen() for GUI Interface
I use SetConsoleCursorPosition() to place the designs and characters
I use SetConsoleTextAttribute() for color schemes
I hope this helps
IonicFox2nd 10 months ago
Nice man!
leonidhaimov 1 year ago
Fun game. I like the sword sound effects have you thought of adding background music?
windowsifast 1 year ago
@windowsifast, I found out how to add background music a while ago, I just haven't posted it yet. My current project is integrating a GUI into Sword Play, That will be my next post (possibly another video).
IonicFox2nd 1 year ago
@IonicFox2nd No i wasn't asking you if you knew how i was just saying if you thought of putting any in.
windowsifast 1 year ago
I'm a C++ programmer too and i like your game i haven't played it but am going to download it. How did you make the graphics?
windowsifast 1 year ago
@windowsifast, if you assign a variable (type char) a value (0 - 255) and output that chracter, you get a small ASCII picture. you can also output a backslash and create a character without the variable declaration.
example: \17 -> ¤ \1 -> [smily face]
IonicFox2nd 1 year ago
@IonicFox2nd
Oh cool thanks!
windowsifast 1 year ago
Can you send me the code??
fastrun14 1 year ago
That game is better than my c++ game. XD
fastrun14 1 year ago
@fastrun14, I saw your Space Game. Impressive.
if you want any help or have any questions, just ask.
I started my game back in early 2008 and I'm still working on it today. I might upload what Sword Play used to be when it was first built (it had several symptoms your game is suffering from).
I just uploaded another update earlier today. Have a look at it.
IonicFox2nd 1 year ago