using lwjgl for 2d tile based games?

Another hopeless newbie question from me! ;D

I’ve been having a quick look at all the lwjgl examples I could get my hands on, but they all seem to be 3d. How suitable is lwjgl for creating 2d tile based games, and are there any examples I could look at, or is there anyone who could give me a little nudge in the right direction?

Much appreciated. :slight_smile:

A 2D tile-based game shouldn’t be a problem. While OpenGL is used frequently for 3D graphics, it’s a general graphics library that works well in 2D too: it provides a 2D orthogonal viewing transform, 2D vertices etc, you can disable the Z-buffer and such if you really don’t need them, and textured polygons tend to render very fast on today’s hardware.

GameDev have a load of articles on writing tile-based games here:
http://www.gamedev.net/reference/list.asp?categoryid=44

You’ll need to learn how to draw textured polygons:
http://nate.scuzzy.net/docs/texture/

That should give you a good start!

I’ve already written a 2D tile-based game engine, and it seems to work just brilliantly. It’s possibly going to be my next game, or maybe one for the start of 2004 - “Quest for the Holy Grail”.

Cas :slight_smile:

Is this the SPGL from Sourceforge?
And if yes, would you mind in giving clueless newbies like me a few hints in getting started with SPGL?

Any tips welcome :wink:

Well, rule no. 1 with the SPGL is that I can break it whenever I feel like it :slight_smile: But it exists mainly as a source of know-how: you can learn how to do some things with it and write your own code if you like based on it.

If you actually want to use it - well, that’s another story! I’ve not got enough time to explain how it works right now because I’m dead busy coding. Maybe later in the year.

Cas :slight_smile:

Sneaking is fine for me. And I do understand that you have better things to do (finishing Alien Flux) than writing documentation ;D