Jump to content
  • Advertisement
Sign in to follow this  
Ars7c3

Having problems with level editor.

This topic is 2590 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!laugh.gif

Share this post


Link to post
Share on other sites
Advertisement
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

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

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!