TheBogueRat's Forum Posts

  • agreed, z-order would be better than what I proposed.

  • Paradox

    Yeah would be good strategy. Thanks.

  • When it is the computer's turn, check to see if the player has two in a row and block it, otherwise start checking for open spaces in order of best position and fill the first available slot.

    no capx so it's hard to give specific example since I'm not going to write one from scratch but I'd check boxes from center, diagonals, then sides for open moves. Not sure what a good strategy for tic-tac-toe would be.

    You might be able to find a strategy in this javascript AI example

    http://www.javascriptkit.com/script/script2/tactoe.shtml

  • Add a layer above Main and move your object between layers as appropriate?

    You'll need an event to keep track of when your guy is in front or back of the enemy. Construct is a 2d platform and you're trying to do 3d or at least 2.5 so you'll have to get creative.

    + Every tick

    - if player.y < enemy.y then enemy is in front of player (switch enemy to new layer)

    - else if player.y > enemy.y then enemy is in back of player (switch enemy to overlay layer)

  • Looks like you said you are using the bullet behavior, haven't tried that for an enemy myself.

    Have you tried.

    if enemy bullet speed is already 100, when hit by sword set bullet speed to enemy.bullet.speed * -2 (opposite direction, double speed) Then you don't have to worry about direction since I assume the sword will always be in front of the player. Then set a high deceleration so you don't even have to set the speed to 0. Unless you want him to get back up, then you'd just set speed to 0 after a wait, animate geting up, then set speed normal.

    Hope this wasn't too confusing. Here's a quick example

  • Assuming the enemy has platform behavior and are reacting to a collision, Couldn't you set animation to "blownback" and set Vector X to 600 (or appropriate amount): positive vector if player.x < enemy.x or negative vector if player.x > enemy.x?

    A capx example would help a lot in finding an answer for your circumstance.

    TheBogueRat

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For some reason the Pause action is not respected so soon after calling the Play action in your capx. I would just call Play every time it is needed and seek to the point at which you want to be in the sound which is what you are already doing. You are then calling the Pause action but the Stop action may give you a performance difference (likely not). You are going to seek the next time you play the sound rather than resume anyway so it doesn't matter from a logic standpoint.

  • tnindie

    I just ran your test.capx through the CocoonJS Launcher app. I noticed that if I wait about 8 seconds before I run through the jumps the framerate shoots up to 55-60 and holds until I hit the wall, just an observation.

    When using cocoon exporter I believe you need to add the CocoonJS object to your project, that may be why you were getting the black screen.

    I haven't played with physics too much because the performance wasn't where I would like. That's likely the cause of your framerate issues. I'm sorry that I can't offer any good assistance with that.

  • I've created APK's using cocoon and crosswalk.

    The cocoon apk runs just like using their CocoonJS Launcher app, great speed but audio is borked and particles are not using the images just a blue emitter.

    The crosswalk apk runs very choppy but has good particles. The audio issues are about the same, music changes volume as it loops and sounds may or may not play when they should. In the XDK App Preview app performance was even worse and I couldn't use it at all.

    I only use effects for transitions, and particles for some collisions in my platformer. For playability, cocoonJS is working far better for me as of today. I'm running it on an HTC Evo 3d.

  • After upgrading to 158.2 from previous stable version, most jump-thru's stopped working correctly in my platformer. I replaced just one of them with another copy that still worked (by holding cntl and dragging the new jump-thru sprite into place) and all on that layout started working correctly again. I had to repeat this for every level.

    Tested this also on the included capx for this post and by making a copy of the invisible sprite, it worked as expected.

  • You might have more luck by posting a link to the .CAPX. I can't figure out what you are trying to do. Or more specifically, why you have an enemy chasing a random bullet.

  • You bet! Glad to help.

  • Here's how I would handle it with variables.

    <img src="http://boguerat.com/capx.png" border="0" />

  • Thanks! Keep up the great work. This IDE is incredible!

  • Link to .capx file (required!):

    Space Blaster game

    Built in demo .capx

    Steps to reproduce:

    1. Click on Game events TAB.

    2. Scroll down to last line.

    3. In the Construct events tab, search for "Player".

    Observed result:

    Event screen goes blank.

    Expected result:

    When results are less than a full screen, the search results are displayed, when the results are longer than a full screen, it should automatically scroll up so something is visible. Preferably it would scroll to the top. It took me a few versions before I realized the search function wasn't broken, it just didn't work the way I expected.

    Browsers affected:

    Not Applicable

    Operating system & service pack:

    Windows 7 SP1 64-bit

    Construct 2 version:

    Observed in Beta 142 through 144