SDL questions
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!
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.
text: depends on how your game handles dialoges. i'd store them in external files.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement