Writing

Finding the right 2D Engine

I spent alot of time getting Java 2D to work for my next game. There were some amazing tutorials out there, especially those done by Kevin Glass at http://www.cokeandcode.com/. However, when I did a test rendering a large screen (1024 x 768) with four parallax layers my FPS dropped to about 20. With map display optimization I could increase it to 42 but still I wanted to do a 2d engine 1900 x 1200 with a good frame rate of lets say 100. My home computer runs a radeon 3800 and my old work lap top a couple of years old couldn't even achieve 10 fps. So 40 on a pretty robust machine was just not enough.




What are the options?

A. Use a third party Game Maker.

B. Use a third party Engine.

C. Write my own Engine.

D. Optimize Java2d Engine.

Before looking into all three of these options, I should probably decide what I want. Lets start with the dream list.


Dream 2D Engine

Fast Frame Rate at high resolutions 100+
Full screen, windowed or browser embedded
Multiple OS Windows, Mac, Linux.
Sprite Engine including a sprite manager database
Graphic alpha blending, rotation, gamma controls
Map Manager
Map Editor
Flexbile maps: Baldur's gate style, Zelda style 2d, Mario style sidescrolling, Diablo isometric.
Parallax Scrolling
Scripting Extensible for adding maps, levels, art.
Widgets for the GUI
Sound and Music
Database reader/writer
Logger
Networking
Package maker for art and sound
Pathfinding
Collision Detection
Math
Physics
Timer

Not too much to ask for is it? :P

Other Requirements
Low cost, prefer free.
Great tutorials.
Published games
Maintained and active.
High quality community.

Coding Language

There are only a few choices for coding games and each has its advantage.

  • C++
  • C#
  • Flash (Actionscript)
  • Java
  • Others

C++ is the language of game makers. It is an old language and is quite difficult for the non-professional programmer. The memory management is a real pain for myself. I've done a bit of coding in it--half a game--and just ended up getting a bit frustrated. I also do not like Microsoft's implementation of web launch. That being said, it is still king of the game languages and most coders can make it sing and dance. It can be ported to other platforms but generally speaking there are issues. Decision: Rejected.

C# looks really good. It solved MFC mess and handles the memory management much better. However it is tied strongly to windows and is not as portable as others. The IDE is reasonable but still costs. Decision: Rejected mostly because of IDE and portability.

Flash is a winner. It is on every system with an Internet connection. It is popular with great tutorials. Publishing looks very easy. There are third party agents that automatically find you place to generate advertising revenue. The downside is that the IDE is expensive and proprietary. Another downside is that Flash is not suited for those ginormous, pipe-dream games that require major networking and 3D. This can be a pretty important decision depending on the games you are building. I've seen some very successful indie game makers build one game over and over again improving it with each version. The same can be done with Flash of course but it will never be a triple AAA title (see Fantasy Tactics and Sword and Sandal). Decision: I'm going to hire someone to port a game to test the market. Revenue seems almost exclusively ad based although some do have license locks.

Java should be a winner. Why it is not an instant winner seems to mostly come from a false rumor about it being slow. Yes it is a bit slower than C++ but the reality is any game you love to play can be written in it. The web launch is slick. The IDEs Netbeans and Eclipse are both free. I'm partial to Netbeans. It has applets. How cool is that? However I did notice on a recent visit to the Yahoo game's portal that it is almost all Flash whereas 3-4 years ago there was a healthy mix of Java. David Brackeen wrote a slick applet game called Milpa as well as a good java book called Developing Games in Java. The game is similar to some popular Popcap games but he still made a few thousand on it. Decision: For better or worse, this is the language of choice for now mostly because of price, great community, web integration, portability, and ok tutorials.

Others include Delphi and VBasic. I programmed a Simon Says game in Delphi, selling one copy! It is quite usable but at the time I used it the graphic libraries were terrible. Both can work with OpenGL and DirectX. I'm not sure about the portability issues. They are quite old languages. IDEs are free which is nice. Decision: Rejected for portability and lack of web launch.


Before I pare down the dream list alot, let me quote some forum wisdom.

You cannot create a generic network engine/library. There's no shortcut. You have to understand the problem and write the solution. Anyway, stop putzing around and dive right in. You'll never figure this out if you keep waiting for a magical library to fix your problems for you. Backov writes http://forums.indiegamer.com/showthread.php?t=14146





I took a look at some cool scripting engines like RPGVX which is extremely enticing. It comes with an editor, Ruby, artwork, sound, just about everything you need to actually make an old schoool RPG. The two major issues I had with it was the screen size is limited to 640x480 (note the older version RPGXP which has better artwork is even smaller screensize) and the second was that I would have to master Ruby, the scripting language.

Game Creators

http://creators.xna.com/en-US/


BlitzMax

TGE

TGB

RPG Maker





C++ Engines/Graphics

These have been eliminated because they use C++ which is an older language and mostly focused on the Widnows platform.

Allegro

SDL


http://developer.popcap.com/

http://hge.relishgames.com/

http://www.jenkinssoftware.com/


0 comments:

Post a Comment

Thanks for the comment.