farflamex's Forum Posts

  • Yeah mine works fine on a poor mobile phone too. I have 50 to 100 sprites on-screen at times with lots of collision detection. It occasionally drops to 10 fps but most of the time it's smooth. Problems with the sound but that's a different issue.

    He said he was using physics, which are very processor-heavy. I found that any more than 10 physics objects had my phone struggling.

  • I'm not seeing anything at all, either when previewing or when exporting and uploading to Clay.io. In earlier versions, I did see a blank box which said something like 'Ads will not show when previewing', which made sense, but now I see nothing at all.

    I have the Clay.io object added (and working with hi-scores) and have added the ads addon (that's a lot of ad's). I've made sure I have the latest versions of both.

    I assume that all I really need to do is drag the object onto my screen and the ad should show there? I'm not seeing anything. I've tried putting it on it's own layer at the top of the pile just in case it was covered up, but still see nothing.

  • It's not fair to blame C2 for these problems. Nobody ever claimed that a C2 program would perform perfectly on every platform. It's obvious (and stated) that mobiles run much, much slower than desktop PC's. But even with a desktop PC there are limits. You wouldn't put a million sprites on the screen, see the frame-rate drop to 1 fps and then blame C2. There are limits and you need to test for these limits from the beginning.

    As an example, I recently decided to try my hand at developing a mobile game. Since I didn't even have a mobile with a touch-screen, I went out and bought the worse one I could, so that I could test on it. I was aware from the beginning that I'd have to be careful not to throw too many objects around and although I do most of my testing on the PC (I have a very powerful PC) I make sure to test on the phone at least once a day. It runs around 30fps, sometimes a bit lower. But if it starts to drop to 20fps, I know I need to make changes to my game. It's not because C2 is bad, it's because the phone is bad. If I developed the same game using a different program, I'd still have the same problems - the phone wouldn't suddenly become more powerful.

  • You have to give the image the setcolor effect (under effects, then the 2nd group down).

    I think it may not work on every platform as it's a WebGL effect. But works very nicely on PC's.

    I'm playing around currently with a simple verticle shooter and I'm using the smoke effect again. To be safe, I'm just recolouring the smoke in a paint package (a white, red, green, blue and yellow version) and using 4 over the top of each other to get different effects. It's not as good as setcolor, for example to get purple you can use 2 red and 2 blue layers, but it doesn't look purple, it just looks like a reddy/bluey smoke :p

  • Yes, it's several layers. There's a static background (the stars and nebula), a 'nearly static' planets/sun layer (they move at different speeds depending on their orbit, but are all slow-moving), 6 to 8 smoke images on a single layer (opacity set to about 25 and moving at different speeds) and then various gameplay layers at the top.

  • Thanks. I came up with the method blackhornet suggested, but I like your solution ramones. Didn't make any sense to me until I sat and looked at it for a while, very neat and tidy :)

  • Having a minor brain seizure here. What I want to do is, when I touch an object, I want to set that object's 'selected' variable to 'on' and set all the other objects in the family to 'off'.

    So I have..

    On touched 'Family'.... 'Family' Set selected to true.

    And now I want to set all the other objects in the family to false. I can't just set the entire family to false above this event because I want this value to persist until another selection is made.

    I know there's a simple solution but I can't think of it right now.

  • It's not just a ship on a screen which sits still. There are other ships and sprites which are constantly moving, so the entire screen is being redrawn either way.

    Take the example vertical shooter. Add an FPS text to it.

    The enemy ships constantly move and your own ship constantly fires. So the screen is being refreshed and redrawn correctly. My phone shows 50 fps if I don't touch the screen. If I touch the screen and the ship starts to move, it drops to 35.

    Even if I remove the actual moving code and just have 'Is in touch' and then have zero actions, it still drops to 35, just by touching the screen. If I HOLD a certain location, it moves back to 50fps, but if I move my finger around the screen, it drops to 35 or less (even though now your ship doesn't move because I've removed the code, but the other ships/bullets are still moving).

  • The ship is drawn every frame either way though? Even if it just sits still, it's still redrawn. The only thing that changes with the touch event is the event itself and even if change that to do nothing at all (so it's just an empty 'Is in touch', it causes a slow-down of at least 10 fps. This is with the example shooter.

  • It's not that Ashley. I do have stuff on my screen. I have a basic shooter (basically the example shooter with a few of my own bits added) and it does run at 60 fps. If I put around 50 sprites on, it starts to slow down, which I'd expect. But the touch completely drags it down to 43 or so, regardless of how many objects are on screen.

    I can confirm that the same thing happens on the example vertical shooter. It runs at a near-steady 50 fps since the number of objects on the screen doesn't vary much (if you don't move) but as soon as I start moving, it drops to 35 (bearing in mind that moving tends to kill more enemies too).

  • Ahh, does sound like the same thing then because I am using 'Is in touch'. It's as if touching the screen itself is causing the device to struggle.

    Is there a better method? Only check every 0.1 seconds or something?

  • This isn't a question about general phone performance. I'm aware that they're not as powerful as PC's by a long way and this is just testing on local LAN. But it seems a bit strange, so wondering if it's something I'm doing wrong or is to be expected.

    Very basic so far, just working on a simple vertical shooter. Runs at 60fps with about 50 sprites, slows down slightly after that but I expect that so I intend to keep the sprites to 50 or so max.

    But what does seem strange is, when I move my player ship with touch control, that slows down the FPS to about 45-50. Now the calculation for moving the ship is slightly complicated, but it's still only one calculation. I know phones are slow, but should a single 'complicated' piece of math make a performance hit like this?

    The code for the movement is ...

    If....

    Touch > Is in touch

    Distance (Player.X,Player.Y,Touch.X,Touch.Y) > 750 x dt

    then ....

    Player

    Move(Min(750*dt(Distance(Self.X,Self.Y,Touch.X,Touch.Y) pixels at Angle(Self.X,Self.Y,Touch.X,Touch.Y)

    Ok, that's a bit complex and it happens every frame, but should it really cause a 10 fps performance hit? I can speed it up of course, but just wondering if I'm missing something here.

    I should point out that it's not something else causing this. For example if I turn off all bullets and aliens and everything else, the movement alone still causes a large FPS drop. Is it just the code doing that?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is still happening by the way. The sounds are fine as they load in to other projects. At the very worse, shouldn't it produce an error? Instead, it locks up C2 completely and I'm forced to shut it down via the Task Manager, meaning I lose any work I've done.

    It does seem to be certain sounds, so I've just deleted them. They load in to sound programs fine but for some reason C2 doesn't like them so I've deleted them. Even so, locking up completely seems like a bad result, shouldn't it just reject them?

  • This is awesome and really easy to use, unlike the aforementioned Mochiads. Just slot it in and basically draw where you want your ad.

    Doesn't seem to work on Newgrounds though, because I think they have a way of blocking stuff like this.

  • Anyone know if you can use the Newgrounds API with C2 games to add ads? Or any other way to include ads? I really like the Newgrounds preview screen, it's very easy to set your game up there.