The Daily Click ::. Forums ::. Klik Coding Help ::. Slippier Slopes
 

Post Reply  Post Oekaki 
 

Posted By Message

Xhunterko



Registered
  07/05/2003
Points
  1015

VIP MemberHas Donated, Thank You!Hasslevania 2!Pokemon Ball!
2nd September, 2009 at 07:58:28 -

Are getting away from me. I am now using this engine here:

http://www.create-games.com/download.asp?id=7260

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:

http://www.filefront.com/14448537/DarkenEngine.zip

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:

http://www.clickteam.com/mbfiles2/277308-engine.zip
http://www.angelfire.com/games5/psywakd/platform.gam
www.zephni.com

These are very excellent examples by other people and are very informative.
Image

I work at the speed of "maybe".

Coming Soon: Diary Of An Indie Developer
http://www.youtube.com/watch?v=XaF6H9MrgH8

Twitter:
http://twitter.com/xhunterko

Spitznagl

Cabinetmaker

Registered
  06/12/2008
Points
  4260

The SpinsterVIP MemberHas Donated, Thank You!Picture Me This Round 29 Winner!Picture Me This Round 31 Winner!Picture Me This Round 36 Winner!
2nd September, 2009 at 11:20:27 -

http://www.create-games.com/download.asp?id=7828
That should help.

 
...

Xhunterko



Registered
  07/05/2003
Points
  1015

VIP MemberHas Donated, Thank You!Hasslevania 2!Pokemon Ball!
2nd September, 2009 at 21:05:57 -

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:

http://www.clickteam.com/mbfiles2/277308-engine.zip
http://www.angelfire.com/games5/psywakd/platform.gam
www.zephni.com

These are very excellent examples by other people and are very informative.
Image

I work at the speed of "maybe".

Coming Soon: Diary Of An Indie Developer
http://www.youtube.com/watch?v=XaF6H9MrgH8

Twitter:
http://twitter.com/xhunterko

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
2nd September, 2009 at 21:21:09 -

Hip hip, huzzah: http://www.7-zip.org/

 

  		
  		

Xhunterko



Registered
  07/05/2003
Points
  1015

VIP MemberHas Donated, Thank You!Hasslevania 2!Pokemon Ball!
3rd September, 2009 at 03:34:12 -

Ah hah ha ha! There it is!

*Looks at code...eyes fall out.*

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:

http://www.clickteam.com/mbfiles2/277308-engine.zip
http://www.angelfire.com/games5/psywakd/platform.gam
www.zephni.com

These are very excellent examples by other people and are very informative.
Image

I work at the speed of "maybe".

Coming Soon: Diary Of An Indie Developer
http://www.youtube.com/watch?v=XaF6H9MrgH8

Twitter:
http://twitter.com/xhunterko

-MacAdaM-

Megaman Fosho

Registered
  12/02/2008
Points
  560
3rd September, 2009 at 21:29:49 -

Theres a post to my engine in this thread :3
I likes it!

Hah, well, if you cant find a good engine with slopes, i might be able to try and code you a simple one and send it to you?

 
Your just jealous that you're not as awesome as me.
(And my megaman avatar )

Xhunterko



Registered
  07/05/2003
Points
  1015

VIP MemberHas Donated, Thank You!Hasslevania 2!Pokemon Ball!
3rd September, 2009 at 23:53:32 -

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:

http://www.clickteam.com/mbfiles2/277308-engine.zip
http://www.angelfire.com/games5/psywakd/platform.gam
www.zephni.com

These are very excellent examples by other people and are very informative.
Image

I work at the speed of "maybe".

Coming Soon: Diary Of An Indie Developer
http://www.youtube.com/watch?v=XaF6H9MrgH8

Twitter:
http://twitter.com/xhunterko

Spitznagl

Cabinetmaker

Registered
  06/12/2008
Points
  4260

The SpinsterVIP MemberHas Donated, Thank You!Picture Me This Round 29 Winner!Picture Me This Round 31 Winner!Picture Me This Round 36 Winner!
5th September, 2009 at 02:47:28 -

Sure!

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.


I hope that's clear enough

 
...

Xhunterko



Registered
  07/05/2003
Points
  1015

VIP MemberHas Donated, Thank You!Hasslevania 2!Pokemon Ball!
5th September, 2009 at 23:05:57 -

Hey there thanks!

Though it seems as though your trying to overcomplicate the process. At least maybe a little bit.

 
All platforming problems can be mostly solved here:

http://www.clickteam.com/mbfiles2/277308-engine.zip
http://www.angelfire.com/games5/psywakd/platform.gam
www.zephni.com

These are very excellent examples by other people and are very informative.
Image

I work at the speed of "maybe".

Coming Soon: Diary Of An Indie Developer
http://www.youtube.com/watch?v=XaF6H9MrgH8

Twitter:
http://twitter.com/xhunterko
   

Post Reply



 



Advertisement

Worth A Click