thelander's Forum Posts

  • 13 posts
  • Sooo... Looks like I've achieved my 50+ fps with 1 moving object. I think it's because I've used the canvas plugin:

    scirra. [delete this] com/forum/plugin-canvas_t64239

    1. I generate that 11*15 maze on a separate layer

    2. Then I paste that layer on the canvas

    3. And then I delete all the objects I've used to build the maze.

    Now I have 33 objects instead of 200+ and smooth 50+ fps instead of 5-9 fps.

    Agent_Smith_Evil_Laugh.gif

  • My game generates a 11*15 maze of non moving tiles and this is the reason I can't put them all in a single sprite in Photoshop. No sounds, no animations are in the game. During the player movement three object are changing: timer sprite, player, sprite font fps counter.

    It looks like my phone lacks power to render all this. But looks like I've found a solution. Just found Canvas plugin and looks like I can put my maze layer sprites in it. Can't test it on my working place but if this is possible, I'be able to reduce object count to 10% !

    scirra. [delete this] com/forum/plugin-canvas_t64239

    (Can't post any URLs or send PM because of low rep)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thelander

    Its hard to help without a capx or something to go on , so we do it this way. I made a game that has at least 30-40 sprites and animations going off at the same time. Download it and try it on your device , it should run as fast with no slowdown or glitching

    blast-ad-shooter-arcade-action-space-shooter_t181773

    Also did you look at my mobile optimizing tips in this post

    viewtopic.php?f=146&t=181811

    Let me know if you still have an issue.

    The game runs smoothly. I've read your article. I'm going to implement some of your tips and try to review my "code" and then I'll post the result. But I don't think I can reduse object count to less than 180. If only there was a way to bake all the sprites into one.

    tested the apk on my own device (HTC Desire 620 it seems according to its default name when I plug it) and it is a 60 fps almost constant

    Thank you for the test. I hope people won't have phones with worse screen size to hardware ratio than mine.

  • Got my hands on Samsung Note 10.1 2014. Both test project's and my game's apks are running at smooth 50-60 fps.

    WebGL is on. Thank you, oosyrag. I'll try running those tests on my phone.

    Still it looks like I have to find a way to autoadjust game's quality so one build could run smoothly on devices with big screens but different hardware.

  • I'm testing it on ZTE Nubia Z9 mini. I've uploaded the apk of this demo project to dropbox.

    Capx: bit.ly/2cRaiBd

    dropbox.com/s [ delete this ] esz14y16tcatk3b/performance%20test.capx?dl=0

    APK: bit.ly/2cwEiyF

    dropbox.com/s [ delete this ] 7uykwcgwb7qee8n/cordova_project-armv7.android.20160918191838.apk?dl=0

    I can't upload files yet.

  • Looks like I won't get anything good from C2. This project prntscr.com/cjjhju gives me around 35 fps.

  • In my game there's a 11*15 field of sprites with a bunch of UI elements which makes about 200 objects visible on the screen. When the only thwo things changing on the screen are a sprite font element showing current fps and the timer (sprite with width changing accoding to the timer value), the game shows perfect 58-60 fps. But when I launch the player sprite in any direction the game drops to 9 to 1 fps. The only logic executing during the player's movement is a condition like

    If (distance_traveled >= target_distance) { player.stop }[/code:2sfr85k3]
    I'm exporting the game for Android and thenbuild apk via Intel XDK. 
    Why there's such a huge drop in the fps?
  • I'd say don't generate the whole level at once. Generate what's immediately on screen and then progressively generate the rest of it.

    What a nice idea! Thank you )

  • Hi!

    I'm working on a game which has randomly generated levels. After the generation those leves go through another loops of optimisation and adding random stuff.

    Sometimes it takes more than 1,5 seconds to build a complete level which is not good for a continious and seamless gameplay.

    So I want to know if there is a way to do that generation on the background? Player will spend more than 1,5 seconds to beat that level which will be enough to generate the next one.

  • You might like this capx: (not made by me)

    Looks good ) Thanks. Will try to mod this project with jump trough mechanic. But still have to test the precision of the calculations.

  • It's not similar to angry bird - the cat has to land at specific spot and nowhere else.

    The platform has to have "Jump Trough" behavior. I couldn't reproduce it with Physics behavior.

  • Hi!

    I'm trying to launch the cat from one point to another. I know the coordinates, Velocity along X and Gravity. The cat has Platformer behavior. MaxSpeed, MaxFallSpeed and Deceleration are set to 99999999. The gravity is constant.

    Using this formulas:

    [quote:29esez9r]x(t)=x(0)+vx(0)*t

    y(t)=y(0)+vy(0)*t-0.5*g*t^2

    where t is the flight time.

    I've managet to get the Velocity along Y I need to apply to cat to launch him so he lands at specific spot but when I test the game I can't get the correct result - the cat lands slightly further every time.

    Here are my calculations:

    [quote:29esez9r]Vx:=300;Xc:=20;Yc:=290;Xt:=300;Yt:=290;G:=1500

    = 1500

    t:=(Xt-Xc)/Vx

    = 0.9333

    Vy:=(Yt-Yc+0.5*G*t*t)/t

    = 700

    Cat starts at (20,290) and has to land at (300,290). Horisontal velocity is 300 and gravity is 1500. According to my calculations the vertial velocity shoud be equal to 700 but when I set this velocity to the cat he lands not at (300,290) but from 5 to 10 pixels further along the X.

    Here's the link for the project:

    https://www.dropbox.com/s/gi940wsgoozqquv/Asshole%20Cat.capx

  • Hi!

    I want my tilemap object to load another tilemap file created in Tiled. How do I do this? I can load tmx files in constructor but how can I load them ingame?

  • 13 posts