I've plotted out the basic game idea outline, but rather than make another mod of some other game, I want to dip my toes into the waters of stand-alone game development at long last. This will likely be an RPG-style, top-down online multiplayer versus game with elements of puzzle solving, cat and mouse mind games, and even some shooter thrown in for good measure. The specifics should be immaterial for the purpose of getting started, though.

To get started, I have several questions:

  1. Though I'm looking to make it in Java, first I'd like to know: How possible would a Javascript + AJAX + PHP game be? I'm aware there are a few Javascript games out now, and I even saw a prototype Wolfenstein 3d remake with Javascript. Does anyone know more about this?
  2. If I go the Java route, it would save me some trouble to have a decent 2d engine or a quality tutorial on how to make one. Any suggestions?
  3. I'll need graphics. I'm not picky. This is a beginner attempt, so any stock content would work. Any good libraries for 2d game sprites and scenery bits and whatnot?
  4. What are some prominent 2d game/general game communities relevant to what I'm doing? I'd like an audience to release this to, as well as some good places for help or ideas as I progress.

I'd chalk this up to 50% personal learning experience and 50% 'wouldn't it be cool if...' right now.

+5  A: 
  1. Using javascript you will spend more time debugging and finding workarounds than you would focussing on the game. Stuff that has been done up until now are prototypes and as far as I am aware no major engine has been developed
  2. There are plenty of these around. The strategy of making an engine are the same in all languages (Graphics, Input cycle etc.) and there are also plenty of open source engines around for this purpose (best is to google)
  3. Plenty, again Google is your friend.
  4. Massive article archive as well as a backlog of forum posts and an active community.

Hope that helps.

Jamie Lewis
+1  A: 

A javascript/php/ajax game would be possible however, it will make it a lot harder and performance will be limited. Again you will have to code for multiple browsers, and there are latencies involved. This is not to say it hasn't been done, a zombie game used that exact platform (the name escapes me at the moment).

  1. Using HTTP will have a lot of overhead compared to other binary encoded solutions. Particularly the request-response mechanism is not ideal for pushing updates to clients in a fast manner, however it could feasibly work with a lot of tweaking.

  2. I'm not an expert in java programming especially with graphics.

  3. Look for some free stock libraries, or otherwise check some open-source games and what license they use on their artwork.

  4. I'm not too sure with this one.

+2  A: 

You must definitely check out PyGame.

Pygame is a set of Python modules designed for writing games. Pygame adds functionality on top of the excellent SDL library. This allows you to create fully featured games and multimedia programs in the python language. Pygame is highly portable and runs on nearly every platform and operating system. Pygame itself has been downloaded millions of times, and has had millions of visits to its website.

For networking needs, I would recommend Twisted. It is an event-driven networking library that lets you implement very efficient protocols or even extend your own.

Vagmi Mudumbai
Uh? I see "online" in the title. I don't think PyGame can run in a browser, can it?

You may want to consider something like this:

It is Quake 2 for .NET. The Quake 2 engine was a simple, but very popular engine that was open sourced and has been around for a while. This would get you started with 3d games (which would help you a lot more these days) and it is still simple enough by using a .NET language. Managed C++ would be rather useful in your skill set anyway as a beginner. You could even work on making a Java port of this someday (perhaps there already is?).

Anyway, give it a look, you might find this is inside your capabilities.

Geoffrey Chetwood
Answer is about 3D games, question is about 2D games. Maybe if you change the answer to talk about implementing 2D games with a 3D view?
@jeebee: He also wants to make the game in JS/PHP. I think he could use advice and new directions...
Geoffrey Chetwood
More the merrier, but I am wanting to avoid stuff like modding this time.
Daddy Warbox
@Daddy: What are you talking about modding for? This is source code. Make whatever you want with it. At least you will be able to delve into how a real game is made.
Geoffrey Chetwood

I would look at PyGame if you want to focus on making the game. Simple yet powerful modules for making games on Python.


I've recently had some success writing 2D games using Ruby and the Gosu library (which is a really nice cross-platform C++/Ruby 2D game library).

You can take a loot at it at:

It has some nice tutorials and documentation.

Also, if you want to look at the code of 2 games I created with it (including a Space Invaders clone), check my GitHub projects at:

I hope it helps. Good luck.

+1  A: 

You can get XNA Game Studio 3.0 for free. To use it, you'd need to download Visual C# 2008 Express Edition (also free). With it, you can deploy games to your Xbox360 or to Windows.

No, it isn't Java, but yes, it is Free (as in beer). Java and C# are relatively close syntax wise, and it's a helpful language to learn if you want to take up programming as a career.

There are a wealth of questions on Stack Overflow that will assist you in learning more about C# vs. Java.

More about XNA Game Studio:

The XNA Game studio comes with 3 different types of Games as templates (RPG, 2D Side-scrolling, and 3D). These are called Starter Kits, and there are a wealth of them on the XNA Creator's Club site. It's helpful to download the starter kits and start messing around with them. They're well documented, so if you know Java, you should be able to piece together what's happening without too much trouble.

George Stocker
+2  A: 

One thing to consider is implementing your 2D game using 3D libraries - for Java these include JOGL and LWJGL (Lightweight Java Games Library). These can handle scaling and rendering and are very flexible, and even if you present the game in a 2D overhead view they can add many many options for the future (shaders, 3D effect for high objects (trees, buildings), support any resolution, etc) and simplifying the tedious rendering routines for 2D games (as the 3D engine does that for you from the scene graph, handling transparency and sprites and all that for you). For a 2D GUI interface on top of the 3D scene consider FengGUI.

As for the game design, you have to consider how your map is laid out. Is it an array of blocks of uniform size (the most common scenario)? Do you need to write a map editor? Do you want to create "bigblocks" that are say 8x8 blocks in size, with predefined blocks, to speed up your map editing? Maybe you want map editing to be a feature of the online client software even! Or are you going to have non-uniform size maps, with elements just placed in the 2D space - how will you arrange this in memory for fast lookup with minimal overhead?

You might want to consider rewriting an old 2D game, or take the essence, and add the multiplayer functionality.

In non-Java languages, SDL is popular for 2D games. From your question I see that you really want to get into the nitty gritty of the engine, so something that abstracts that all away might not really be for you, so pass on the high level game designers.

+1  A: 

The answers to the question Java 2D Game Frameworks might be a good start... Look at Milpa, it shows that an online Java game can be nice...

As for JavaScript, the existence of canvas component made it possible/easier. It lacks in IE but some frameworks (like Dojo) emulates it with the VML component...
You can also make simple games with DHTML (moving images on the page, etc.).


Why not just use Flash? I think you'd be up and running fastest with this. Probably more tutorials and learning resources out there than any other language too.

D. Starr
His requirements were 2D and 'online multiplayer' ... Flash seems like the most straightforward choice (for player client anyways). PyGame is cool but more overhead and external libs needed IMHO.
D. Starr