Log In  

Is it possible to create a cutscene or animated introduction?

P#42403 2017-07-12 13:42 ( Edited 2017-07-12 19:55)

1

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
P#42404 2017-07-12 14:01 ( Edited 2017-07-12 18:03)

Thank you! I appreciate you taking the time to respond so thoroughly. What would you recommend for an introduction? As far as code is concerned.

P#42405 2017-07-12 14:36 ( Edited 2017-07-12 18:36)

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.

P#42410 2017-07-12 15:55 ( Edited 2017-07-12 19:58)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 05:35:36 | 0.006s | Q:11