Braxen

Members
  • Content count

    6
  • Joined

  • Last visited

  1. Bitmap collision maps?

    I did actually manage to make it automatically turn by testing the front left and right point of the car and turning the other way. It's not optimal yet though, as you can't really turn at all when driving because it overrides everything else. The difficult part of making it proper is how to calculate the reflection normal, because there are no walls to speak of, only pixels.
  2. Bitmap collision maps?

    My previous approach did the sin/cos thing with the speed and angle to move forward, this current one uses phaser's built in functions for moving with the arcade physics. I can change anything, as long as it works.
  3. Bitmap collision maps?

    Making it collide, preferably in a native way. The only thing I've managed to do is make the player stop at the hit point and set the velocity to 0, which is not what i want. I'm open to using completely other methods of collisions, but i can't really find any other ones which can handle roads like this. This is how the collisions should look, i'm only holding forward.
  4. Bitmap collision maps?

    Feels like I've tried everything now, i have the bitmap set up and i can get the pixel data where the player is, but i can't find any custom collision hooks in the arcade physics engine, and setting the old position after checking manually for values just makes the player stop on a dime. Also, cool registration time
  5. cant get tilePosition of undefined

    you're not defining the variable 'background' anywhere
  6. Bitmap collision maps?

    I'm trying to port an old top down driving game that uses bitmaps (as big as the overworld screens) for collision checking, with altitude and road types. I've already rewritten the whole thing twice but I'm not satisfied with my solutions, and I'm considering doing it again but with Phaser this time. Any pointers on how or if it's possible with the (arcade) physics engine? I like the feel of it. The crucial thing is that if you try to drive off the road, the car should slide and turn automatically to get back on track - going on the grass is supposed to be impossible. I've already written a custom python script to extract all the game assets and package them in atlases and sound sprites for instant use in Phaser (multipack support is needed!!), so i don't really want to abandon this again.