-
07-09-2003, 01:45 AM
#161
Illuminatus!
Originally posted by funkydonkey2000
HILLSSS.. I can smell them, I know they are coming soon.
the monkeys
-
07-09-2003, 05:56 AM
#162
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
Yeah, i could be work with a tilemap, where the heights are set.
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)
-
07-09-2003, 06:23 AM
#163
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
so u'll be first
-
07-09-2003, 06:32 AM
#164
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 :)
just kidding :o)
but a landscape engine will have more options for a complexer gameplay.
very interesting stuff.
-
07-09-2003, 07:27 AM
#165
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.
-
07-09-2003, 07:41 AM
#166
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
-
07-09-2003, 07:13 PM
#167
Meat Popsicle
right under my nose...
you have truely inspired me
this almost brings a tear to my eye!!!
FANTASTIC!!!
peace out!
Stevz
-
07-09-2003, 07:39 PM
#168
my first attempt ... i have some strange buggs, but it gives an idea of the systeme.
Code:
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;
}
}
http://www.toy-toy.net/tmp/z_mapping_hills.swf
-
07-09-2003, 09:41 PM
#169
Untitled-1.fla
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
-
07-09-2003, 11:56 PM
#170
Senior Member
nice one strille, I like the jump, just thinking on what this can turn into, damn NEED TO LEARN FASTER
-
07-10-2003, 04:10 AM
#171
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 ?
Last edited by Xavier77; 07-10-2003 at 04:28 AM.
-
07-10-2003, 05:34 AM
#172
Heli Attack!
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.
-
07-10-2003, 06:21 AM
#173
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!
-
07-10-2003, 06:28 AM
#174
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.
-
07-10-2003, 06:37 AM
#175
Yes we can
great stuff andre!
RESPEKT
falls ihr nen coolen ed für das ganze braucht,sag bescheid
Last edited by tomsamson; 07-10-2003 at 06:39 AM.
-
07-10-2003, 06:44 AM
#176
Untitled-1.fla
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.
-
07-10-2003, 07:05 AM
#177
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?
-
07-10-2003, 07:11 AM
#178
falls ihr nen coolen ed für das ganze braucht,sag bescheid ;
Was meinst Du mit 'ED' ?
:o)
-
07-10-2003, 07:12 AM
#179
Untitled-1.fla
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.
-
07-10-2003, 06:17 PM
#180
very clever!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|