Sign in to follow this  
Ars7c3

Having problems with level editor.

Recommended Posts

Ars7c3    189
This is probaly a really stupid question, but it needs to be asked. im currently working on a level editor. I want it to select tiles from a tilesheet you load into the program. But i cant

seem to figure out how to select the different images off of the tilesheet bitmap. I attached the tilesheet i want to put in. Thanks ahead of time![img]http://public.gamedev.net/public/style_emoticons/default/laugh.gif[/img]

Share this post


Link to post
Share on other sites
Ars7c3    189
I'm sorry, I'm new to this forum. I am creating my own level editor. I am just confuesed on how you could program it so it would let you place a tile that you could select off of a tilesheet

Share this post


Link to post
Share on other sites
jyk    2094
[quote name='Ars7c3' timestamp='1306114972' post='4814412']
I'm sorry, I'm new to this forum. I am creating my own level editor. I am just confuesed on how you could program it so it would let you place a tile that you could select off of a tilesheet
[/quote]
In very general terms:

1. Create a variable somewhere that indicates what tile is currently selected. (It could be 'empty' initially, or refer to a default tile.)

2. If the user clicks anywhere in the 'tile palette', determine on which tile the user clicked, and assign that tile to the 'current tile' variable.

3. If the user clicks anywhere in the editing area, determine on which cell the user clicked, and place the currently selected tile there.

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