Advice regarding language choice - 2D Top Down Strategy

Started by
17 comments, last by _paf 11 years, 3 months ago

I agree with the guys above on learning C++ and making your game with it. C++ has evolved a lot these last years and there has been some nice updates to the language.

C++ is the language most pros are using, but these are very skilled people, so it would be a better idea if you took some time to master it first before thinking of making a game with it.

Personally, I learned C++ and made some simple games with it, then I switched to Java, then finally to javascript because it were easier for me and I wanted to make games that are directly playable in the browser without requiring a plugin. Now with the advances of HTML5, you can do a lot of cool stuff like drawing 2D shapes or sprites in canvas, saving data locally (in case you wish to save player progress, score, ...), playing sounds, ... etc and you can also do 3D if you wish.

I appreciate working with javascript because all it takes to see the changes you made to your code is hitting F5 to refresh the web page. I like to focus more on game design so working with a scripted language saves me a lot of precious time.

I think the most important thing for a beginner is to go through a basic, but complete, development cycle, one that includes a basic initial idea of a game, a simple game design, modeling the features of the game (here your job is to "translate" the game design to technical details, algorithms, UML diagrams, software architecture, ...etc), programming and testing. So I agree with bassy that the language in itself is not very important.

Advertisement

Thanks for the feedback again, as I mentioned earlier I have used C++ in the past, what I was most concerned about was being left behind in an "older" programming language, when all the cool kids are using Python/Java.

Ive brushed up on my C++ with some online tutes, and im looking into using Allegro now.

I understand what you mean by going through a development cycle, essentially (although I am not interested in detailing spoilers, game design ideas etc etc) ive gotten to the point of modelling / programming in that I need to translate details and designs into code.

I also have picked up that the language is not as important as the design and determination, its just that stepping back into this world after a couple of years of not doing any programming (apart from BASIC with a robot I was building) you can be suprised at the advances and streamlining that has happened while you were away.

Game Dev is a slow process, with lots of blood sweat and tears, so Im going into it knowing im not going to produce "Call Of Duty: Guild Wars 2 Edition". :)

Anyway, I was really hoping that I would get some straight answers regarding wether C++ was still relevant, and wether or not I need to learn a new method to make an effective modern game. I havent used Allegro before, but from the looks of it I could definitely streamline my process.

Cheers all!

[quote name='Toshi' timestamp='1357245517' post='5017236']
Anyway, I was really hoping that I would get some straight answers regarding wether C++ was still relevant, and wether or not I need to learn a new method to make an effective modern game. I havent used Allegro before, but from the looks of it I could definitely streamline my process.
[/quote]

Yes, C++ is still very much relevant. I don't know a lot about Allegro, but, before jumping in, take a moment to check out SFML. It's a wonderful Multimedia API layer, it has a great interface, supports Gfx, Sfx, Input, Windowing, Networking, and Generic System-related API's, and runs on top of OpenGL for GFX (thus, is HW Accelerated)

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

Well, i can't tell you which is the best language, but if you're serious about learning one, and make a serious project, then i'd advise C++.
It's probably the most used language in game development, although i suppose not the easiest to learn.

You could then learn OpenGL or Direct3D, or even use SDL or Allegro (i think these two can be/are used in conjunction with OpenGL).
Also, if you don't know (and don't mind your game being WIndows only), there's DirectX (which Direct3D is part of) which is a complete game development SDK.

Not that this isn't something you can't do with other languages (i don't really know if there's DirectX support in Java or Python), but i think you will get the most support (in terms of code samples, etc) if you use C++.
Of course if you want your game to be cross-platform, then perhaps Java would be another option, not that you can't do it with C++, but it is easier with Java.

There is also C#, altough i can't tell you anything about it as i've never use it (the same goes for Python).

In the end, in my opinion, on the long road of development, you'd benefit more by choosing C++, but again, it is probably not as easy to learn (and by learning i mean really learning, including advanced things like pointers, OOP, inheritance, etc), and obviously does not natively include sprite drawing routines, sound playback, etc like some other languages do (for example Java and ActionScript).
what do you mean by java sprite drawing routines? in a 2d tile based map for example aren't the sprites done in paint.net etc and not coded in programming languages? (totally new at game dev here obviously :) ) but what do programming languages have to do with drawing sprites?

go learn c++, and you need some basic knowledge of software engineering

[quote name='Darego' timestamp='1357340602' post='5017547']
what do programming languages have to do with drawing sprites?
[/quote]

This means the computer is 'drawing' (displaying) a sprite to the screen. The program decides when and where to display the sprites that were created by an artist.

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

What i meant with java sprite drawing routines is not creating a sprite in java. Sprites are simply regular images created with any graphics program(like Paint, pain.net, photoshop, gimp, etc).

However if, for example, you use C++ and Opengl, you must create a texture from the sprite image, and draw some triangles/quad on the screen using that texture, and you effectively have a sprite n the screen.

In Java you don't have a Sprite class per se (although you can easily make one, just Google it), but you have an image class built in, that simplifies the process (also keep in mind that this so called sprite on the screen, is nothing more than displaying an image/texture on the screen).

In ActionScript (aka AS2/AS3/Flash) you already have a Sprite class that makes things much easier.

As nobodyNews said, the programming language doesn't have anything to do with making the sprite (although you could hard code it in your program), it just may making displaying an image on the screen easier or not.

Sprites are simply regular images created with any graphics program(like Paint, pain.net, photoshop, gimp, etc).

Technically I think those are 'bitmaps' or 'textures', but it depends on who you talk to. From a development point of view a 'sprite' is usually a render instance for something. For instance, in DirectX you load a texture (image data), then use that texture as fodder for a 'sprite', which specifies where to render it and at what scale/rotation/etc.
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

True, since your typical Sprite class, is an image/texture with a position & some transformations. It's just the habit of thinking of a sprite as a single frame in an animation (as in the old console games), where each of the frames is a sprite (here having the meaning of an image).

This topic is closed to new replies.

Advertisement