Toby R's Recent Forum Activity

  • Thanks for the replies Guys.

    You could also use the Is Overlapping condition (...)

    Is Overlapping is not an observer condition, so with the number of my enemies that would be probably way to much CPU consuming...

    On collision ->

    Pick instance 0 ->

    some actions

    If I'm not mistaken this will run multiple time anyway, just the effect of actions will go to the picked instance.

    You could make something like a trigger.

    Create a local variable called "trigger" (needs to be static and needs to be reset to 0 at start of level)

    For the collision event to run the trigger needs to be 0.

    And if the collision event triggers set the trigger to 1.

    So it should just run ones.

    Well yes I was thinking about adding a variable to check this, but somehow I don't find it the elegant solution, so I thought there must be some simplier way.

    Anyway I will give a shot to all of the propositions. Thanks!

  • I struggle with this for a while now.

    I have several sprites in the "enemies" family. Enemies are walking from top of the screen to the bottom. At the bottom of the screen I have an invisible sprite which is simply a - let's call it - finishing line. So when the enemy touch the line, player loose and the score screen appears.

    Now the problem is that if more than one enemy touch the line in the same time "On collision" events run multiple times.

    I've tried even something like that

    On collision ->
         some actions
         disable "on collision" group[/code:3bkoshp2]
    
    And it is fine for a while, because indeed it runs only once even when many enemies touch it, but then when I back to the play screen I have to enable this group again and then it instantly runs again. Like it have in the buffer.
    
    Any ideas how to run On collision efect only once even when there are multiple enemies touching it?
  • Hi mobile devs,

    As we know C2 apps have some restrictions regarding mobile apps. We cannot build very complex apps because of mobile performace. However there is still a variety of actions we can do to make the app work pretty decent.

    * First thing is to optimize our app. We can optimize our game to be less memory consuming, CPU consuming etc. This topic has been covered many times.

    * Now if we couldn't resist our fantasy, and we've built some "heavy" app which we want to publish as an Android app we can target the app for particular group of devices - strong devices. In this way we obviously lose some potential customers, but at least we are sure that those who have the app will have fun, and we won't get bad ratings and comments like "it laags!", "it is so slow!" etc.

    Now I'm wondering how many helpful info can we find in the Internet to do the valid targeting. We can limit our app to be able for download only for the particular Android version (and up). The percentage use of various android versions can be found here: http://developer.android.com/about/dash ... index.html

    Right now KitKat takes around one third of all Android devices. That's a good news, because KitKat's devices are already pretty strong and usually have at least 1GB of RAM.

    Does anyone know any other sites which would help setting app targeting? For instance does anyone know if there is any info in the Internet regarding which is the weakest device with KitKat/Lolipop etc?

  • I believe it's not a bug, it's a feature! ;P But seriously, it could be developed that to save some CPU. Anyway have you tried to set your player's Y position -1pixel together with disabeling solid behaviour? I believe it will do the trick and will look totally natural.

  • I don't think anything can be done. I have the same problem (I don't find it a problem actually cause it's just a blink). White line below shows because browser goes in the fullscreen mode so it's kinda redrawing the content.

    Maybe setting CSS background to black would do the trick? Haven't tried.

    But the Custom Loader layout issue is a loss to the game trully...

  • That's the one! Thanks!

  • I'm looking for a game I saw once but can't remember the title, maybe somone knows this game. Let me explain a bit...

    It's a top down shooter. The graphics was drawn with a pencil or a pen (at least it looked like that) so it was black&white game. If I'm not mistaken universum was in a Wild West but heroes where not the Cawboys but the mexican rebels(?). So from the top you see the big sombrero, not the entire man.

    Does it ring a bell to anyone?

  • Just remember the starting cords of the object and on object release check if new position is wrong or right. If it is wrong then use lerp function or simply Move at angle. Depends what do you mean by "smooth"

  • You can add a second condition to "On touch" ( I'm assuming it's for mobiles).

    On Touch SOMETHING

    (and)

    isTouchAllowed

    (do)

    some action

    Now "isTouchAllowed" can be a variable, or any other condition. For instance you might even add a check if the message is visible or not (On Touch XX and Message is not visible). There are many ways to handle this. It depends on your project.

  • It's a wrong section. Post it to "How do I".. .and you definitely have to show some more info. How do you call PHP in C2? How do you return data to C2? is it a plain text or JSON (keep in mind JSON structure for C2 is a bit different)? Just describe the problem somehow that we could understand what is going on. Right now you just wrote almost something like "it doesn't work - here is the blank screen".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Rable thnx for the link! That clears everything.

    Let me quote Ashley again here [quote:8k49ccl3]"In Construct 2, images are loaded layout-by-layout. This means when a layout starts, every object on the layout is loaded in to memory immediately. This is to avoid mid-game pauses as textures are loaded on the fly. When the layout ends, it will free all the images in memory not used by the next layout, and load any new images the next layout uses."

    So it is totally pointless to store all images in one layout. And a good practice is to stick to semantic rules - which is also a good news .

  • For host I suggest to export the game to NWjs (desktop), and run it directly from the OS on the server. That will give you much better performance rather than opening a browser on the server and run an HTML5 directly from the browser.

    As long as the host process will be active on the server you will have an online open world where players (peers) can connect to. You can even have a lot of server instances in order to handle more players as it is usually done with high traffic mmorpgs etc.

    Now regarding peers (players), they can join or disconnect from the server. It has no impact on server/game stability (unless you code it to be). When player closes a browser tab then it simply disconnects from the server, and such an event should be handled by you in your host events (for instance you might want to inform the rest of players that the particular one lost connection/quit).

Toby R's avatar

Toby R

Member since 23 Mar, 2015

Twitter
Toby R has 18 followers

Connect with Toby R

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x6
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies