2D using OpenGL

This has been asked numerous times, so I apologize for the reiteration.

This is a conceptual problem.

Could anyone please explain to me the basics of running a 2/2.5D game in OpenGL? What I’ve been asked to do is to start the consideration of moving from the flat, 2D version of our game which will be released shortly, to a full 3D engine. This is at least a six-to-nine month conversion, and may be longer, depending.

Our goal would be to use a 3D engine, but retain an “overhead” view as the game really doesn’t take well from a playability point from the first-person, or even second-person ( 6 feet behind and slightly above ) perspectives.

Of course, LWJGL is the only way to go here. But I’m very lost on the concepts and I perceive I need to relearn everything I know of writing games.

Specifically, what I’m asking is:

The game’s perspective is 30-35 degrees off the ground, looking down. Think Diablo II, Command and Conquer, Arcanum, and so on.

What happens to all the “tiles” we have built? What about terrain? I keep hearing and seeing code regarding LOD, textures, Octtrees (now that I know what these are) and so on. Will I be creating terrain as a height map, and wrapping these tiles over them?

What happens to scenery objects, both the ones you can walk over (I call these scenery) and the ones that obstruct you (I call these foregrounds)? Do they in essence become “sprites” with wrapped “textures”?

I’m guessing that sprites are no longer a series of images for each angle the character points in. Rather, it’s a “model” with a wrapped “texture” developed in a program designed for such. (We use Poser). How would I do such a thing? (No code, please; this is just a technology exploration).

If anyone has any help they can assist I would GREATLY appreciate it.

Well… shit.

Seriously, if you have a game thats even halfway done, just finish it… if you wanted to use LWJGL for just 2D it wouldn’t be THAT hard to convert it…

…but it sounds like you acually want to go 3D with textured models and the whole crapola… I assume this is for a reason? I would like to do this with my game because of animations/showing items on characters etc… but I can’t handle the extra complexity on my own. I don’t know how to model, and I really don’t want to learn. The art/sounds/music is going to be near impossible for me as it is.

But on your real questions, I can only speculate, so I’ll keep my speculatory speculations to myself.

edit: seems like I never got around to the point of my post. I wanted to know why exactly you were wanting to move to 3D. That is all.

As I indicated, I’m in the completion stages, so there’s ZERO chance of this happening now. This is a technology exploration for the future that I’m compelled to start now… if only to shoot it down.

A big reason, as you put it, is perhaps better detail on the characters themselves. Rather than having to dump animations of the characters sixteen different ways to indicate different clothing, it might be nice to just have different textures to wrap on the model. Assuming, of course, that this is the way it is done. I am not really sure.

Speculate away, I’d be happy to hear what you think.

edit: One additional reason that comes to me is that I think there is a tremendous amount of power afforded to the game if it shifts to OpenGL; that is to say, there’s a lot of flexibility with camera views, so that even if I don’t care for it, it could be an option. Other things are raw speed (it IS native code, after all), and avoiding the use of non-gaming components (Swing/AWT) for gaming. Not that it’s a big problem right now, but depending on how things go, I wonder if it will be.

Ah ok, for the future, almost strangeled you. :wink:

[quote]it might be nice to just have different textures to wrap on the model. Assuming, of course, that this is the way it is done. I am not really sure.
[/quote]
Might be nice is definately and understatement. I’m pretty sure this is how it’s done. Also, I’m pretty sure you can break the model up and load a different head and whatnot. I’m not totally sure what Poser is exactly, but your game would have to be modeled in a Maya/3dsmax type program, where you would just create the model and animate it various ways, and then load it into your game, pretty sure anyways. Which then requires you to bring in someone who knows that crap.

In terms of a 3D world, terrain, I have no frickin clue. :wink: The camera stuff seems easy enough, it’s just a viewpoint afterall, opengl is going to handle most of this, you just need to worry about culling things outside the view fustrum (viewable volume(thats SO speculation(seriously))).

I think I’m done making an ass out of myself.

edit to your edit:

[quote]there’s a lot of flexibility with camera views, so that even if I don’t care for it, it could be an option. Other things are raw speed (it IS native code, after all), and avoiding the use of non-gaming components (Swing/AWT) for gaming
[/quote]
…yep, yep, yep, and another yep for good measure.

Mojomonkey has just posted a really neat LWJGL terrain renderer up. That’s a start on what you’re asking - pick his brains over it, I’m sure he’ll let on a few secrets :wink:

Cas :slight_smile:

If you find that something I’ve been doing is applicable I’ll be more than happy to help with anything I can. Just let me know.