#173534 - genecyst - Tue Apr 13, 2010 2:11 pm
hi guys,
what's the best way to implement a sort of tutorial movie intro to show how to play my game? just like the classics arcade gameplay that starts when noone is mashing buttons...
i thought about an array structure containing the action i want to do sequentially and read it at any loop and do it.
this is my first idea about it but it also seems to me too weird...
what you think about it?
#173536 - Azenris - Tue Apr 13, 2010 3:30 pm
In my game I had a tutorial before certain levels showing new features on that level. The character was moved around with a simple array. Of course it was super simple. Things that were normally random such as damage would have been random still, which meant outcomes could be slightly different.
To make it more complex (basically a replay mode) you could create an event system and all the events are recorded. Then for replaying you could code a replay mode to go through the recorded events causing the things to happen as they once did.
_________________
My Homebrew Games
#173538 - genecyst - Tue Apr 13, 2010 3:35 pm
interesting, i think i'll go trough this way.
a sort of replay mode seems to be what i need.
thanks a lot!
#173554 - sgeos - Wed Apr 14, 2010 10:20 pm
Azenris wrote: |
Things that were normally random such as damage would have been random still, which meant outcomes could be slightly different. |
If you seed your RNG with the same value every time you start the tutorial, you will always do the same damage. You can always reseed it with a random value once the tutorial is over.
With the right API/interface, you should be able to read from a prerecorded input stream just as easily as live button presses.
#173556 - genecyst - Thu Apr 15, 2010 8:40 am
my game is a simply puzzle shooter, so damage isn't so important. i need to show the basics of the game mechanics related to the key press and the rest is only "on - off" status, so both of the way should be suitable.
now i'm working on some graphics for a ds project, so i think i'll try this out on this weekend and then i'll show you some results.
thanks
#173557 - sverx - Thu Apr 15, 2010 9:51 am
genecyst wrote: |
now i'm working on some graphics for a ds project |
oh, finally!!! ;D ;D ;D
#173558 - genecyst - Thu Apr 15, 2010 10:34 am
hi ih hi hi hi i wrote it just for you sverx... :D
#173566 - sverx - Fri Apr 16, 2010 2:13 pm
:P :P :P
#173570 - Kyoufu Kawa - Fri Apr 16, 2010 6:18 pm
Here's an excerpt from OpenPok?.
Code: |
const unsigned short demoinput[][32] =
{
{
0,0, //initial delay
KEY_A,0, //press fight and show attacks
KEY_RIGHT,0,KEY_LEFT,KEY_A, //ponder and select tackle
0,0, //wait away usage messages
KEY_DOWN,KEY_RIGHT,KEY_A, //select run
KEY_A, //press away message
0xFFFF //stop playing
},
};
int demo = 0; //Are we running a demo, and if so which one?
int demotimer = 0; //Decrements from 100 for each input frame
int democursor = 0; //Where in the current demo are we?
......
void KeyRead(void)
{
u16 ReadData = (REG_KEYINPUT ^ 0x03ff);
if(demo)
{
if(demotimer)
{
demotimer--;
}
else
{
demotimer = 100;
democursor++;
if(demoinput[demo-1][democursor]==0xFFFF)
{
demo = 0; //reset demo to "none at all"
ReadData = 0;
Cont = 0;
Trg = 0;
}
else
{
ReadData = demoinput[demo-1][democursor];
}
}
}
...
//Usual input processing goes here, not caring if it's demo or real input.
|
#173635 - genecyst - Tue Apr 20, 2010 11:19 am
nice, i haven't already tested it, i will post soon some results.
thanks a lot!