It's a bit easier to understand and highly customizable. (I did one of these once and got the character to stick to the walls/cieling with a button press ) However, there is a problem that Ricky's engine and this one has. They do not handle slopes. I have decided to go looking again. The engines that I have that do handle slopes, do not explain how they do. So, my game file is right here:
I also have another smallish problem. I can't get the alpha channel part of the object to get centered on a character like the elipse does. If anyone wants to help me out that'd be great. I have a few dc points to give away if your into that sort of thing.
(And don't worry Ricky, without your engine, I surely woudln't be this far. In fact, the previous game may have ended up in the dust bin. Along with MMF.)
Thanks in advance!
Cya's!
All platforming problems can be mostly solved here:
not trying to be a bother or anything, could you upload a winzip? My 'trial versions' being crappy and I can't open .rars. I forgot what other program to use. Isn't there an opensource or something for this though? I'll do some snooping around. Thanks though!
All platforming problems can be mostly solved here:
Eeep. Well, I just hope this doesn't mess with the engine I'm using. I'll have to sift through it more thouroughly after I do a few chores and get slaughtered on halo3. I'm sure it won't though, it is custom after all. Oh well, cheers to both of you though! Spitznagl, if I get this to work, expect some well, something anyways. Cheers to both! *smiley with lifted fizzley mug*
All platforming problems can be mostly solved here:
Thanks for sending the file spitznagl! Though I was able to get it from the post. And with omc's 7-zip link I am able to open and look at the code. And this is an excellent example. I just need to sift through it to figure out what I do and don't need. I should be able to cut out the scrolling and angle groups. Since the angle is only for effect though really. Btw, would you mind explaining the formula to me? Formulas I should say. Especially the one where you start the loop. I would like to add water and ice though that would be a simple position value change plus active overlap etc. The main "horiz" formula is the loop I'm talking about. Thanks again macadam!
All platforming problems can be mostly solved here:
Basicly, it adjusts the number of horiz loops depending on the angle, because, if you just add a vertical movement, the player will move faster when going up slopes.
Normaly, the "number of horiz loops" section would only contain Abs(horiz("player")), but now it is either boosted or decreased by the expression that follows.
Here's how this expression is calculated
LastX & LastY are alterable values wich indicate the X&Y coordinates of the player, one frame in the past.
So by calculating X-LastX, you get by how much the player moved horizontaly. Same goes for the vertical movement.
(Y-LastY*1.0)/(X-LastX*1.0) returns a value ranging from 0 to 1 [because the slope can't be more than ±45°]
-----You get-----
•Zero if he didn't move verticaly
(ex: 0/5=0) [angle=0°]
•One if he moved as much verticaly as he did horizontaly
(ex: 3/3=1) [angle=45°]
•Fractions if in between
(ex: 3/6=0.5) [angle=30°]
note: the resulting value can be positive or negative depending on your X&Y movements.
(Horiz( "Detector1" )/Abs(Horiz( "Detector1" ))) returns 1 if the player is heading right, and -1 if he's heading left.
[In case you don't know, Abs() makes a negative number positive.]
So, by multiplying those two value together, you'll get one of these
A positive value if:
• going right & going up a slope [substracting to horiz wich is postive... slowing down]
• going left & going down [substracting to horiz wich is negative... going faster]
or a negative value if:
• going right & going down [adding to horiz wich is postive... going faster]
• going left & going up [adding to horiz wich is negative... slowing down]
But you don't want to add or substract to horiz, a value ranging from -1 to 1. In this state, it only is a cooeficient. That's why you multiply it by (Abs(Horiz( "Detector1" ))/1.5). It's divided by 1.5 so that while climbing a 45° slope, it won't bring the number of loops to zero. You can play with the 1.5 if you to lower or incease the effect.