Sure. The simplest way one does this it seems to me is to separate your _UPDATE() function into different "game states." You could have your first state be STATE_INTRO. As long as the "state" variable is equal to STATE_INTRO, you'd just do animations and code related to the intro. When some end condition is reached perhaps, you could change the "state" to STATE_MAIN, and your _UPDATE() function would only run code related to that state then on. There are other ways to do it but I think that's probably the simplest way.
If you were asking about creating an intro with an in-built tool though, no, you will have to write code to create an intro.
STATE_INTRO,STATE_MAIN=0,1 state=STATE_INTRO function _update() if state == STATE_INTRO then --write code that does your intro animation. when you're done, you'd say state=STATE_MAIN end if state == STATE_MAIN then --your main game code goes here. end end |
I really like this series of videos, and have been recommending it to folks everywhere. In fact it's the reason I went ahead and bought Pico-8.
https://youtu.be/M7azf71z0QE?list=PLYND9uft5u_1YCkmXiMrPU7tiBG3hIKAZ
Note that's just the intro. After that he has a bunch of videos in the same playlist giving you a real introduction to coding games.
[Please log in to post a comment]