nutmix's Recent Forum Activity

  • If I want to create a ball, then do stuff with it (e.g. move it around), that's easy. But If I want to create an instance of say a blue, black or red ball, then do the same stuff with which ever one I just created?

    E.g. inn bingo, the balls are different colours depending on the number just called.

    E.g. if the number is between 1 and 15, create a blue ball

    if the number is between 16 and 30, create a green ball.

    Then I want to do a whole lot of stuff with that ball. But I dont want to have to duplicate all that code for each ball colour, and I dont think you can pass balls (objects) in as parameters to a function.

    I actually solved the problem by making the balls different frames of a single sprite, but I'm interested if there is another way for cases where the sprite hack would not have worked?

    Many thanks for your thoughts.

  • Ha, so it will always be slightly longer than 1s, so it will accumulate a positive error over time.

    I assume I need to do something different, e.g. get the timestamp of now, then check every tick if the current time stamp is >= 1s different, then 2s differnt etc. This will not have the accumulative error.

    Looks like System.wallclocktime might be what i need? Im hoping this is similar to the unix timestamp in ms.

  • Is this event approximate, or fairly accurate? What I mean by that is that assuming the game is running at full speed (60fps?),

    1) would the timer be accurate to within miliseconds?

    2) would errors accumulate? Or if the system was busy of 2X seconds, would the event fire twice in quick succession, and "catchup" afterwards?

    3) If you say ran "every 1 second" say 1000 times (i.e. let the event fire 1000 times), would the elapsed time be 1000s +/- <1s?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow, I had no idea you could legitimately use a blank sub event, I thought they were just temp placeholders for pasting in real sub event code.

    Great, that works!

  • if you define a new function, e.g.

    function On "test"

    then you want to add some local variables. However you try and add them, they always come out as global variables. Very frustrating.

    How do you add local variables to a function?

    I have seen how you can add them to a sub-event, but that's too late, I need to defined them before any of the sub events trigger, as they are set in the action of the function definition (i.e. used before they are defined!)

  • Thank you very much gentlemen.

    I was hoping to avoid the lerp route as my last project ended up 1000 events and it became an unmaintainable mess.

    I just tried out rex moveTo pugin, and it works exactly as I need. I am very surprised that C2 have not added moveTo as a built in - its very very useful and saves a lot of work.

    Pathfinding looks interesting, but for balls moving a few cm vertically in a bingo game, pathfinding is probably overkill (assuming it will treat all my UI elements as non solids?)

    Ill checkout liteTween also.

    All great suggestions - thanks again.

  • Thank you very much gentlemen.

    I was hoping to avoid the lerp route as my last project ended up 1000 events and it became an unmaintainable mess.

    I just tried out rex moveTo pugin, and it works exactly as I need. I am very surprised that C2 have not added moveTo as a built in - its very very useful and saves a lot of work. I only hope it handles layer scaling.

    Pathfinding looks interesting, but for balls moving a few cm vertically in a bingo game, pathfinding is probably overkill (assuming it will treat all my UI elements as non solids?)

    Ill checkout liteTween also.

    All great suggestions - thanks again.

  • Hi, I would like to create something like a stock ticker of text (horizontal). Has anyone done something like this?

    Failing that, I could try and keep my messages smaller than the available window, and just show one for a few seconds, then show the other (I guess I can't transition them - no WebGL on mobile devices yet).

    Its something which is pretty easy in CSS, so perhaps I should be using that iframe plugin? But the I don't know how to communicate the text to the iframe?

    Any suggestions most appreciated.

  • No problem, as long as you are aware of it. I just disable webGL in all my projects (which are mainly for mobile, which doesnt support it yet).

  • Is there a way to detect if audio is supported? I tried using the Audio=> "Advanced Audio supported" which works EXCEPT its false for IE10, but IE10 supports audio fine for my game. So I need something like "Advanced Audio Supported" OR "BRowser = IE10" or some other hack?

  • Ashley, is cocoonJS for creating APPs only? Or will it create a web based game which will run from a web page (i.e. no app to download through the app store?)

    The customer is in cash gaming, so apps are not an option.

  • Hi Ashley, how have people been able to create any mobile HTML5 games without sound?

    I just downloaded the Beta Chrome browser for Android. Seems to work, so at least I can demo my game on ios6 and an android device.

nutmix's avatar

nutmix

Member since 16 Aug, 2012

None one is following nutmix yet!

Trophy Case

  • 12-Year Club

Progress

12/44
How to earn trophies