#17472 - poslundc - Tue Mar 09, 2004 1:11 am
I'm starting to assemble bits and pieces of the scripting system for my game. Since I'm probably the only one who'll ever be using it I'm keeping it pretty low-level. Eventually I'll make something higher level for the more fundamental RPG features (eg. what happens when you talk to someone, etc.) but right now I'm just looking at very basic stuff that happens when the game first loads, like displaying a splash screen, fading the screen up and down, setting up the start-game menu, etc. Stuff that I already have modules to do the actual work for, but now I need something that tells the game what pictures to load, what music to play, how long to wait, in what order, etc.
Right now I'm just looking at creating a C module with a bunch of functions to do these tasks, and each one sets up a callback for the next function that needs to be called. So for example the first function sets the initial game state, sets the palette fader to black, calls the module to load the opening splash screen and then calls the fading module to fade up. When the fade is complete, it activates a callback function which is the next link in the chain, etc.
I'm fairly confident I have a workable system here but I thought I'd see if anyone had any input or insight into this process. Maybe head me off before I code myself into a corner, or something. (And no, Mike, I don't envision myself writing a BASIC interpreter to handle this stuff. :)
Thanks,
Dan.
Right now I'm just looking at creating a C module with a bunch of functions to do these tasks, and each one sets up a callback for the next function that needs to be called. So for example the first function sets the initial game state, sets the palette fader to black, calls the module to load the opening splash screen and then calls the fading module to fade up. When the fade is complete, it activates a callback function which is the next link in the chain, etc.
I'm fairly confident I have a workable system here but I thought I'd see if anyone had any input or insight into this process. Maybe head me off before I code myself into a corner, or something. (And no, Mike, I don't envision myself writing a BASIC interpreter to handle this stuff. :)
Thanks,
Dan.