I can't really easily profile what's happening on the device, but Chrome has a pretty good profiler, and it says that a large chunk of the time is spent during drawing. A surprisingly large amount of time is also spent in the getTile method that takes in x,y and returns tiles[y % something * something else + x % something more else]. Is the modulus operator really inefficient or something? Note that this was for a sample I was working on which had a layer with a single tile and a virtual size to cover the screen, so I don't know if that made it worse.

Hm... just discovered the ondevicemotion event for HTML5. I wonder if I could use that to provide inputs on mobile devices. Looks like support for it is not very consistent yet. But I got a new phone yesterday (LG Optimus T) partly so I could start testing mobile game compatibility/support, and that device can detect motion. I don't know yet whether its browser supports motion events, but hopefully someday if not today. I can't tell what browser the device runs. I suppose there are other browsers I could download. Wow there's Dolphin Browser, Opera mini, Opera mobile, Skyfire, Dolphin Browser Mini, Boat Browser, UC Browser, Boat Browser Mini, Angel, Galapagos, Ninesky (ooh, explicitly supports HTML5 and flash), NetFront Life Browser, good grief, 15000+ results! Why the hoop'n'daddy are there so many browsers!?

Well, I made a game that runs nicely on my phone (and presumably an iPot touch) at: http://sgdk2.enigmadream.com/ben/Spudzu.html. Click the map to drop lights that attract the little yellow creature. I designed it to run at 15 FPS, and it seems to have no problem doing so. Let me know if it runs about the same for you. The background clearing is a little glitchy, especially on large displays that show more map than exists, but it works pretty well on small displays. There are a few pixels of background that still don't paint right, but I was too lazy to do it correctly for just a few pixels. Maybe nobody will notice .

P.S. I made some changes to SGDK2 in the process and committed them to SVN:

Implement GeneralRules.Clicked to check if mouse was just clicked down or touch interface was touched.

Did you have any issues at first with frame rate, or was my problem just a fluke, do you think? Because it runs just fine on my iPot Touch. Knee thing I would change though is the scrolling insets. The character gets somewhat close to the edge of the screen.

Did you have any issues at first with frame rate, or was my problem just a fluke, do you think? Because it runs just fine on my iPot Touch. Knee thing I would change though is the scrolling insets. The character gets somewhat close to the edge of the screen.

Hearing of your issues with low frame rate, I designed this game to work at a low frame rate. So I have not attempted anything with a high frame rate yet to see if I would have any issues. Did you have (m)any real-time transforms being drawn in your test project that ran at a slow frame rate. The reason I took out the background from the sample project was because it significantly slowed the running to have a full screen of tiles all being drawn with real-time transforms.

Also, about your "Knee" comment:1. I think you had some other word besides "Knee" in mind there2. I am reminded of your other comment about being an adventurer until you were shot in the knee with an arrow. I heard that comment on Skyrim yesterday so now I know what you're talking about. I had heard it before, I'm sure, but my memory is very good at purging useless information ... so good it sometimes purges useful information too. BTW, when did you play Skyrim?3. The scroll margins are narrow because when you're playing on a small device if you have wider scroll margins, you get a flickering effect from the player trying to stay within completing scroll margins. But you *can* drag the map. On my device, when I use Dolphin, which allows my to turn off all the framing of the browser window, I can get a decent size view where I could increase the scroll margins. But I don't know how large I dare to make them before I risk some browser of some phone causing the scrolling to go nuts.

1) Damn You Autocorrect. Should be "One".2) Never played Skyrim. Just heard of many, many other people mentioning that comment coming up a lot in Skyrim.3) Would it be possible to have scroll margins be display-size dependent? So that if you're playing on a small screen, it works as intended, but if playing on a really big screen, it still scrolls without needing to go all the way over to the edge? Scrolling around is possible, yes, but somewhat difficult due to the tapping to scroll also placing the light on the spot you tapped. So you have to be careful to tap where the character already is.

Not sure if here is the best place to continue reporting issues I've found, or if I should create a new topic.

That said, I've found an issue with saving the game. If the very first thing done is saving the current state of the game, before specifying what should be saved (where it should supposedly save everything), it fails to save, because GeneralRules.saveUnit.maps is undefined.

Another issue is with rules whose function name is only one character long (such as = or +). The CamelCase function assumes the names to be at least 2 characters long. When it reaches the method to apply camel case to such a function name, it throws an index out of bounds exception.

A third issue, which is another with the Blocked method. It has "Math.ceiling" in the "left" case, where it should be "Math.ceil"

Not sure if here is the best place to continue reporting issues I've found, or if I should create a new topic.

That said, I've found an issue with saving the game. If the very first thing done is saving the current state of the game, before specifying what should be saved (where it should supposedly save everything), it fails to save, because GeneralRules.saveUnit.maps is undefined.

Another issue is with rules whose function name is only one character long (such as = or +). The CamelCase function assumes the names to be at least 2 characters long. When it reaches the method to apply camel case to such a function name, it throws an index out of bounds exception.

A third issue, which is another with the Blocked method. It has "Math.ceiling" in the "left" case, where it should be "Math.ceil"

Very strange that you are observing that behavior with the CamelCase function. I have an "=" function in my Spudzu project (to jump), and it returns "=" when I call CamelCase on it. "=" is the first character, and a 0-length string is the remainder starting from position 1. In the immediate pane, I can enter

? "=".Substring(1)

and it returns

""

Only when I enter

"=".Substring(2)

does it throw an exception. Something else must be going on. Do you have a 0-length function name?

I suppose that's possible, but I thought I had noticed it occurring on a "+" function. I would assume there would be other issues with a zero-length function name though.

Edit: After removing the code I added to make it work in the case I had problems with, it's working fine again. It may very well have been an empty string function name, but I would've expected that to show an error rather than just not work (there were no errors listed in the top, and compiling with F7 worked correctly).

Durnurd, do you have a project that I might be able to use as an mobile device template project and demo (perhaps with some overlay for directional inputs), or should I be working on one of those myself?

I had made something that sort of worked, using a custom Player and four plans to change the inputs when touching inside them. But it was kind of messy, and didn't take too long to make. so you may just as well start from scratch.