Prog. Langauge Questions Relating to Game Programming

This is a discussion on Prog. Langauge Questions Relating to Game Programming within the Game Programming forums, part of the General Programming Boards category; But as a newbie start with QBasic. There are several 3rd party libraries out there that will help you put ...

But as a newbie start with QBasic. There are several 3rd party libraries out there that will help you put sound and better graphics in your game.

Game programming has many facets all of which are not solely based on the fact that you can indeed put it all together and make it work. Getting it all to work is about 1/3 of it, making it fun and entertaining is about 2/3 of it.

Any game project will present you with enough problems to turn you into a very very good programmer.

For the technical portion here is a start of what you should be concentrating on:

Graphics
Sound
Music
Fast input
Framerate

Before you start working on another game make sure your first is a completed project and make sure it has sound and/or music and looks polished. This is prob the most important part of game programming - finishing the darn thing.

I have a small asteroids game coded entirely in QuickBasic 7.1 that uses the Future library for sound. Unfortunately the Future library only allows one sound to be played at a time and there is no way to retrieve samples, mix them in a buffer, and send the buffer to Future to play.

It is very possible to code this in QBasic. I also programmed a complete 3D editor in QBasic but since have lost it somewhere - and it used matrix mathematics to work its magic. Anything is possible in any language, but QBasic does have severe limitations. When you find that you cannot implement your game ideas with your language of choice or it would take some very strange code to do so, change languages. C is your best bet but don't underestimate QBasic. With the ability to link in quick libraries and assembly modules as well as C modules it can also be very powerful.

I am a lover of python to man, but I dont think it will ever become fast enough in execution and operating speed to even think of competing with C++. Python however is really really nice for developing layouts and pretty much every other type of app, or acting as an algorithm analyzer.

I personally think C# has quite a future in game programming. It's currently ~98% of the speed of C++(forgot the link, was somewhere on /.), and can cut production times of most applications by 20%(now this comes from listenning to people who have converted entire programming teams to C#). It also will probably be better on the next microsoft OS.

Now for the badsides: while there is an implementation on linux, it is very very rudimentary and doesnt have even a portion of the bells and whistles of the MS version. This means that you are pretty much saying shove it to a pretty vocal community in the computer world that is growing fast with European and the Asian countries leaving microsoft for linux.

I'm talking about simple games. I wouldn't code a full 3D engine in python or anything like that. For simple games like Metroid clones or vertical/horizontal shooters and such, it is a fast enough language.

vb

although you'll give up vb pretty quickly (because it's darn hard to get decent framerates) it's very useful for learning the concepts behind game programming. things such as 2d collision detection, key input, ummmm movement (including acceleration, vectors, and other things). i made a very cool game (vb was my first prog language) in vb called tank game. it was a lot like space invaders except it had a tank shooting down paratroopers and once they lost their parachute they fell faster. it was awesome! basically to make games in vb you need to know the syntax (very easy, you can pick it up in a day or 2) and how to use timers and key input (both of which are also very easy). after you learn some basics in vb and get bored come back and learn win32 and directx or opengl (although i think personally i'd suggest opengl first)

although you'll give up vb pretty quickly (because it's darn hard to get decent framerates) it's very useful for learning the concepts behind game programming

Even though I despise VB, that is a pretty good reason to use it. It can be very helpful in getting some algorithms working without the hassle of getting the code itself to work(this only applies to newbs to computer programming though, as after awhile, it is really easy to pick up on any errors in the code).

I learned C++ before VB, and I think it helped me. I don't entirely hate VB, but I think that once you use that, and you see how *easy* it is to make something with it, you won't actually want the effort of C/C++ or some lower level language.