justifun's Forum Posts

  • The enemies might be overlapping because their collision boxes are not boxes.

    Open the collision box for the sprite and see what it looks like, its probably using the default "auto guess" shape. Try making it a box. Right click one of the points and chooose "Set to bounding box"

  • Check out this youtube channel full of construct tutorials

    youtube.com/user/ConstructDude

  • I've been trying to wrap my head around how to simulate jumping in a 2.5D isometric environment for a while now. So I put together this little prototype with the hopes that the community will be able to build upon this concept and help everyone else learn as well.

    I'm hoping there's an easier way to achieve what i'm trying to do here, and I think as a group we can figure it out.

    Demo

    CAPX

    The idea is basically that when you jump in a 2.5D isometric environment, all you are technically doing is offsetting the players Y position higher than normal from their ground position to appear visually in the air. This works fine if there's no higher platform for them to hop onto. But as you can see its a bit more complicated once that fake 3rd dimension is introduced.

    Arrow Keys to Move + Space to Jump (there are no walk/jump animations)

    How it works:

    The Player Sprite has a Platform Behavior that is pinned to a shadow object which is controlled by 8-Direction movement.

    When the jump key is pressed the player sprite is unpinned from the shadow and jumps into the air.

    The collision on the shadow is turned off while the player is in the air so that the shadow can travel through the crate object. (when its on the ground its used to collide with the crate to make the prop impassable.

    The crate object consists of a front panel, a top panel and a side panel. The front panel sets the height of the box's highest point to set the fake "height" of the crate object.

    The top panel is used to determine when the player has collided with the top of the crate and to create a copy of the shadow sprite to follow the player around simulating the appearance that they are walking on top.

    The full crate sprite is used to determine how the player collides with it while walking around on the ground, as well as used in the Zsorting for when the player walks behind it.

    Once the player has walked off the top panel of the crate, they fall to the ground and re pin to the original shadow once again

    Zsorting is achieved by comparing the X/Y position of the player to 3 different image points on the full crate object and setting its order depending on which condition is true.

    Things that need improvement:

    -Currently you can't jump a second time off the top of the crate.

    -There's a few z sorting issues that cause the player to become invisible

    -When walking off the top of the crate towards the back, the player stats visible until the hit the ground, (should move to back visually sooner)

    -The whole idea is really messy and not easily packaged to be resuable in game in multiple locations.

    Any feedback/ideas/tweaks etc welcome.

    Thanks for the help!

  • Yeah, up on collision with another object matching a "goal" object

    test to see if the type of object is the same as the appropriate goal.

    eg: if the game piece is "red" and the goal is "red" then set a "check" variable to 1 lets say. Then if they get a second one correct in a row. then set the variable 2 , and whenever that variable equals 2, add a point to their score, and reset the variable to 0

    also set it to 0 anytime they screw up and match them incorrectly.

  • You do not have permission to view this post

  • Without having to use 30 different frames of an animation you could create 1 with all 30 heath slots then simply move the sprite backwards 10 pixels each time they loose a live. Hiding the front half behind another icon, or mask it off visually.

    Or make one health tick. Then add as many as needed each time you pick up health or loose heath

    eg:

    On health added.

    • > loop for current health -> create health tick sprite at previous health tick + 10

    So if the player currently had 20 health points, it would loop 20 times adding another tick visually each time.

  • You can probably make what you are trying to, but i'm not 100% i've seen the type of "simulation" you are trying to make. The front end stuff of course could be done with C2, but im not 100% sure of some of the backend stuff. Either way you could still connect to if you needed to through various different ways using C2 created front ends.

  • I highly recommend playmaker for Unity, One of the best investments ever. It allows you to hookup complex code without ever having to type anything. You take building blocks similar to construct behaviors and combine them together to make complex logic. Its quite amazing how quickly you can make something.

  • I'll take a look at the .capx when i get home, but i had a similar problem.

    How are you making the character stop moving?

    Try using the "set platform behavior disabled" instead of "stop" and see if that fixes the problem.

  • I imagine you are subtracting the health in an event that is occurring "every tick" instead of just once.

    Try adding a "trigger once while true" as a condition to the event that subtracts the health.

    Sorry i can't look at the capx right this moment.

  • 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!

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads