gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Graphics > Character (player) choosing ...

#25852 - pio_troland@wp.pl - Sun Aug 29, 2004 4:30 pm

Have you ever played Sonic Adv. (1)? There is an interesting mode of choosing a character! How to write something like this ? ? ?

#25853 - Abscissa - Sun Aug 29, 2004 5:04 pm

Use a different image for the player.

#25854 - zazery - Sun Aug 29, 2004 7:00 pm

It?s very simple to do in C. Create a ?struct? for your player and in it have a pointer to the image data. When you are selecting your character, just point to the data you would like to display to the screen depending on your selection.

I think you might be thinking that a player is an actual entity when in programming it?s just a grouping of data. I think you would be interested in reading some tutorials on this site.

#25864 - Abscissa - Mon Aug 30, 2004 4:55 am

Oh, did you mean how to use different characters in the game, or were you referring to some visual effects that were going on inside the actual character select screen?

#25869 - pio_troland@wp.pl - Mon Aug 30, 2004 9:11 am

I meant:
there are 3 characters: char1, char2, char3(- ok?), and a white screen
for ex.:
char1 - is on the left and it's small
char2 - is in the middle and it's big
char3 - like char1 but on the right
The animation:

_____CHAR2
char1_______char3
-------------------------------------

_____CHAR3 //pressed ->
char2_______char1
-------------------------------------

_____CHAR1 //pressed ->
char3_______char2
-------------------------------------

_____CHAR3 //pressed <-
char2_______char1
-------------------------------------

etc. ...

The effect of choosing a "char" (ex.: char1) makes that char bigger and fluently "carriz"* him to the center of the screen whilst others (ex.: char2 char3) get smaller and one of them (depends which driection would you choose <-- or -->) goes to his place, the other one is moving out of the middle part of screen. (that char coosing was in Sonic Adv. 1) But thats not everything! With the charstheir names are moving but at the bottom of the screen.

ex.:

_____CHAR1
char3 ______char2
-------------------------------------
john___BILL___peter
-------------------------------------

_____CHAR2 //pressed ->
char1_______char3
-------------------------------------
bill___PETER__jonh ___//also fluent effect of changing*
-------------------------------------

fluent effect of changing* - you can see the chars, names moving, getting smaller etc. It's not a sudden effect, it's an effect with visible progress

#25877 - sajiimori - Mon Aug 30, 2004 5:48 pm

Which part don't you understand? Things that change over time?

#25882 - zazery - Mon Aug 30, 2004 7:41 pm

I've never done it myself but I think I know what you want described. Basically the character select screen of any game and how to rotate the sprites around. You need to use sprite scaling and some sort of matrix rotation to make them move around a complete circle if that's what you want. If you want to achieve something like the Mac OSX tool bar then simple scaling is appropriate. Here is a good website that describes all about what you need to know for creating the effect. Try to be more specific with the questions I don't think I really answered you completely.