# Incorporating games into event driven programming

**URL:** https://forum.code.org/t/incorporating-games-into-event-driven-programming/32411
**Category:** Unit and Lesson Discussion
**Tags:** csp-unit-2-lesson-3
**Created:** [March 8, 2020, 12:27pm UTC](https://forum.code.org/t/incorporating-games-into-event-driven-programming/32411 "2020-03-08T12:27:45Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![madeline\_r\_burton](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/madeline_r_burton/32/5037_2.png) [@madeline\_r\_burton](https://forum.code.org/u/madeline_r_burton)
#### Post date: [March 11, 2020, 4:45pm UTC](https://forum.code.org/t/incorporating-games-into-event-driven-programming/32411/4 "2020-03-11T16:45:21Z")

</div>

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](http://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](https://studio.code.org/projects/applab/pqdXRVMfu8QWW3-L1DO9FIh2RFQqWEG9O9qmQeRynyY/view)

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:

> [@Making an Image move in the app clicker game](https://forum.code.org/t/making-an-image-move-in-the-app-clicker-game/15378/13):
>
> Big picture: the topic of animation is a source of confusion both in App Lab AND generally. Generally speaking you can’t use loops to create animation effects in App Lab - this has to do with the event-driven paradigm of App Lab. If you’re running a loop, that takes over the machine and it can’t do other things in parallel, like listen for events. The source of confusion is of our own making – when you use loops with the Turtle it does cause an animation-like effect. That’s because we did b…

> [@Example code for ball movement in App LAb](https://forum.code.org/t/example-code-for-ball-movement-in-app-lab/15357):
>
> Does anyone have some sample code I could look at for having ball movement like a pong game in App Lab? I have it in Game Lab. Is it possible in App Lab?

Good luck!  
Madeline

---

_[View the full topic](https://forum.code.org/t/incorporating-games-into-event-driven-programming/32411)._
