I'm currently trying to take a baked version of my game and get it running as an iOS app. I have an appmobi account as well but it never seems to work. It always seems like AppMobi is all fluff. There's pretty buttons for all these things that you can do but I can't seem to just get the damn game on the app-store. Has anyone successfully published a game using AppMobi?
I just went through the entire process from A-Z with AppMobi and got my Iphone .ipa file. I loaded up and was saddened to see that it runs at a whopping 8 FPS. /sigh. I guess this is why Dominic went through the trouble of creating Ejecta.
Does anyone know if a game like mine can even achieve 30+ FPS running through the app-mobi framework? Heres a link: http://coreysnyder.me/baked/zcbaked/
Rq 1 : i didn't find the 'play' button instantly, you have to make it bounce somehow or more contrasted.
Rq 2 : on click the selection arrow should be, for instance, half speed and 45 degrees, since in fact you never want speed = 0. So 'spawn' your selection circle down/left of the click. A larger circle choice would be better. With 3/4 small circle marks ('units') to understand what the speed will be ( and maybe canon and/or circle vibrating all the more the speed is high... for fun ! :-) and you should block the canon angle in between -45/+60 or something like that, and also have a minimum speed. Make all this obvious in the circle by drawing 'forbidden' zone darker. The cursor should stay at last 'legal' position, and fire is cancelled if you release outside/in non legal position.
For the speed, first thing that i noticed is your background is still : so you could use 2 canvas, the first one with background, and second one with the entities, that you clear using clearRect (so you have to override Game.draw, since it uses fillRect by default).
you might use several clearRect to erase only drawn part of your screen, but it needs benchmarking against a full canvas clearRect, especially with 'a lot' of entities (but you can clear 'the floor' from all zombies with only one clearRect, for instance...).
This should give a good boost to the speed, since you save one full screen redraw per frame.
Rq : i know that this double-canvas 'trick' works on Browsers, but don't know for smartPhones. it 'should' work ...
HTML5 games tend to run slowly if you just port your desktop game onto a phone without optimizing. Heres a link to Dominic's techniques for mobile optimization : blog post
We also have a acceleration technology called directCanvas. After you optimize, if you are still getting poor FPS, you could convert to use directCanvas and get it up to 40-60 FPS.
Any questions just let me know, I'd be glad to help out :D
@Vincent Thanks for that great feedback. I've heard similar responses from my testers and so I'll be making some modifications to it soon. The two canvas idea sounds good. I originally didn't do it that way b/c I did a parallelex scrolling effect. You can use the arrow keys (Left & Right) to see this in action. As the game evolved I stopped allowing the scrolling. So now its obsolete. For your clearRect idea, what would tell the redraw which items were cleared out and which weren't? For instance if I cleared just the portion of the "Runway" where the enemies walk. When the draw method runs again, its going to redraw every entity on the canvas, not knowing which got cleared out. Correct?
For the clear/redraw your options are :
draw : - clear canvas
- draw all entities
draw : - clear all entities
- draw all entities
in init : draw what is still
in draw : - clear all moving entities
- draw all moving entities
!!!! provided what is moving never goes on top of what's still !!!
draw : - clear all non-zombi things
- clear runway
- draw all entities
... and many other combinations but you get it...
to know wether an entity is a zombi, you can either add a 'isZombi' property
so if (entity.isZombi) ->...
( ( you can use a 'isMoving' property in the same way. ) )
@Tyler I've come to a conclusion to the question of:
Q: "Does the directCanvas approach remove the possibility of showing HTML Overlays over the canvas?"
Unfortunately I'm finding its not that easy to use if you didn't start your game from the beginning using it. Porting the game after its already finished is quite a pain for me. I wish I could get in touch w/ someone at AppMobi to help out.
Sorry for the radio silence, I had a really busy Thanksgiving weekend. If you use skype, you can add me at appmobi.tyler and I can help you through the dev process of switching over.
If you have a UI that is based solely in JS, then it's not too hard to get that working. If you have HTML elements and a lot of DOM calls from the game engine, you'll have to do a little more re routing of those commands. I am doing a talk in California on Wednesday and will be traveling all day Tuesday, but if you send me any questions you have at email@example.com, I'll gladly answer you. After Thursday I'll be able to give you support over skype.
Page 1 of 1