CrudeMik's Recent Forum Activity

  • Yeah I'm holding out putting sound effects in my game until this comes, as I'm not sure if it'll be easy to adapt all the sound actions to positional stuff later or not. I'm only using Awesomium though.

    Unless it's a huge amount of work this is still worth doing even if it was tagged as 'BETA' like the controller and WEB GL plugins were and only ran in Chrome / supported platforms..

  • This is awesome, I'd like to be able to set scale dynamically instead of just in camera creation.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Audio engines in most browsers and platforms are simply not sophisticated enough to even provide a pan option. It's only supported where the Web Audio API is supported, which is currently only Chrome on desktop and iOS 6. It's apparently coming eventually to Firefox, but it doesn't look like it will be supported on IE (including Windows 8), directCanvas or CocoonJS for a while. We've been holding off adding more advanced audio features since the support is so patchy. People tend to assume everything works everywhere then become disappointed or think it's broken if it doesn't work on a certain platform.

    Is it not worth it even for just Chrome? Especially considering Awesonium. I understand anyway, keep forgetting the support is so far behind. Firefox better get a move on.

  • I think positional audio is a priority feature that should be implemented into the engine. Having pan & volume controls are a must. There's no possible way I can see that I can finish a project I've been working on for the last 6 months without it.

  • I forget the exact formula I used, but I did something like:

    volume = -(distance(object.x,object.y,player.x,player.y) * somefactor)

    If somefactor is higher, the sound will fade out 'faster'.

    Can you remember the exact formula I'm having a lot of trouble trying to re-create this. THanks

  • Power of 2 sizes can almost be forgotten... they are only relevant with tiled images (so not Sprite images), and in the near future mobile devices will also support non-power-of-two textures, meaning power-of-two is finally irrelevant and makes no difference at all.

    In the mean time, there's not really any performance difference, it just affects whether tiled images can tile with best quality, which currently can only be done with power-of-two images.

    Awesome that's good to know :)

  • If i import a sprite which is power of 2 am I then free to re-size the sprite in the editor?

    So I import a sprite 64x64 - then I use the transform tools to stretch it to 200 x 31 - will this impact performance.

    If it does impact performance how about a power of 2 resize function, hold a button and drag the transform and then the sprite resizes to nearest power of 2.

  • You might find this useful..

    This is sort of what I use for any left/right movement and it works great.. just needs a single number instance variable.

    +for each player           

              -> set player.moving to 0

         +Left arrow down          

              -> subtract 1 from player.moving

         +Right arrow down          

              -> add 1 to player.moving

         +player.moving not equal to 0     

              -> player apply force of player.speed*player.moving

    so if neither (or both!) of the keys are pressed the player doesn't move

    Player.moving becomes -1 when the left key is pressed. This ends up negating the player.speed.. causing it to go left instead of right.

    *edit: and i like this method also because the -1,0,1 variable can be useful elsewhere..

    for example, if you wanted to tilt the character sprite towards it's direction.. it's just one event:

    -> set angle to 15*player.moving

    btw, Nimtrix, you could also just place the 'every tick set false' event at the very top

    one last thing: you don't need "player: is keys" there for every single event, just make it the top level event, with everything else a sub-event of it.

    Oh, I've never used sub-events before - sounds like I should be!

    Right well, I'm about to try these suggestions out I'll let you know how I get on.

    Thanks!

  • Well, if both keys are down, the conditions of the first two event will be met, so both of them will run setting "Left" and "Right" to who knows what.

    You could try this instead, but I don't know if it's really necessary since the "Key is down" conditions are pretty much "Left"/"Right" booleans themselves, you should be able to do it without using extra booleans:

    +Right arrow is down 
    +Left arrow is not down
     -> Set Right to true
     -> Set Left to false
    
    +Left arrow is down
    +Right arrow is not down
     -> Set Left to true
     -> Set Right to false

    I tried this earlier and am still getting the problem, I am using the extra bool states for movement because I also have controller support. hurn.

  • Not sure if it'll fix it but you might want to add "Is NOT pressing left" to the first event and "Is NOT pressing right" in the second.

    Thanks, just tried it but no luck :(

  • I have custom physics movement controls set up like this:

    <img src="http://dl.dropbox.com/u/3317708/physicsplatform/Untitled.jpg" border="0" />

    If you play the game here:

    dl.dropbox.com/u/3317708/physicsplatform/index.html

    Note that pressing left arrow, keeping it held down and then pressing right arrow, then releasing the left arrow - causes the character to stop moving.

    Any suggestions on how to fix this bug?

  • :( what a pity ! i don't have xbox controller to test your game .

    Updated for keyboard now :)

CrudeMik's avatar

CrudeMik

Early Adopter

Member since 29 Jan, 2010

None one is following CrudeMik yet!

Connect with CrudeMik

Trophy Case

  • 14-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

19/44
How to earn trophies