Jump to content
  • Advertisement
Sign in to follow this  

SDL questions

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

Ok, i was wondering if there is any way (in SDL) to do a shadow for a sprite. Nothing terribly fancy, even if it is just a blob lookin deal below the sprite. Would i just have another shadow 'sprite' follow the sprite around or is there some other way? I dunno, im kinda new at it. Also, how would i code in a dialouge? I mean, there is a ton of it...it is printed to the screen as the characters speak, would i just read in from a text file or hard code or what? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
shadow: you could create a new surface with a black representation of your sprite and blit it with transparency.

text: depends on how your game handles dialoges. i'd store them in external files.

Share this post


Link to post
Share on other sites
Quote:
Original post by c-gibson-s
Ok, i was wondering if there is any way (in SDL) to do a shadow for a sprite. Nothing terribly fancy, even if it is just a blob lookin deal below the sprite. Would i just have another shadow 'sprite'

That would work. If you know that a sprite always has a certain shadow you can always add it to the sprite itself. But if the shadow has dynamic depth, that having a separate shadow sprite follow the real sprite would be appropriate.

Quote:
Also, how would i code in a dialouge? I mean, there is a ton of it...it is printed to the screen as the characters speak, would i just read in from a text file


That would probably be the best way. Say you hard-coded the dialog in, should you want to change it (or, god forbid, provide different translations) you'd have to recompile, which is a pain. Having it in a separate file would avoid this.

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!