For handling moving objects ("sprites"), App Inventor uses an X/Y coordinate system for position on the screen, Heading for direction of movement, and Speed and Interval for velocity.
X and Y measure horizontal and vertical distance from the top left of the screen in units of pixels. By default, the Screen1 Sizing parameter is set to Fixed, which generates apps with a horizontal dimension of 320 pixels in portrait orientation. The vertical dimension varies with the device; designing for 320x480 pixels should work on most devices. Changing the Sizing parameter to Responsive results in apps that use the full screen resolution, which varies considerably from one device to another. The apps in this course use Fixed sizing for predictable behaviour.
The Z value of a sprite determines the stacking order when sprites overlap, with higher numbered sprites rendered in front of lower numbered sprites.
Heading is expressed as an angle between 0 and 359 degrees, with 0 representing movement to the right, and proceeding anti-clockwise from there.
Interval determines the time in milliseconds between updates to a sprite's position, while Speed determines how many pixels the sprite moves per update. Setting the Speed to 5 and the Interval to 10 (i.e. 5 pixels every 10 ms) is a reasonable starting point for a rolling ball with smooth animation.
There are built-in procedures to detect when a sprite reaches the edge of the screen, with the value of Edge set to 1, 3, -1, -3 for top, right, bottom, left respectively. Edge values are also used for the corners, where 2, 4, -2, -4 represent top right, bottom right, bottom left, top left respectively.
This document contains a reference diagram showing the X/Y, Heading and Edge schemes, and would be useful to have to hand when working on arcade style games:
App Inventor Coordinate System
Wednesday, 2 December 2015
Friday, 27 November 2015
Shortened URLs
Short URLs have been created for the Smart Skills video playlists and course materials. These can be shared with students as needed, so that they can access the material without needing to enter unwieldy YouTube or Google Drive URLs. The shortcuts are listed below, and can also be found by hovering over the corresponding links in the Resources section of each lesson page.
Additional shortcuts will be created as new materials are added to the course.
| Reference Material | |
|---|---|
| http://unitydcu.ie/ss-ytb | Smart Skills YouTube Channel |
| http://unitydcu.ie/ss-inv | Introductory Videos ("Week 0") |
| http://unitydcu.ie/ss-ref | Reference Library |
| http://unitydcu.ie/ss-sta | Starter Apps |
| http://unitydcu.ie/ss-tst | Testing Your Apps |
| Project Tools | |
| http://unitydcu.ie/ss-dev | Development Cycle |
| http://unitydcu.ie/ss-bst | Brainstormer |
| http://unitydcu.ie/ss-pjm | Project Manager |
| Core 1: Coding | |
| http://unitydcu.ie/ss-c1v | Video Playlist |
| http://unitydcu.ie/ss-c1b | Project Brief |
| http://unitydcu.ie/ss-c1d | Downloads |
| http://unitydcu.ie/ss-c1n | Project Notes |
| http://unitydcu.ie/ss-c1c | Extra Challenges |
Additional shortcuts will be created as new materials are added to the course.
Tuesday, 17 November 2015
Supporting documents
Three new documents have been added to the Week 0 - Introduction to Smart Skills resources section:
Two new documents have been added to the Core 1: Coding resources section:
- Reference Materials links to key reference pages on the App Inventor website
- Starter Apps suggests some small apps that can be built quickly by new users
- Testing Your Apps outlines several test setups, and the pros and cons of each
Two new documents have been added to the Core 1: Coding resources section:
- Project Notes includes additional information to complement the course videos
- Extra Challenges suggests some additional features that students who progress quickly may like to try
Monday, 16 November 2015
Core 1: Coding Updates
The videos for Core 1: Coding have been edited to remove 'first takes' as needed. There is no change to the instructional content, so there is no need to revisit videos that students have already viewed. The edited videos are new uploads, but the playlist URL has not changed; the old versions of the videos are now marked private.
The downloadable AIA file WhackAMole_example.aia has been updated, and therefore differs slightly from the app described in the video, as follows:
The downloadable AIA file WhackAMole_example.aia has been updated, and therefore differs slightly from the app described in the video, as follows:
- The mole image sprite has its Z property set to 2, so that it appears in front of the hole image sprites, which have the default Z property of 1. The Z property determines the stacking order of image sprites.
- The reduction of the timer interval each time the score is incremented is now less aggressive, dropping to 80% of its previous value each time. The original scheme reduced the interval too quickly.
Friday, 13 November 2015
Privacy of Development Diaries
The third deliverable for Core 1 requires students to create a Development Diary, with Blogger as the recommended platform. Please note that new blogs are public by default: they are listed on Blogger, visible to search engines, linked to the author’s Google+ account, and open to all readers (public). These settings can be changed after each blog is created:
Settings -> Basic -> Privacy - do not list on Blogger, hide blog from search engines
Settings -> Permissions -> Blog Readers - set blog to private (author or invited readers only)
Settings -> Basic -> Privacy - do not list on Blogger, hide blog from search engines
Settings -> Permissions -> Blog Readers - set blog to private (author or invited readers only)
Monday, 9 November 2015
Android Device Setup
App Inventor builds functional Android apps which should run on any Android phone or tablet, either by connecting the device to App Inventor for 'live' testing, or by downloading an APK file to the device to install the app (which can then be run independent of App Inventor). Here are some tips for setting up an Android device.
The recently released Amazon Fire 7" tablet is the lowest-priced Android tablet currently available (€70 in Argos or PC World) and is excellent value for money. It runs Fire OS which is based on Android, and in my tests so far it's been able to run anything I built with App Inventor. The tradeoff for the low price is that it promotes Amazon content, but quite a bit of that can be hidden using Parental Controls (the Fire for Kids setting is too restrictive, as it blocks browser use). The tablet needs to be associated with an Amazon account, but an account can be created during setup without supplying credit card or address details.
Sideloading Apps
Loading apps from sources other than app stores is sometimes referred to as ‘sideloading’. This requires that the device allows installation of apps from non-market sources; look for a checkbox under Settings -> Security that refers to installing from unknown or untrusted sources, with an accompanying warning about malicious apps. Some phones will open the appropriate setting when an attempt is first made to sideload an app.QR Codes
For test setups using a QR (Quick Response) code to initiate a download, installation of a QR code reader such as NeoReader is required; some phones have one pre-installed. Readers can be configured to open the browser immediately an URL is detected, bypassing the confirmation step.File Management
If several apps are being downloaded and installed, or an app that takes photos or records sound is being tested, it may be useful to install a utility such as ES File Explorer. This will allow storage space to easily be reclaimed by deleting downloads and media files.
Amazon Fire 7" Tablet
The recently released Amazon Fire 7" tablet is the lowest-priced Android tablet currently available (€70 in Argos or PC World) and is excellent value for money. It runs Fire OS which is based on Android, and in my tests so far it's been able to run anything I built with App Inventor. The tradeoff for the low price is that it promotes Amazon content, but quite a bit of that can be hidden using Parental Controls (the Fire for Kids setting is too restrictive, as it blocks browser use). The tablet needs to be associated with an Amazon account, but an account can be created during setup without supplying credit card or address details.
Monday, 2 November 2015
Core 1 to Core 3 Deliverables and Video Index
In the Lesson Plan section for each week of the Core 1, Core 2 and Core 3 projects, all five deliverables for the project are now listed, with the three that are in focus as Must, Should, Could goals for that week
highlighted. The intention is to make the relationship between each
week's targets and the overall project more visible.
In the Videos section, an index to the video playlist for each project has been added, mapping the deliverables to the videos. This should help students pick up where they left off each week, as they'll work through the videos at their own pace, and facilitate revision if a student wants to revisit a particular topic. Editing of the course videos to make them flow more smoothly will begin this week.
In the Videos section, an index to the video playlist for each project has been added, mapping the deliverables to the videos. This should help students pick up where they left off each week, as they'll work through the videos at their own pace, and facilitate revision if a student wants to revisit a particular topic. Editing of the course videos to make them flow more smoothly will begin this week.










