michael's Recent Forum Activity

  • Hi SteveKane,

    After looking at your capx, I can see several things that need to change.

    First, all of your events for changing the sound\music settings (except for the touch event itself) run every tick - it would be better for them to be sub events of the touch event.

    Second there is nowhere that I could see where you are saving those settings to WebStorage.

    Here's a thread where I helped another Constructor with a similar question. I hope it will help you on your way as well

    how to save settings in a game

    Another thing that I noticed (although not related to your question here) is with regard to your high score.

      1) To display the high score you are retrieving the settings from WebStorage (good) and displaying it via SpriteFont (good), but doing so every time the event sheet runs (every tick - bad). Better to retrieve the value once and only update the display when it changes. 2) To save the high score you are checking the TotalDistance variable compared to the value stored in WebStorage, and if it is higher saving the result back to WebStorage - Every Tick. It would be better to check the highscore at the end of the run, and if it is higher then save it.

    Some good reading here that will help immensely in your game making!

    Hope the capx helps and, happy constructing...

  • I have read every page of this topic. I am wondering what Ashley thinks about this...

  • Woah! Really very cool.... look forward to trying this out...

  • Thanks for the reply ASHLEY.

    Now that you mention 'Touch object's use mouse input' I know I need more coffee. Can't believe I didn't remember that....

    Sorry for taking your time, and thanks for awesome software......

  • Problem Description

    Mouse input is confused when Touch input is implemented in code.

    For example: Left click on object is ignored when Touch events are implemented in the Event Sheet as well. Actually it is swapped around. So if an event says "left click on object = do this" the event will be ignored by left click but will fire when right clicked.

    Note: this only happens if the event sheet has code for Touch input as well.

    This is happening from R168 onward.

    Attach a Capx

    [attachment=0:2dsid7uj][/attachment:2dsid7uj]

    Description of Capx

    The example capx creates\destroys a 9Patch window in the centre of the screen when:

      The space bar is pressed The cog is clicked with the left mouse button The cog is touched

    Steps to Reproduce Bug

      1 Run the preview 2 Left click on the cog - Observe how the popup window displays or disappears - as expected 3 Now stop the preview 4 In the Event sheet - Please enable the Touch group 5 Run the preview again 6 Left click the cog - it does nothing 7 Right click the cog - Observe how the popup window displays or disappears

    Observed Result

    As long as the Touch group is not enabled the mouse input works as expected. But when the touch group is enabled mouse input is confused.

    Expected Result

    Mouse input to work as expected whether touch input is enabled or not

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (Don't Know)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 8.1

    Construct 2 Version ID

    R168

    R169

    R170

  • Hi wolfomat

    maybe use invisible sprite with the wrap behaviour and pin your three images to that...

  • michael

    Thanks. When I publish Star Nomad, and get some free time, I will do a tutorial on optimization tips for mobiles.

    As for the current query, the BG in this game is only 512 pixels wide and 16:9 ratio. I did it on purpose to prevent high memory usage as I have a lot of them.

    Thanks for the reply , look forward to the tutorial .

    I am targeting Win8, so have a window size of 1366 x 768. Unfortunately testing with chrome (no webgl) on android probably isn't the most reliable source for my target platform, but don't have a Windows tablet yet. While I am focusing on marketing for the PC mainly, I still like to try to get the best performance on tablet as well.

    Good luck with Star Nomad, and keep up the good work....!

  • megatronx

    There's been lots of criticism of C2 low performance on mobiles, I just think its up to the users to optimize their games. Sure, HTML5 is 50% slower than native code, guess what? People forget that phones this year are 100% faster than last year. And last year's phone certainly run HTML5 games just fine, so do phones from 2-3 years ago.

    very good work mate! it really is a challenge to get good performance on mobile, but definitely doable!

    I would be intrigued to know more about your asset sizes, especially your backgrounds, I really struggle getting any more than 30-40 FPS on my Galaxy Tab2 10.1 using preview on lan.

    If you ever get the time, it would really help the C2 community, if devs like yourself and thehen, could do some kind of tutorial outlining some of the basic things that help you achieve 60 FPS on mobile!

    Anyway nice game! Keep up the good work!

  • Hi Valentin,

    Well there a various ways to do what you want.

    So I had a bit of a play.

    Heres a capx on dropbox (quite big cause of the music)

    The capx uses a couple of methods to show how to achieve what I think you are looking for.

    There are plenty comments in capx so hope you can get some ideas to help you achieve your goal.

    Hope this helps.....

  • hi,

    something like this:

    play song by name>choose(song1, song2, song3, song4, song5)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Delgado,

    This tut from Ashley is a must read if you haven't done so already - it will completely change your approach as you design any game.

    Happy constructing!

  • Ragevortex

    I would do same as BluePhase suggests.

    This example uses an instance variable to track if the ship has its shield up or not.

    [attachment=0:3ijxv6st][/attachment:3ijxv6st]

michael's avatar

michael

Member since 24 Dec, 2012

None one is following michael yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies