As posted here on Ansca Mobile's blog:
Here is how to code an Angry Birds style game basis in less than 30 minutes using the awesome Corona SDK...
Tuesday, January 31, 2012
Friday, January 06, 2012
Thursday, January 05, 2012
Interesting And Social API In Corona SDK
Here is a list of blog posts documenting how to use the most interesting and useful parts of the Corona SDK API by Ansca Mobile...
Many of these can be found on this root page: http://blog.anscamobile.com/category/tutorials/
Firstly, the social API's:
Many of these can be found on this root page: http://blog.anscamobile.com/category/tutorials/
Firstly, the social API's:
- Facebook Single Sign On
http://blog.anscamobile.com/2012/01/implementing-facebook-single-sign-on/ - Native email and SMS
http://blog.anscamobile.com/2012/01/composing-email-and-sms-in-corona/ - App URL schemes
http://blog.anscamobile.com/2011/12/using-app-url-schemes-in-ios/ - Push notifications
http://blog.anscamobile.com/2011/12/push-notifications-for-ios-in-corona-sdk/ - Local notifications
http://blog.anscamobile.com/2011/09/local-notifications-now-in-daily-builds/ - Uploading photos to facebook
http://blog.anscamobile.com/2011/12/uploading-photos-to-facebook-in-corona/ - Kindle Fire apps
http://blog.anscamobile.com/2011/11/building-and-publishing-kindle-fire-apps/
And second, the deeper API's:
- Storyboard API
http://blog.anscamobile.com/2011/11/introducing-the-storyboard-api/
http://blog.anscamobile.com/2011/11/common-storyboard-api-questions/ - JSON
http://blog.anscamobile.com/2011/08/tutorial-exploring-json-usage-in-corona/ - Custom fonts
http://blog.anscamobile.com/2011/07/custom-fonts-corona/ - Web popups
http://blog.anscamobile.com/2011/08/getting-creative-with-web-popups/ - XML files
http://blog.anscamobile.com/2011/07/how-to-use-xml-files-in-corona/ - Content scaling and Dynamic image resolution
http://blog.anscamobile.com/2010/11/content-scaling-made-easy/
http://blog.anscamobile.com/2011/01/dynamic-image-resolution-made-easy/ - Closures
http://blog.anscamobile.com/2011/02/using-closures-in-lua-to-avoid-global-variables-for-callbacks/
Wednesday, January 04, 2012
Tuesday, January 03, 2012
Tuesday, December 13, 2011
Tuesday, December 06, 2011
Calculating Trajectories
When plotting the course of a (lets say) ball thrown in a simulated physics environment it is advantageous to be able to draw the course the ball will follow. Doing some "internet research" brought up this little gem of a site:
From which I was able (yes, it's cheating, but hey) to refactor the javascript and produce the code for a Corona implementation here:
The root of the above site is quite amazing and hopefully can teach everyone (certainly me) about all manner of interesting physics concepts and maths:
Friday, December 02, 2011
Tuesday, November 29, 2011
Wednesday, November 23, 2011
Tuesday, November 22, 2011
Thursday, November 10, 2011
iOS 5 Accessibility Features For Everyone
Playing around under the Settings->General->Accessibility section and found some absolute gems - nice and useful for everyone...
- General
- Accessibility
- Vision
- Zoom
Allows 3-finger zoom and pan of any screen, including the lock screen. Controls work as expected.
Good for when photo zoom doesn't quite do it for you or you need to check pixel-specific placement on a web page. - Speak Selection
Separate from VoiceOver, this allows any selectable text - web pages and such - to be spoken. The usual popup menu gains a "Speak/Pause" item. Speech speed can also be adjusted.
Good for when you just can't be bothered to read the page. - Hearing
- Custom Vibrations
When editing a contact this adds a 'Vibration' option immediately beneath the 'Ringtone' option. Vibrations come with 5 pre-set patterns and custom patterns can be very easily recorded, named and re-used.
Good for when you need to know who is calling you without taking the phone out your pocket. - LED Flash for Alerts
Simply flashes the camera flash LED when an alert, like an incoming call, occurs.
Good for truly silent but noticeable alerts. - Physical & Motor
- Triple-click Home
Set this to 'Ask' and it will pop up a menu whenever the Home button is triple-pressed - even when locked.
Good for easy access to some of the above options.
From there you've got options to turn On/Off the: - VoiceOver
Not the same as 'Speak Select' - reads anything tapped with a single tap. - Zoom
See above. - White on Black
Inverts the whole screen colour.
Friday, November 04, 2011
Tuesday, November 01, 2011
Doing iOS in CSS3 and HTML5 - iPad Popover Menu
This is really great... Peter Viszt has created an iPad popover menu in CSS, using the design by Morgan Knutson as a basis. It looks really good and he links to a customisability tool:
- CSS Popover: https://forrst.com/posts/CSS3_iPad_style_popover_menu-PJv
- CSS tool: http://jsfiddle.net/XYubE/
- Original designs: http://dribbble.com/shots/289926-Free-download-of-my-iOS-style-popover
Wednesday, October 19, 2011
Thursday, October 13, 2011
T-SQL Tree Into XML
My previous post contained a link to a Microsoft article detailing how to get well structured XML directly from T-SQL. This post is about getting a tree of data from T-SQL into XML. FOR XML EXPLICIT cannot be used (without major headaches) but a simple recursive function and a SELECT can be used. Here's where I poached my solution from:
- http://stackoverflow.com/questions/2409228/generate-structured-xml-document-from-hierarchical-table-data-t-sql/2425180#2425180
In short, my code is something like this (generic code for a wider audience):
CREATE function [dbo].[SelectCategoryChild](@categoryid as int)
returns xml
begin
return (
select
categoryid as "@id",
parentcategoryid as "@parentcategoryid",
title as "@title",
dbo.SelectCategoryChild(categoryid)
from category
where parentcategoryid = @categoryid
for xml path('category'), type
)
end
GO
SELECT
categoryid AS "@categoryid",
'' AS "@parentcategoryid",
title as "@title",
dbo.SelectCategoryChild(categoryid)
FROM category
WHERE parentcategoryid is null and siteid = 1
FOR XML PATH ('category'), root('categories')
The code above works for a single table created from the statement (references and indices omitted for clarity):
CREATE TABLE [dbo].[Category](
[CategoryID] [int] IDENTITY(1,1) NOT NULL,
[ParentCategoryID] [int] NULL,
[Title] [varchar](150)
)
CategoryID is the primary key,
ParentCategoryID references the CategoryID and provides theone-to-many tree structure, a NULL value indicates the node is a root node (top-level) in the tree,
Title is simply some data (in this case the name) of the node.
T-SQL FOR XML EXPLICIT
An excellent example of producing well formatted and structured XML direct from SQL where a non-tree structure is in use. I have used this to get a complex series of document information out in a specific format.
Monday, September 05, 2011
Subscribe to:
Posts (Atom)











