• Content count

  • Joined

  • Last visited

  1. More attributes in texture atlases?

    yeah, but then we're getting into the workflow, i'd rather not have a pile of functions for each loading call, i didn't find the callbacks that customisable. packs are doing a pretty good job so far though
  2. More attributes in texture atlases?

    Oh I've looked. This is the function that discards it. I ended up hijacking it on game boot, it works - but a very duct-tape-esque solution. And i've hijacked the loadTexture and set frameName functions too, so it automatically sets the pivot point on load.
  3. I've made my own class that can "combine" multipack atlases and select images between them (frame names are very important), but the biggest hurdle still is that i need pivot/anchor points. I have them all in the texture atlas (JSON), created by my own tool. However, when i load this atlas, only hardcoded data is put into the frameData object, and i can't seem to hijack the JSON file being loaded either. I've thought about creating my own loader class, but with this framework workflow i just get confused. Is this something that's planned for future releases, or are pivot points obsolete now?
  4. how to use multipack atlas?

    Same issue here, using unique frame names for objects, but no animations needed. My project has been laid on ice because i can't find a good solution for it.
  5. 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.
  6. 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.
  7. 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.
  8. 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
  9. cant get tilePosition of undefined

    you're not defining the variable 'background' anywhere
  10. 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.