the monkeys :confused:Quote:
Originally posted by funkydonkey2000
HILLSSS.. I can smell them, I know they are coming soon.
Printable View
the monkeys :confused:Quote:
Originally posted by funkydonkey2000
HILLSSS.. I can smell them, I know they are coming soon.
Yeah, i could be work with a tilemap, where the heights are set.Quote:
with 5 points along the top for the 'lineTo's and then again for 2 pixels below to close the mask.
in the version i just put up, the points y position simply follow a sine wave as you turn.
Im sure theres a way though to make the points match a predefined landscape and move and adjust with it.
but ya, theres gonna be a big performance hit :)
If i had time i might explore it more, but unfortunatly I dont
I developed a lineOfSight Algorithm, which can be modified for that.
But I did not have the time at all. After finishing our game, I will see, how it could be done.
Who is first ? :o)
well.... im not planning on working on the mario kart engine anymore, at least for the forseeable future.Quote:
Who is first ?
Time constraints and other engine ideas are the main reason :)
so u'll be first :)
just kidding :o)Quote:
well.... im not planning on working on the mario kart engine anymore, at least for the forseeable future.
Time constraints and other engine ideas are the main reason :)
but a landscape engine will have more options for a complexer gameplay.
very interesting stuff.
hi ,
I probably post an engine with hills toonigth ... but it seems that it doesn't allowed y rotations because we must draw a straigth scanline. i think that the method is to get y coords for n points on the z axis (z = 10, 20, 30 ... for example). with z and y coords it will be possible to determine the y coord on the screen ( yscreen = coef * y/z) of each scanline.
i.. by scanlines do you mean the masks?
in which case they dont have to be straight, if you make them not straight thats how the landscape is made.
or... have i mis understood :)
right under my nose...
you have truely inspired me :eek:
this almost brings a tear to my eye!!!
FANTASTIC!!!
peace out!
Stevz
my first attempt ... i have some strange buggs, but it gives an idea of the systeme.
http://www.toy-toy.net/tmp/z_mapping_hills.swfCode:function getHeight(z) {
var res =2*Math.pow(Math.cos(0.03*(5*z+zPos)),2)-z/10
//the formula gives an y coord for a z one
return res;
}
function setScanlines() {
var x = xPos;
// define xPos as a local variable for faster access
var z = zPos;
// define zPos as a local variable for faster access
var s = sM;
// define sM as a local variable for faster access
var yc = ycam;
var ysc = yScreen;
var sscl = stripScale;
var yprec = yscl0;
var scl, m;
var cz = dz;
for (var n = 1; n<=nOfS; n++) {
scl = s[n];
// a clip containing both mask (.m) and bitmap (.s)
scl._y = (yc+getHeight(n*cz))*sscl[n]+ysc;
scl.m._height = yprec-scl._y+1;
yprec = scl._y;
m = scl.s.m;
m._y = z;
m._x = x;
}
}
Xavier77, that's pretty neat! I don't see how you could create hills that aren't infinitely wide using that technique... Would be great if you solved that problem though. And it will probably be difficult to make it look good when you turn.
I've played around a bit with the engine too. I've created a map that consists of 3200x800 pixels. I use seven 800x800 images. The reason I don't use four 800x800 images is because I need them to overlap. The file size increases quite a bit, but it's nice to be able to use larger maps. And there's a small pause when the images switches, but I think I can remove that...
http://www.strille.net/works/misc/z_...z_mapping.html
nice one strille, I like the jump, just thinking on what this can turn into, damn NEED TO LEARN FASTER
i think that will be possible to build a very big and detailed map by assembling X*X modules. a module could be : right turn, left turn, straight line. So, it could be a solution to reduce the swf weight ?
Funny. I was just about to make a post like this.
I cbf'ed doing it, but assemble the map like mario kart, a tilemap. If you look at mario kart, the borders are all tiles, so you can do the same, then the collision detection would also be faster (tilebased) and filesize would be a fraction of the size.
i think the problem with tilebased which mean u'd have lots of mcs inside each mc thats masked, and I think (havent tested) that that would cause alot of slowdown.
Great work strille!
Aahh. I forgot to post this little demo, we made a few weeks ago.
Did you expect fog or nightdriving ? :o)
3dmapping fog - night
Nice, but another performance stuff.
great stuff andre!
RESPEKT
falls ihr nen coolen ed für das ganze braucht,sag bescheid ;)
Yes, tile map is the next logical step. Unfortunately, as Percy pointed out, it will result in a performance hit because when I tested to combine several images the FPS dropped 25%...
I don't see how you could do a tile based collision detection? You don't want to test against the squares but rather the curvy road in the squares. Right now the collision detection is one hitTest against a very simple shape once per frame.
AndreMichelle, very nice! F1 nightdriving? That would be something :)
I like the fact you used oval tree sprites which hide the fact that they are single frame sprites quite well.
very nice andre! cant wait till see your final game :)
Strille, out of interest, why is it you've overlapped your images instead of joing them on to one another with perhaps only a 1 pixel overlap to stop gaps?
Was meinst Du mit 'ED' ?Quote:
falls ihr nen coolen ed für das ganze braucht,sag bescheid ;
:o)
Because that way I can use only one image at any given time. The overlapping can be seen as the minimal line of sight. Right now, they overlap 50%, which means the line of sight is never less than 50% of the 800x800 pixels. And you can still see the road slowly disappearing in the horizon and then reappear again when switching to a new image.
very clever! :)
ich hab nen feinen editor mit tilebased und artbased modus zum platzieren von grafiken,wäre vielleicht ganz praktisch zum erstellen neuer strecken/maps :)Quote:
Originally posted by AndreMichelle
Was meinst Du mit 'ED' ?
:o)
ne erweiterung zum editieren von höhenunterschieden (um hügel usw. per maske rauszubilden) wäre auch ne idee,hängt aber davon ab,wie flüssig das ganze dann noch läuft.
bout the tilemapped idea,yep,it would help a lot with filesize but it would also slow down the engine a lot,something like strille´s method of just using a few big 'tiles' may be the best choice.
very great mapping.
but camera is still fixed now , may be it's the mariokart style?
D:)S
Hey,
Just want to put my word in.
Someone should make an amazing Grand Theft Auto Vice City game with this engine, that would be really cool, you could probably add hittests and everything to this engine.
Great thread ppl
Matt
hi i think that a split screen mode could be interesting ... it's just a test but i think to add opponent on the map and maybe collisions ?
http://dehix.free.fr/flashlab/splitscr.swf
http://dehix.free.fr/flashlab/splitscr.zip
Yes, that could work wonderfully well. But I really think you should split the screen horizontally, because you really want the images to be wider.
hi,
it's possible to configurate the split mode easly with the screen object inside player object (=> position, height, width)... if anyone want to add opponent clip, i try to add weapons :)
Just want to say that this thread has broken 10000 views, and it's the third most viewed thread ever on the Games forum!
Congratulations PercyPea!
Hi,
I thought i try and make one of those 3d mariokart things so i grabbed one source file from this thread, and started to experiment with it.
I am wondering how to add objects to the movie, like trees or cars, buildings ect..
has anybody got any code for that?
Thanks in advanced.
This is a version a few weeks ago, I posted on flashforum (ger).
It's a bit rough, but you can find a possible solution.
How do you know that?Quote:
Just want to say that this thread has broken 10000 views, and it's the third most viewed thread ever on the Games forum!
I wreckon a FPS with AI is in order :P
And ultimately multiplayer.
How would you go about placing sprites on the field? I looked at some source code that had that ability, and I choked on it after reading a few lines.
Oh, and here's a nice camera and path engine using the 3d environment.
This is definitely one of the best things I have ever seen in 3 years of working with Flash.
Ive just started to learn Director, and have been messing about with a 3D engine for 2D sprites that Ive been making. I would really love to try and create something like in this Director; even if it has been done before, as I want to learn through experience.
I dont get how the ground is being transformed, I know your using some method of scaling masked strips of the ground but I cant figure out the math behind it, or how you did it. Im thinking that it would be possible to distort the quads of the bitmap(s), to form the ground but again Im not sure on the theory behind it.
Ive search on google for ages for "Mode 7 tutorials", but I cant find any tutorials out there at all. Can one of you guys post some links on Mode 7 theory; or even better yet give me a brief explanation on how to transform the ground..? :)
In the spirit of open source, I will be happy to post any work I do, if and when I do it.
Once again congratulations on this engine; each time It seems Flash has reached its limits along comes someone like you guys and pushes the envelope further! :D
Covenent:Check out the link below...
Spline-Based Racing Demo
BurnedFX, that looks infinitely better... but what's the fun in using hardware acceleration? :) Great example of what you can do in Director!
wow.. flash should use the hardware of a computer (graphics) ..
maybe this should be a AS option..
render on Direct X or on Aqua on Mac OS X
Flash 7 go for it...
Thanks for the link BurnedFX.
I want to create a game like Mario Kart on the SNES, which is a pseudo 3D mode 7 game. I know using Directors 3D engine is most probably the most sensible way to make a mode 7 game (as demonstrated in your link); but I want to try and create that pseudo 3D retro look of old racing games like Mario Kart, and Street Racer.
I have the majority of the code of the pseudo 3D engine written already, Im going to write a camera class tonight; after that all I really need to know is how to create the ground like Percy and Strille have done here.
Ah well, back to searching through googles 1 billion indexed pages... :)
(thanks once again, by the way)
Covenent: I misunderstod you then on how you wanted to accomplish your game in Director. The link below I think is more 'retro' and fitting to what you were looking for. It's more of a demo rather then an actual tutorial though. =|
Mode 7 In Director
max0matic: If the flash player used hardware acceleration it would bulk up the size of the plug-in and then you might as well just use director =P
Hehehe you've given the one link that I knew of already! :D
I found it through Klas Kroon's site (Outside of Society).
Thats pretty much what I want to acheive, although with a lower camera angle. That site has some great examples but it doesnt really explain much, it just gives a quick run through on tile maps which is fairly obvious anyway :(
I saw this image earlier on the thread, and I tried coming with a solution from it but I didnt get anywhere.
After each strip is rotated is it just being scaled vertically based on wheter it represents the foreground or the background; or is there some skewing/quading being done to it as well?
Thanks once again! :)
This thread should be a sticky, or at least an addition to the F.a.Q. that MBenney and Squize are building
:)