onion's Recent Forum Activity

  • Oh btw, the last comment was still using PhoneGap. I started using Cocoonjs but it's a bit more complicated, you have to register, then download their launcher app, then get a code, and their registration page is currently offline. So I'll have to wait until that's back up.

  • I've upped the window size to 960x640 now, to see if that would improve things - my reasoning being that the device shouldn't have to put effort into stretching the pixels too much - although does mean more pixels to display of course.

    This actually seems to make the game more smooth, although that could just be that there's more frames to play with. The fps hasn't changed at all, it's still around 12-19 on my Nexus 4.

    This also changes the aspect ratio to 3:2 as suggested by a blog article I read. I'm using "scale outer" though so this won't be noticeable to a player.

  • Ah, thanks!

    Dammit, that's a shame, I enjoyed using PhoneGap because it was so easy! I'll try Cocoonjs instead :-)

  • I've been making a game for android, and noticed how slow it is. So I've gone right back to basics and created just a small test project just to see what affects the framerate the most.

    I used some pixel art for a sprite and added the car movement behaviour, with some buttons to move it around etc. Here's a screenshot:

    <img src="http://i.imgur.com/AhYxlUX.jpg" border="0">

    Download my test game capx

    On the desktop I get regular framerates of 50-60 fps, but when exporting to Android through phonegap I'm punished with a really low framerate of 15-30 fps.

    Maybe the framerate counter is broken? When I leave the android app idle the framerate does go up to 179 though, which is MENTAL. But I assume incorrect?

    I think I'm doing everything that one should do to optimise for mobile, for example:

    Aspect ratio 16:9

    Window size: 400,225 (I assume smaller is better - right?)

    Pixel rounding: on

    Scale outer

    Sampling: point

    Sprites with images no larger than 128px (although if you download the project file you'll notice a jpeg in there for testing. Including/removing this doesn't have much impact on the fps).

    Any other ideas for what I should be doing to optimise for mobile?

  • I've imported a spritesheet of tiles to use as background objects. But now I've made changes in Photoshop, and I want to re-import them again - is there an easy way to do this, or do I have to do it manually?

  • Actually I've got a question related to this. I'm using tiles of 32x32 in my layout. Which means quite a lot of tiles - I haven't counted them but there'll be hundreds. Some of the free assets I'm using have object like building split up into many separate tiles which I have to place one by one. Is this more or less efficient that grouping the tiles together in Photoshop and them importing as one object?

  • Cheers guys :-)

  • I've just been importing some spritesheets into C2 from another project, and I've noticed that C2 is separating out all the spritesheets into separate PNG files. It started to make me wonder if this was more or less efficient?

    Obviously the sprites I'm using were bundled all onto one single spritesheet in the first place must have been for efficiency, so it seems counterproductive for C2 to then split them all up again.

    I've no criticisms of how C2 does it. Purely wondering, that's all!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I've had this problem too, I had to line the sprites up in photoshop. Is there any way you can use DAME (I've not actually heard of it!) to export without the margins?

  • I've been senty here by I didn't realise saving an array to webstorage would be so simple :-)

  • OMG that's a much simpler solution - thanks so much ramones, I'm in your debt!

    I've just tried this on my project and it works perfectly :-)

  • I'm making a simple platformer with a level select screen (think angry birds etc - finishing one level will unlock the next. I followed this excellent tutorial: https://www.scirra.com/tutorials/311/level-select).

    So when the user closes the browser, I want the level progress to be saved. I've seen tutorials about web storage in C2, and have implemented this for a single variable. But I actually want to save an array, because I want to save whether the user got 1/2/3 stars on each level.

    So I looked into saving arrays into web storage, and found this example: http://www.jargogle.co.uk/test/ArraySavingLoading/ (thread here) ...which seems a bit complicated.

    I also discovered the save/load feature in C2. Should I be using that instead? Or is it overkill for my simple game?

    Are there any benefits & differences between using webstorage vs save/load?

onion's avatar

onion

Member since 15 Mar, 2013

None one is following onion yet!

Connect with onion

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies