Incorporating games into event driven programming

Hi @gershon.ari,

Unfortunately I don’t think that this is possible. In the video, they are showing a lot of little clips of different apps that code.org staff have created in app lab and I think the staff member re-created some of the logic from gamelab in app lab. Clicking on the button didn’t actually change the screen - they just cut to a different app clip.

As far as I know, there isn’t a way to “set screen” to a page outside of app lab, however because app lab is a web-app, you can choose to leave the app and go to a new page using the open() function. You can see this at work here: App Lab - Code.org

I also don’t know of a way of activating “key down” on the phone without making the keyboard pop up. The work-around that I have seen from students is to create a button with an arrow on it for each direction and to use the click event.

More generally, there are a few forum discussions that talk about the relationship between App Lab and Game Lab. Fundamentally they are different: App Lab is driven by events and sequential code, while Game Lab relies on the draw loop. You can coerce App Lab into doing animations using the timedLoop() block but in general you’ll just not have the same set of tools designed around animation unless you go over to Game Lab. Here are two posts that might be useful in students’ quest towards animation:

Good luck!
Madeline