Multiple Main Character Sprites Per Game?

Started by EnnarGames, Sun 06/02/2022 14:34:11

Previous topic - Next topic

EnnarGames

Good morning!

In the game I'm designing, I want to have shots of various distances away from my character.  Some shots will be the usual wides, calling for a typically-sized/detailed sprite, while others will be extremely long and calling for a sprite only a few pixels in size. 

My plan was to create three sprites for the character - a medium sized, a small sized, and an extra small.  Is it possible to incorporate all of these into different screens of the game, such that moving from one area to the next it will be a different sprite, or do you have to use one sprite the whole time and use the character scaling function?

Thank you!  (roll)

“Art is an object riddled with sharp edges that can cut you.  You can pound all those edges away and make it smooth and make it safe, but what you’re left with is just a shapeless blob.  It’s safe and it’s smooth, but it’s uninteresting.” Ron Gilbert

Rik_Vargard

I use scaling; I'd say continuous scaling can be used and then put the MIN and MAX as the same, like for example 5 (very little) on the walkable area you created.

Or else you can create three different views for each sprite animations and then use cEgo.ChangeView(numberOfView); when you need it?

fernewelten

#2
Characters have views directly and sprites only indirectly â€" in so far as the views are made of sprites.

All the character views can be assigned to at runtime, using either attributes or functions: Look up Character::ChangeView(), Character::SetIdleView(), Character::SpeechView in the manual.

So one of the ways of doing this would be:

  • Each character would have a set of "small" views and a set of "normal" views. Use a consistent naming scheme here. For instance, call them vwWarriorMainSmall, vwWarriorMainNormal, vwWarriorSpeechSmall, vwWarriorSpeechNormal, ... vwWarriorIdleSmall ... or some such. These views are prepared beforehand and installed within the Editor. Note that you can create subfolders in the Explore Project pane to help keep the views well-arranged.
  • Each room gets a room_Load() (Enters room before fade-in) event. That's where the respective character views are usually set, using the respective functions or attributes shown above.
  • However, whenever characters are summoned into the current room with the Character::ChangeRoom() function, then code must follow immediately that configures their views. too.
  • Don't assign views by number. Use their symbolic names VWWARRIORMAINSMALL etc.

That's at least how I would try to do this.

EnnarGames

Quote from: Rik_Vargard on Sun 06/02/2022 17:52:46
I use scaling; I'd say continuous scaling can be used and then put the MIN and MAX as the same, like for example 5 (very little) on the walkable area you created.


Sounds good! I didn't even think to just set min/max the same!

Thank you so much!
“Art is an object riddled with sharp edges that can cut you.  You can pound all those edges away and make it smooth and make it safe, but what you’re left with is just a shapeless blob.  It’s safe and it’s smooth, but it’s uninteresting.” Ron Gilbert

EnnarGames

Quote from: fernewelten on Sun 06/02/2022 19:52:43
Characters have views directly and sprites only indirectly â€" in so far as the views are made of sprites.

All the character views can be assigned to at runtime, using either attributes or functions: Look up Character::ChangeView(), Character::SetIdleView(), Character::SpeechView in the manual.

So one of the ways of doing this would be:

  • Each character would have a set of "small" views and a set of "normal" views. Use a consistent naming scheme here. For instance, call them vwWarriorMainSmall, vwWarriorMainNormal, vwWarriorSpeechSmall, vwWarriorSpeechNormal, ... vwWarriorIdleSmall ... or some such. These views are prepared beforehand and installed within the Editor. Note that you can create subfolders in the Explore Project pane to help keep the views well-arranged.
  • Each room gets a room_Load() (Enters room before fade-in) event. That's where the respective character views are usually set, using the respective functions or attributes shown above.
  • However, whenever characters are summoned into the current room with the Character::ChangeRoom() function, then code must follow immediately that configures their views. too.
  • Don't assign views by number. Use their symbolic names VWWARRIORMAINSMALL etc.

That's at least how I would try to do this.

This is awesome stuff! I'll be pouring over it.  Anything to get me more into the scripting end of things I'll welcome. 

Thank you!!
“Art is an object riddled with sharp edges that can cut you.  You can pound all those edges away and make it smooth and make it safe, but what you’re left with is just a shapeless blob.  It’s safe and it’s smooth, but it’s uninteresting.” Ron Gilbert

SMF spam blocked by CleanTalk