Search the Community
Showing results for tags 'top down'.
Found 5 results
phaser + box2d top down racing physic problemHi I'm working on a top down racing game. Yesterday I decided to buy the box2d plugin for phaser to get collision physics. There is a simple top down racing game included as a tutorial which I tried out and the collision part was good enough for my needs. But the actual driving physics were not because it was more like a spaceship. If you would stop pressing forward the car would continue in current direction until slowed down. But when I turn during this sliding a car should go where the wheels point and not in its current direction like a spaceship. So I decided to add my own driving physics to the demo which makes the car go in the direction of the wheels and instead of activating car.body.thrust(power) on key UP I call my function that ultimately sets car.body.x and car.body.y so it moves correct. The problem is that now I'm not colliding with the walls anymore because the box2d simulation is just getting the coordinates and doesn't move the car any more. I would like to use box2d as much as possible but I couldn't figure out how to make the car not slide like a spaceship and if possible I want to avoid having to create my own collision detection. Any tips on how to approach this?
Filling A Polygon With A TextureI'm new here, though not new to game programming I'll try being short and to the point. My university's final year project is a Car Racing (2D top-down) game that takes any (ANY) route of the player's choice from Google maps and turns it into a race track. Then the player challenges their friends and race in real-time multiplayer. And the game is made in Phaser. I can take the array of points returned by the maps API and convert those into Cartesian coordinates and draw the whole track, with the boundaries of the road and everything. The problem I'm facing now is that I have a rectangular road texture, and I want to fill that shape generated from the points of the route with that road texture. Now, I asked this question to someone before and they suggested that I make the rectangular texture into a trapezoid and manipulate the individual sections, the more the sections the smoother the fill will be. Makes sense in theory. However, I can't find anything related to this in Pixi. Using another topic, I did learn how to skew images in HTML5 Canvas, but I can't figure out how to go about doing this in Pixi. Any help would be appreciated Thanks for reading! PS: Here's what my application can do, at the moment (apologies, I couldn't upload the picture here directly for some reason):
Can anyone share top down car code?
rungo73 posted a topic in Coding and Game DesignI'm building an old school top down racer but I can't get my car to drift when cornering. Can anyone share any code / tips / maths on how I could get a bit more 'fun' out of my car?