btw, i see that you got lazy and didn't want to draw the car at another angle, instead you just mirrored the image cause the guy inside the car jumps from the drivers side to the passengers side whenever you turn left/right
>hows about a quick synopsis on how you went about it... =)
Maybe but i wanna be mean for now and keep the method a secret. But no doubt i'll probably end up getting bored of working on the engine so i'll make it open source.
However, thats not gonna happen soon, (my getting bored) because I've just discovered a technique that might mean I can create a landscape with hills and stuff, instead of a flat plain
obviously it doesnt work right now, but hopefully this gives you an impression of what I mean.
That's some great stuff. And you've got the collision detection with the grass working an everything. The landscaping is great too. This is going to redefine Flash gaming.
mbenney, it's the same type of engine we were talking about way back when, except, he did it, and we didn't. Percy, I thought for a long time trying to figure out a good way to go about it. Gives us hints!
Ok, so starting with the first strip (the bottom one, it is given a slice of road, then the next one up is given a slice of road, but it is scaled down, and so on, so it gives the illusion of perspective. A great example of this is Mario Kart of course, but another great is Top Gear 1/2/3000 for the SNES, I suggest you check those out if you want to see what I mean (it has hills and stuff). You could indeed make a mario cart engine out of this, but I'd like to see what it would look like if you made the bands 1 px each, the quality must look amazing then, but at the loss of a high fps.
Yes, as Lukstr pointed out the moving road and grass is made up of strips of the original image. I think I know how it is done (or at least can be done):
From the bottom of the screen to the middle of the screen there are movie clips placed with decreasing height, say 10 at the bottom and 1 in the middle of the page and everything in between. Every "strip movie clip" is masked using a mask with the same height as the strip movie clip itself (1-10). Inside the strip mc the image is placed and scaled, smaller scale for strips with smaller height, to give the appearence of perspective as Lukstr pointed out. The car has an angle (the direction of movement). The car has a position on the huge image. The images in the strip mc:s are rotated by the car angle around the car position coord on the image. The images in every strip mc are moved to this position, with an offset in y-pos in the strip mc depending on the strip mc's position between the horizon and the bottom of the screen.
The collision detection is probably a comparison to a 2d array (it doesn't have to be that detailed because the road is pretty large, and you don't need that precision...)
PercyPea, have I misunderstood completely? Again great idea and execution of the idea!
Ok, so starting with the first strip (the bottom one, it is given a slice of road, then the next one up is given a slice of road, but it is scaled down, and so on, so it gives the illusion of perspective. A great example of this is Mario Kart of course, but another great is Top Gear 1/2/3000 for the SNES, I suggest you check those out if you want to see what I mean (it has hills and stuff). You could indeed make a mario cart engine out of this, but I'd like to see what it would look like if you made the bands 1 px each, the quality must look amazing then, but at the loss of a high fps.
quote:
--------------------------------------------------------------------------------
The car has a position on the huge image
--------------------------------------------------------------------------------
that's probably my best guess.
Yes, that sounded a bit stupid...
I've attached an image I drew just to get an idea of the procedure that PercyPea probably used, might help somebody else too.
Haha i was playing mario cart advance yesterday all day trying to make an engine worthy what a coincodence haha. Very nice engine. Add some paralax scrolling in the backgroud of some building or something give more effect. It roxors by the way.
Last edited by hooligan2001; 06-23-2003 at 10:48 PM.