Coding Language for Browser Games

Started by
6 comments, last by kop0113 10 years, 3 months ago

Hello everyone, I'm new here. I need help figuring out which combination of coding languages to use. I previously learned C through a formal course, and I did pretty well. Lately, I've been learning C++, and if it's viable, I would like to continue to use it in my projects.

Ultimately in the long term, I'd like to create some kind of web game, so I'm trying to figure out the right path to take that will be the most efficient in terms of learning. My goal in the short term is not create a full fledged game, but rather produce smaller, simpler graphical demos as I learn new things.

So what all do I need to use to produce web games using C++ to initially design the game?

I want to avoid using Java and Flash, as the case appears that those languages are slowly being phased out for HTML5/JS. I've learned of ASM.JS and Emscripter which seems promising, especially how you can use C/C++. Then you have WebGL, OpenGL, etc. I'm using Visual Studio, and there's options for Win32, MFC, etc. It's pretty confusing figuring out what to learn, as opposed to the learning itself!

Advertisement

Are you doing this for yourself or to become more employable?

If it's for yourself then ASM.JS or Emscripter will probably be easier since you will be able to use languages you are already familiar with. If you want to learn a language for employment, then look at programming job ads and see what employers want.

You can use emscripten if you want to stick on c++. However as i know it's not compatible with everything, for example as i know (i am not really sure) it won't work with SFML, bur for example work with SDL.

Using Emscripten is quite similar to how software is developed on Linux / UNIX (it also provides wrappers of most oss libraries).

This is a little bit different from developing C++ in Visual Studio on Microsoft platforms in that you do not have MFC or the Win32 API.

Nonetheless, as a C/C++ developer you should have no problem with it and it is a great technology to get your games ported to the web browser platform using a stable mature programming language like C or C++.

If you are still learning, then I might suggest using the Clang compiler on Windows and write a few OpenGL desktop applications using the libraries that you know Emscripten provides (SDL SDL_image, SDL_mixer, OpenGL, png, Glut to name a few). That way when it comes to using Emscripten you will have most of the basics down (it also uses Clang as the backend compiler) and you can focus on the strange stuff (like the virtual file system, slightly restricted form of OpenGL and provided libraries, lack of tight loops).

http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.

If you want to go the full route of using JS then take a look into Cocos2D HTML5 they have great tutorials to get you started assuming you know a decent amount of Javascript / jQuery. If not shouldn't be too hard to learn since you seem to already understand the fundamentals of programming. If that seems too confusing you can always stick to what you know and try out the suggested tech. Hope that helps you.

Are you doing this for yourself or to become more employable?

If it's for yourself then ASM.JS or Emscripter will probably be easier since you will be able to use languages you are already familiar with. If you want to learn a language for employment, then look at programming job ads and see what employers want.

I'm currently working towards an engineering degree, so I'm really just doing it for myself. C/C++ is useful in my area of study though.

Using Emscripten is quite similar to how software is developed on Linux / UNIX (it also provides wrappers of most oss libraries).

This is a little bit different from developing C++ in Visual Studio on Microsoft platforms in that you do not have MFC or the Win32 API.

Nonetheless, as a C/C++ developer you should have no problem with it and it is a great technology to get your games ported to the web browser platform using a stable mature programming language like C or C++.

If you are still learning, then I might suggest using the Clang compiler on Windows and write a few OpenGL desktop applications using the libraries that you know Emscripten provides (SDL SDL_image, SDL_mixer, OpenGL, png, Glut to name a few). That way when it comes to using Emscripten you will have most of the basics down (it also uses Clang as the backend compiler) and you can focus on the strange stuff (like the virtual file system, slightly restricted form of OpenGL and provided libraries, lack of tight loops).

I actually learned C through a UNIX prompt with GCC, so Visual Studio has been a new experience for me. I'll check clang out.

I actually learned C through a UNIX prompt with GCC, so Visual Studio has been a new experience for me. I'll check clang out.

Even better. Clang's frontend is developed to be very similar to GCC's. In the FreeBSD operating system, it has recently been a drop-in replacement. You should find it very familiar then :)

http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.

This topic is closed to new replies.

Advertisement