smitchell's Forum Posts

  • I think i found a bug in the platform behavior.

    I filed it as a bug, But i'll make a thread here to see if someone knows a work around.

    Basically im using the platform behavior.

    I have set custom controls up with it.

    I also have a variable for each parameter of the behavior <-- Because im cool [8)]

    I have one im using that's pretty important. Im using a max and min speed variable (originally just one var, But because of this issue i now have 2)

    If the spacebar is down then im setting players speed to MaxPlayerSpeed(600)

    If its not down, then im setting players platform speed to PlayerMinSpeed(300)

    Im basically making the player sprint.

    But the problem is if he is sprinting and i press up to jump whilst running right it works fine, But im sprinting and i press jump and he's running left it doesn't jump..

    Any ideas/solutions as to why?

    Thanks.

  • Hi guys, Im making my game for the rotary competition and i ran into a problem, I need to have a running and sprinting state, simple right? Well no.

    I have a variable called PlayerMaxSpeed, Set to 300 normally. When the keyboard button is triggered to sprint is down then im setting it to 600 then invert the same event and set it back to 300. So if keyboard key is down set it to 600, if its not then set it to 300.

    But when im sprinting with the right arrow key down, and then i press my jump button it works, The player will jump perfectly.

    But if im sprinting with the left arrow key down, and then i press my jump button the player does not jump!!

    I tried soooooo many different ways to get this working but nothing. I tried a boolean for is sprinting, set platform vector y, space is down, left is down, and up is pressed. And many other ways that i cannot even remember but nothings working...

    And i really need this to work? Any one got a work around?

    ps i do not want to share my capx as its my comp entry and its pretty full..

    Ashley any ideas?

  • HTML5 is supposed to be taking over AS3 and flash. Thats why i moved to C2 i was a flash developer <img src="smileys/smiley4.gif" border="0" align="middle" /> And as much as i love flash, its old technology it can't live for ever.

  • you can allways use the wait action if you need it to wait a little longer before disabling..

    And yeah sure i'll be happy to test it <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As you know there is a distance expression, its asking for 4 values: x1, y1, x2, y2.

    Every sprite has a x and a y position, The distance expression helps determine the distance between two sprites.

    So for example if you want to see if the player is near the wall using distance you can do something like this:

    add a system.compare 2 values event.

    Then on the top value do something like this but with the objects you want to compare:

    distance(Player.x, Player.y, Enemy.x, Enemy.y)

    then add a if less or = to 100, that will see if the player is within a distance if 100 to the player, Then add your other events/actions to do what you need to do <img src="smileys/smiley1.gif" border="0" align="middle" />

    Let me know if you need anymore help <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Here ya go: dl.dropbox.com/u/51270524/jumpThroughFixed.capx

    Its not 100% perfect but it will do, It takes a couple milliseconds to kick in but it works no need to press the jump button again.

    Honestly its probably better it takes a few milliseconds, It gives the player some time to jump if its falling..

  • I accept the challenge!!!! <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Ok, Publically post your capx or send it to me in a private message and i'll fix it for you.

  • in preview or exported and tested on the phone?

    Also keep your dpi at 72 its otherwise not matter what level of zoom it WILL be pixelated and pad.

    Its easier just to use the bullet behavior. Just stick to that :) im sure the bullet behavior uses the evrytick event anyways.

  • DPI means Dots Per Inch. The default in photoshop is 72. Its what determines whats HD or not really. If the DPI is higher the graphics are crisper. If the DPI is quite high then if you zoom in to the image/graphic then you wont really see pixels unless you zoom in to far.

    But to have a HD game you have to pay the price in load up time and VRAM

  • You could do a little trick(Not sure if this will work)

    But clone the sprite you wish to fall through on, remove all behaviours from it, And then when you need to fall through the platform set the x and y to another location, and spawn the sprite, Then once fallen through the sprite place the platform back where it was and destroy the sprite..

    You'll have to play around with instance variables to do this.

    Let me know if you need some help, Send me a capx and i'll help you, <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Do a test capx, Have a layout moving a sprite every tick.

    Then have another using the bullet behavior.

    Add a text box on each layout and have this event to get the FPS:

    System.everyTick

         ->Text.setText("FPS :" & FPS)

    and as for the DPI, its dependent on the game its self. You need to play around with values.

    what DPI are you currently using for your graphics?

    The iphone 4 and 4s aswell as ipad two use a DPI of 326 for there retina display. <- Moving a sprite every tick with a DPI of this should be pretty intense!!

  • Ashley, if you wanne see the source for there directCanvas take a look here: github.com/appMobi/ios

  • Maybe it could be used somehow after export. Not sure but apmobi also uses phonegap for ios exporting so whats the point?

  • honestly C2 could just steal aspects of it. The Appmobi engine thing is open sourced.

    If Ashley could improve on there source code then he could potentially claim it as his own {;)]. Or he could take a look at it and learn from it and then one day hopefully implement it into C2 <img src="smileys/smiley2.gif" border="0" align="middle" /><img src="smileys/smiley2.gif" border="0" align="middle" /><img src="smileys/smiley2.gif" border="0" align="middle" /> Or just steal it <img src="smileys/smiley4.gif" border="0" align="middle" />