justifun's Recent Forum Activity

  • I got an average of only 24 fps on a powerful desktop machine

  • You could create an invisible base object that follows a smooth path, then attach the bee on top of it that would have the random flying animation for it. So it would smoothly follow the player or whatever, but still appear to be flying erratically.

  • ranma - Can you write up a tutorial for the tutorial section on how to go the low latency audio/eclipse/phonegap route

    There's a lot of people always asking how and no one has really been able to explain all of the steps required.

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can read more about this plugin at:

    tricedesigns.com/2012/01/25/low-latency-polyphonic-audio-in-phonegap

    The low latency audio plugin is designed to enable low latency and polyphonic audio from PhoneGap applications, using a very simple and basic API.

    Getting started:

    Add the following files to your JAVA project, keeping the folder structure:

    com/phonegap/PGLowLatencyAudio.java

    com/phonegap/PGLowLatencyAudioAsset.java

    com/phonegap/PGPolyphonicVoice.java

    Add the following file to your www directory, and add to index.html:

    PGLowLatencyAudio.js

    Add the following to your phonegap plugins.xml file:

    <plugin name="PGLowLatencyAudio" value="com.phonegap.PGLowLatencyAudio" />

    Usage:

    1) Preload the audio asset

    2) Play the audio asset

    3) When done, unload the audio asset

    API methods:

    preloadFX: function ( id, assetPath, success, fail)

         params: ID - string unique ID for the audio file

                   assetPath - the relative path to the audio asset within the www directory

                   success - success callback function

                   fail - error/fail callback function

         detail:     

                   The preloadFX function loads an audio file into memory. Assets that are loaded using preloadFX are managed/played using the Android SoundPool class.   These are very low-level audio methods and have minimal overhead.   These assets should be short.   Sound files longer than 5 seconds may have errors including (not playing, clipped content, not looping) - all will fail silently on the device (debug output will be visible if connected to debugger). These assets are fully concurrent and polyphonic.

    preloadAudio: function ( id, assetPath, voices, success, fail)

         params: ID - string unique ID for the audio file

                   assetPath - the relative path to the audio asset within the www directory

                   voices - the number of polyphonic voices available

                   success - success callback function

                   fail - error/fail callback function

         detail:     

                   The preloadAudio function loads an audio file into memory. Assets that are loaded using preloadAudio are managed/played using the Android MediaPlayer.   These have more overhead than assets laoded via preloadFX, and can be looped/stopped.   By default, there is a single "voice" - only one instance that will be stopped & restarted when you hit play. If there are multiple voices (number greater than 0), it will cycle through voices to play overlapping audio.

    play: function (id, success, fail)      

         params: ID - string unique ID for the audio file

                   success - success callback function

                   fail - error/fail callback function

         detail:     

                   Plays an audio asset

    loop: function (id, success, fail)      

         params: ID - string unique ID for the audio file

                   success - success callback function

                   fail - error/fail callback function

         detail:     

                   Loops an audio asset infinitely - this only works for assets loaded via preloadAudio

    stop: function (id, success, fail)      

         params: ID - string unique ID for the audio file

                   success - success callback function

                   fail - error/fail callback function

         detail:     

                   Stops an audio file - this only works for assets loaded via preloadAudio

    unload: function (id, success, fail)      

         params: ID - string unique ID for the audio file

                   success - success callback function

                   fail - error/fail callback function

         detail:     

                   Unloads an audio file from memory

  • Construct is the best value for the price out of any of the engines out there. The ease of use and the power of what you can do with it doesn't compare. Ashley and the rest of the Scirra team are super awesome and always on the forums answering questions and providing support unlike other companies. Best investment i've ever made.

  • add

    <preference name="fullscreen" value="true" />

    to config.xml

  • Another approach is to give the player a instance variable called "Flying" and set that to 1 whenever he's flying

    then check against that as needed.

    eg: if player "flying" = 1 then do this, Else do that.

    But with regards to the object not "overlapping" with the platform, try using the collision at offset condition and use something like y+20 as the offset to make sure its lower than the bottom of the character's feet. (without seeing the game im not sure how it looks)

  • Try the tutorial again and see if you can figure it out.

    Double check which imagepoint the bullets are spawning from (probably right now you are spawning them from the origin.

    and check the bullet speed properties to see how fast they are moving

    you are also probably spawning them every tick instead of every X seconds

  • I'm not sure i fully understand your question, but to make things easier on yourself, you should separate out your animations.

    eg: animation1

    animation2

    Then you can use them whenever you want, without having to worry about what frame you are on.

    Maybe you can try rephrasing the question again?

  • One thing i see off the top is your last action ...

    Platform on landed (platform is not moving)

    In one tick you are asking it to start the "Land" animation" then immediately play the "Idle" animation

    that's not going to play them back to back as you would hope they would.

    You could add a sub event and put "on animation finished" action instead, then it will play one then the other.

    Right now they are stepping on each other and you probably won't ever see it play the "land" animation

    its also getting overwritten again when you use the "on any animation finished" -> player set "runloop" action earlier.

    One way to setup an animation system like this is to create a 2 global variables such as "CurrentAnimationState" and "PreviousAnimationState"

    Then create a series of scenarios that change the animation based on whatever your current and previous state of the player's animation was in.

    eg: when the player is running (on key right), you set "CurrentAnimationState" to "Running" and "PreviousAnimationState" to "Idle"

    Then create a "check" that says If CurrentAnimationState ="Running AND "PreviousAnimationState = "Idle" -> Play animation "StartRunningFromStop"

    Next you would create another check (on key right released) that says "If CurrentAnimationState" = "Running" AND "no key is being pressed" -> Player "RunningtoStop" animation

    Then create several of these "checks" for every possible combination of types of animations you want to have in your game.

    Each variation will be separate actions which makes debugging and tweaking much easier (although you end up with a lot more events) But the tradeoff is much easier to visualize and wrap your head around in more complex games.

    Basically right now you just have several platform movements all firing off at the same time stepping on each other.

    If you post the .capx file in dropbox or a similar service and post it for us we can tweak the file and show you how to fix it.

  • Lets say your sprite marking the end of the platform is called "end"

    Player on collision with sprite(end) -> set mirrored

  • Did you set the project properties to scale in C2, not just in the cocoonjs export?

justifun's avatar

justifun

Early Adopter

Member since 9 Oct, 2012

Twitter
justifun has 3 followers

Trophy Case

  • 12-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
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

19/44
How to earn trophies