Sign in to follow this  
yodaman

papers on this....

Recommended Posts

My friends want me to create a 2d rpg game engine, but I have never really delt with 2d all that much. My exp is pretty much just with 3d programming. I also haven't ever written a level editor tool either, so im kinda worried that I won't be able to pull this off. heres what we basically have in mind... Im unsure about doing clipping with this sorta game and how the tile engine and stuff work because again, I skipped this stuff and went straight into 3d with opengl. (Actually, I should use an ortho projection for this project, right?) Any info, I would greatly appreciate it! -Jason

Share this post


Link to post
Share on other sites
2-D should be easy for someone who already knows 3-D. Draw all your tiles as textured quads, coplanar, on a grid. you can use glOrtho, but unless you plan on using depth (for multiple layers, for instance) then it won't make any difference.

Share this post


Link to post
Share on other sites
I'm working on one too. I didn't really use any resources specifically, but looked up the topics individually. For instance, I wanted the user to be able to change the map size at will, so I used a vector< vector< vector<AE_cTile>>>. I recommend trying your own approaches, since you're pretty far already (you know a 3d API!).

Share this post


Link to post
Share on other sites
hehe, yeah I basically already made a tile engine but do to lack of information from my friend, I wasn't sure what he wanted. I have a good idea now though. Thanks.

Basically, the tile engine I wrote does clipping via a simple if on screen draw if not don't. Every tile in the list gets tested per frame.

I have a good idea on how the engine should work, but I have no clue on how im going to go about making an editor. I don't deal much with standard applications programming. hrm. Any advice?

Thanks.

Share this post


Link to post
Share on other sites
You shouldn't run into any problems assuming that you actually understand your 3D fundamentals and didn't just copy/modify 3D, not that I'm accusing but alot of people do it and call themselves real programmers.

For the tile editor, if you don't really know windows programming very well I've found it simple enough to draw all my own controls. A map editor doesn't need that complicated of an interface. I would recomend that each plane that a character can walk on contain a base tile and an overlay tile between the base and character plus at least one "overhead" layer. The way I do it I have 2 layers of base+overlay and 1 layer of overhead. This way I can walk along the ground(layer 1) cross that path on an overhead bridge(layer 2) all behind a large leafy tree(overhead) for example. That covers most situations a typical rpg map design might create. If you want to be really fancy, you could have a list(or vector) of tiles for each layer, but it really complicates your map data structure, rendering algo, and file format.

Clipping is super simple since you know exactly which tiles are in view. If you wanted you can run everything through OGLs projection matrices using ortho or even perspective if you want things such as particle effects to have perspective, just draw all the tiles on the Z=0 plane.

Its a D3D book, but I would highly recomend "Focus on 2D in Direct3D" I can't recomend it enough. It covers all of these concepts wonderfully. If you're comfortable reading a D3D book and applying it to OGL you should definately check it out.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this