+ 2
Wich programming language is used for games, for making games? (WINDOWS)
12 Answers
+ 24
C#,C++,Java
+ 11
What @ValentinHacker said, and occasionally C
+ 10
JavaScript and C# in Unity5
C++ in cocos2d
+ 8
Once I tried to make my own game engine with only C# from the scratch. I used infinity loop in different thread for rendering. But couldn't continue because I couldn't play multiple sounds or musics in C#. đ
Please can anyone tell me how to play multiple sounds in C#? (Except The Media Player)
+ 7
@Lars Thats the speciality of threads. You can close it any time you want. Just thread.Abort(); will do the work. ;)
+ 7
I was making a space shooter game on my game engines how could I use a game state manager. I need continuous rendering until win.
+ 7
@Lars No I used infinity loop like this
while(continue_game)
{
try {
Update(current_time);
Draw(graphics);
}
catch(exception ex) {
MessageBox.show(ex.message);
break;
}
}
I can change continue_game to false in the Update function anytime to close the loop. :)
+ 2
First off:
NEVER put infinity loops in your code on purpose unless you want to build malware.
Most games use something called a gamestatemanager.
The gamestate manager manages if the game is paused for example, currently runs or is closing.
Allways put someway of terminating in your loops.
If you make a comple program the first thing you should code is an exit function so the user can regularly abort the program without using a taskmanager to kill the process
+ 2
Any language can be used but mostly C++ is used in windows
+ 2
@Cyrus
okay that's what i meant.
The isn't an infinite loop in my book because it can be closed "naturally".
I thought you actually ment while(true)
+ 1
@Cyrus Is that an actual infinity loop? In java threading exists too and there you can make a method for canceling a thread which cancles the loop in the run method.
Just killing off a while(true) loop seems a bit quick and dirty.
0
c++