Jump to content
  • Advertisement
Sign in to follow this  

Shadow drawing and detecting

This topic is 3812 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

I am working on a game. Im mostly developing theory and design right now, altho i have started programming. Im currently working on map loading. It is going to be made of multiple huge worlds, much like Diablo 2. The main world will be 1 huge map but i will need addition maps for dungeons and tournaments, much like WoW's Battleground system; Warsong Gulch, Arathi Basin, and Eye of the Storm - they all use different maps aside from the main world and dungeons. It is a 2D tile game (not isometric). Objects such as houses will be made up of multiple images. Cirtain images will be drawn depending if the player is inside the house or outside. For example if the player is outside, The floor, front sides, and roof will be drawn (floor drawn because of transparent windows and doors). If the player is inside, the floor and inside walls will be drawn. Ive applied this before in a "testing" program and it seems to work great. So far the map will consider of multiple layers of tiles: Base and Overlay. Base is the ground, such as water, grass, and dirt. Overlay is rocks, stumps, shoreline, and other non-interactable objects. Now ill talk about the part(s) im stuck at. Ill start with some background info of why i need it. First of all, Im using shadows in my game. The shadows arnt necessarily shadows from trees, but i need to place shadows for players to hide in. While in a shadow, every class is able to "Hide" in shadows. How can i go about displaying these shadows? I dont want to display a square shadow because it looks silly. I also need to detect if a player is 'in' the shadow. Another part im stuck at is detecting if a player is 'in' a house. I can detect collisions with the walls by using a "collision line" but it doesnt really help me see if a player is inside the house. I cant check if the player is "on the tile" because half of the tile is inside, and half is outside of the house, since its not isometric but the objects are being displayed as 3d. Anyone have an idea of displaying shadows and detecting players in them, or detecting if a player is in a house?

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!