Thursday, November 27, 2008

Game Creator Project

Project Background:
I've been developing a pure java 2D game engine for about 3 years now. The code has evolved a lot since I captured it from a game that I started making called TechWrecker. That game originally started out being just a silly little project and kind of evolved into that last snapshot. As you can tell it needed a lot of work both coding and game design wise.

That game helped me develop the Game State Machine. As well as the Resource Manager and Input Manager. I recently begin redesign the resource manager to allow for loading levels, and animations, as well as other types of custom assets.

And so I decided to make an editor for a Animation file format that I created after I was able to compress BufferedImages using Java's Deflate utilities.

Project Overview:
A friend of mine whose working on a 2D side-scrolling shooter in GameMaker convinced me to create a level editor and to plan on making an actual Game Creator. Probably because he was frustrated with certain features. So I have a good start. Here is a development screenshot:

Not much to look at right now, and I hope to add icons to the toolbars. Some of the short-term features that I hope to have are:
  • Animated Sprite Tiles
  • Multi-Layered Levels
  • Entity placements and property settings
  • Collision Volume Data (per frame for Animations)
  • Level File Format (binary or xml with compression)
  • Image Editing and Touch-up

Wednesday, November 26, 2008

The Thanksgiving Special!

Off Topic
Ok so I know that up to this point I have kept the posts mainly about game programming and general programming topics. But I feel it is necessary for a bit of personality to emerge. I have been struggling with ideas for new posts and haven't had the will to really bring myself to sit down for a couple hours and hammer out the next method of collision detection. That and I've been debating between posting a polygonal collision detection algorithm, and a fast distance checking algorithm.

Original Purpose
My original idea for this blog was to archive neat pieces of code that I think would be very useful for game programmers. At about the same time as I created this blog I wanted to create a website with Effects tutorials mainly because that was one thing in game development that I was unable to find a lot of on the net. Yes there are tons of tutorials for basically any technique, ie. Water, Terrain, shader effects, texture filtering algorithms, toon shading examples, etc. But unless you pickup a book or take a course on game programming and design, you'd never know the right terminology to use in your google searches. Or even get the depth you need to successfully implement those techniques. Still almost everyday I find out about some new technique or some cool tutorials. I hope to be sharing those in the future.

Moving Forward
So in the future I hope to post about many topics, some more personal info about projects I'm working on, events in my life etc... And am gonna try my best to increase the frequency of my posts and keep them as useful as possible.

Finally Thankgiving!
I work fulltime now, after graduating back in May, being lazy for a few months, and then getting a job. And driving 80 miles to and from work every day for about a month. Until I found an apartment. Then there is the loans and getting used to the fact that I'm over 50,000 dollars in debt and have a very small income after all those bills are paid. Not to mention the fact that my job has been quiet boring and definitely not ideal. Basically not a game developer job.

So, having a 4 day weekend getting to spend time with lots of family and my girlfriend is going to be a lot of fun. Also, a very large home grown turkey is going to be key. As well as waking up and watching the Macy Day parade; tradition!

I hope you all enjoy your thanksgiving! Drive safe be careful and eats lots of turkey!

Tuesday, November 18, 2008

Rendering Hints: Java Anti-aliasing

Description of Purpose:
One of the neat things that the java.awt.Graphics2D class provides is the ability to turn on anti-aliasing for drawing primitives. This makes drawing vector graphics for your game much more attractive and simple. I will demonstrate a few usages for utilitizing anti-aliasing in hard-coded primitive animations to provide various effects.

The basic idea of anti-aliasing is that you soften the edges when drawing lines, circles, arcs, ovals, or any other primitive. You can read more about it here.

The example code will build upon what DoubleBuffering example code.


Quick And Dirty:
Enabling anti-aliasing for your Graphics2D objects is very easy. Just one function call and you've enabled it. It couldn't be simpler.

Using the setRenderingHint function in the java.awt.Graphics2D class.

Now any primitive that you draw, i.e. polygons, rectangles, arcs, ovals, etc... Using that graphics instance will be anti-aliased.

Pretty simple right, there are also other rendering hints that can help increase the quality of your graphics. However, it's a good idea to use them sparingly since they do require more time to render.

The Example:
The example can pretty easily be extended to provide a means for testing different mouse over effects or just animated effects in general. If you come up with neat effects that you would like to share please feel free to post them.