Sign in to follow this  
c-gibson-s

SDL questions

Recommended Posts

c-gibson-s    313
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
no_skill    142
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
Doc    586
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

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