Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> Slope problems
United States
Mike Shinoda
Posted: Jun 24 2008, 03:40 PM
Quote Post


Aka Artic
[*][*]

Group Icon
Group: Members
Posts: 802
Member No.: 3598
Joined: 12-April 07

Status: (0d) [--]


The only time I am able to program slopes that actually work are for
a. Enemys that only move left or right
b.game without accel/deccel
The game I am making is way beyond those, so i need some slope relatd help.

here are the codes(not all, just what you might want to look at)

1-Gravity
if not collision_rectangle(x-4,y-1,x+4,y-1,obj_block,1,1) and not collision_rectangle(x-8,y-1,x+6,y-1,obj_slope,1,1) and air = 0
if vspeed < 0.01
gravity = 0.55
if not collision_rectangle(x-4,y-1,x+4,y-1,obj_block,1,1) and not collision_rectangle(x-8,y-1,x+6,y-1,obj_slope,1,1) and air = 0
if vspeed > 0
gravity = 1.5

2-Coll. with slope
y-=hspeed/2

3-Movement(left and right are bassically the same)
if keyboard_check(vk_left) and not collision_rectangle(x-6,y-8,x-6,y-8,obj_block,1,1) and gp = 0
{
if vspeed = 0
image_xscale = -1
hspeed-=0.3
if hspeed > -0.01
skid+=1
}

the problems i am having are

*when i go down the slope, i get stuck about 2 pixels in the ground, dissabling my movement

*sometimes, i fall through while walking on it

*jumping on it goes through

Finally, here is the engine
s - jump
s on wall in air - wall jump
down - ground pound

Attached File ( Number of downloads: 3 )
Attached File  SMB.exe


--------------------
rain.

AKA Artic

I'm gonna miss you ol' pal. See you guys in the 3.0.
PMEmail PosterUsers WebsiteIntegrity Messenger IMAOLYahooMSN
Top
United States
Mike Shinoda
Posted: Jun 24 2008, 06:46 PM
Quote Post


Aka Artic
[*][*]

Group Icon
Group: Members
Posts: 802
Member No.: 3598
Joined: 12-April 07

Status: (0d) [--]


ahem, bump. I really need help


--------------------
rain.

AKA Artic

I'm gonna miss you ol' pal. See you guys in the 3.0.
PMEmail PosterUsers WebsiteIntegrity Messenger IMAOLYahooMSN
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0416 ]   [ 13 queries used ]   [ GZIP Enabled ]   [ Server Load: 2.84 ]