Skip to main content
GameDev.net gamedev.net
🔒 Locked

best language for a 2D game?

Started by thumbs Mar 16, 2008 at 5:46 PM 13 replies 10.4k views
Original Post
thumbs
thumbs
Ventured a little bit with Java and VB but they don't seem too suited for writing 2D games? Am I mistaken, and are there better alternatives?
rip-off
rip-off
Writing 2D games is somewhat independent of what language you are using. But I've heard good things about Python, with Pygame.
darookie
darookie
Just choose the language you know/like best. There really is no best language for a 2D game. Keep in mind that general purpose programming languages are - as the name implies - general purpose and hence generally suitable for creating 2D games. Both VB(.NET) and Java are usable.
Nairb
Nairb
Both Java and VB are just fine for 2D games. Java gets a lot of use in the casual games market, which is dominated by 2D games.

Use whatever you're comfortable with. If you're most at home with VB, it's certainly possible to make a good 2D game with VB. If you're working alone, it's all about what you want to do; when you start working with other people, knowledge of other languages will start to help out.

If you don't know any languages comfortably yet, there's a lot of debate in these parts about what to start with. Python is a fairly popular choice.

Cheers,
--Brian

SiCrane
SiCrane
What the best language to use depends on your goal. If you want to practice programming using a 2D game then use that language you want to practice. If you want to learn a new language using a 2D game as a project then use that new language. If you just want to put together a 2D game then you should use the language you know best or a language/toolkit dedicated for 2D games (ex: GameMaker).
thumbs
thumbs
Thanks. Appreciate the replies. I've had a look up of Pygame and I'm liking the look of it for sure.
Drizzt DoUrden
Drizzt DoUrden
It sounds to me like the right path for you is to use Java. If you can compile a Java program already, you just need a little information on the Java2D API (very well documented on the internet) in order to get started with your game. You will use the AWT as well. If you already know a bit about a language, I recommend seeing what you can do with it rather than going out and buying 50$ books that may just divert you from your goal.

Setting up a game in Java is *very easy* and the language is quite capable of handling whatever you will be able to throw at it.

If you feel that you simply don't get along with Java or something, then maybe you should look into Python and Pygame as someone previously stated ^_^

------------------------------Put THAT in your smoke and pipe it
daviangel
daviangel
If you aren't comfortable with any languages yet I highly recommend Python with pygame or Flash.
You can easily get a 2D game going within a short period of time withoug getting sidetracked or confused.
The only thing easier would be something like gamemaker.
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
Koyeall
Koyeall
If you want a very easy way to create 2D (tile based, although not necessarily restricted to that) games, try out BYOND. I use it if I just want to whip a fun little game to play. You can only play it with people who also have the BYOND client (which is quite a few people.)
argonaut
argonaut
Flash/Actionscript is easy to learn and good for quick prototyping. However, watch out for online tutorials for Actionscript, as the 3 versions vary quite a bit.
~Argonaut________Why "~Argonaut"? It's all just a mathematical expression denoting a close approximation of "Argonaut", which is irrational and can't be precisely defined.
jdub
jdub
Java's nice and all but BEWARE:

The Passive Rendering Scheme that's used for swing and AWT applications is SSSLLLOOOWWW. There is a solution to that: do the rendering actively by creating your own buffer to blit to and creating and Initializing the graphics objects yourself. Sadly from what I've found out through endless hours of Googling about the subject of Java active rendering, there isn't much on the web about the subject. It gets even worse when you try to learn about full-screen exclusive mode.

I have happily switched to C# and XNA and so far, I absolutely love it. C# is Microsoft's adaption on Java to which they have added Operator Overloading and structs to. Not to mention many other wonderfull things like properties and indexers. But don't let me confuse you.

What I'm saying is that Java would be fine for making a 2D game with. There's just not as many people making games(and therefore making tutorials and articles online) with Java2D as there are people producing games with XNA.
J.W.
SimonForsman
SimonForsman
Quote:
Original post by jdub
Java's nice and all but BEWARE:

The Passive Rendering Scheme that's used for swing and AWT applications is SSSLLLOOOWWW. There is a solution to that: do the rendering actively by creating your own buffer to blit to and creating and Initializing the graphics objects yourself. Sadly from what I've found out through endless hours of Googling about the subject of Java active rendering, there isn't much on the web about the subject. It gets even worse when you try to learn about full-screen exclusive mode.

I have happily switched to C# and XNA and so far, I absolutely love it. C# is Microsoft's adaption on Java to which they have added Operator Overloading and structs to. Not to mention many other wonderfull things like properties and indexers. But don't let me confuse you.

What I'm saying is that Java would be fine for making a 2D game with. There's just not as many people making games(and therefore making tutorials and articles online) with Java2D as there are people producing games with XNA.


For Java and 2D games i would actually recomend going with LWJGL instead since its alot easier(personal opinion) to get good performance that way. (LWJGL is a Java wrapper for OpenGL, OpenAL, DevIL and FMOD). (Java2D can use OpenGL for hardware acceleration if you use -Dsun.java2d.opengl=True when starting the application though)
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
soulcast
soulcast
It really depends if you want to work in the industry or not, if your just a hobby programmer then I would go for languages like BlitzMax(Windows, Linux, Mac) or DarkBasic Pro(Windows Only) - simple languages which will enable you to develop your game easily.

If you want to stay with VB or Java, then you can use TrueVision3D with VB.NET or JMonkeyEngine with Java.
vizier
vizier
I think it depends on what you are comfortable with. You can write perfectly fine 2d games in VB6 (DX8 was the last release to support VB) or in whatever.

Microsoft and DigiPen published a nice set of 2d game programming tutorials (including pdf files, source code, and video) in VS C# 2005 Express at click here

Good luck!

- Corey

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.