| |
Game Maker 7 Help: Using Friction and Slopes, I'd rather not use jump to postition
jhsoft |
|

This grimmace is not the McDonalds kind.

Group: Members
Posts: 78
Member No.: 2850
Joined: 24-October 06
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
Hi there MFGG! As you might know, I am making another Bony Beetle fangame, and my hopes are to make it 10* better than the last! In my opinion, it would start with a more Marioish engine. If I could get slopes and friction, my fangame could definetely have more potential for level design, which is what I will be focussing on mostly. So basically, where should I start? I have no idea. Should I start out by looking at other engines, because that could end up with me copying codes into my game...and then I would't know how to add things in later. Again: I just want a starting point, to get me on the right track, I do not want you to tell me the entire code. Thank you. Reminder: 1. Character movement with friction 2. Character movement up and down slopes 3. Enemy movement on slopes 4. Good collision with flat blacks if slope code doesn't work for flat (testing atm)
This post has been edited by jhsoft on Jun 22 2008, 02:41 AM
--------------------
Current Projects: Bony Beetle Strikes Back: Working Title Coding:||||||||| Level Design:||||||||| Sprites and Graphics:||||||||| Sounds:|||||||||| In Total:||||||||||

Which Neglected Mario Character Are You?
| CODE | Thwomp Master says (5:59 AM): I'm not crying Thwomp Master says (6:00 AM): And I never complained Thwomp Master says (6:00 AM): I just said I have 56 complaints |
|
|
|
jhsoft |
|

This grimmace is not the McDonalds kind.

Group: Members
Posts: 78
Member No.: 2850
Joined: 24-October 06
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
| QUOTE (Latia @ Jun 21 2008, 03:42 AM) | | For the going down, there is the second position check that says y+=1, which stands for going down. |
Wow, Latia you are so helpful! I don't know what I would do with out your help.  Also, I forgot to mention I'm a little less than clueless with codes (can do snd_play and thats about is  ) here is my fail code based off of what i've gathered if !keyboard_check(vk_left) and !keyboard_check(vk_right) { if hspeed<0 hspeed+=0.2 if hspeed>=0 hspeed-=0.2 } if not !keyboard_check(vk_left) and !keyboard_check(vk_right) if hspeed not = 0 if hspeed<0 hspeed-=0.2 if hspeed>=0 hspeed+=0.2 btw, Im starting on a clean slate, so no gravity or collision while falling yet. just this. This post has been edited by jhsoft on Jun 21 2008, 05:27 AM
--------------------
Current Projects: Bony Beetle Strikes Back: Working Title Coding:||||||||| Level Design:||||||||| Sprites and Graphics:||||||||| Sounds:|||||||||| In Total:||||||||||

Which Neglected Mario Character Are You?
| CODE | Thwomp Master says (5:59 AM): I'm not crying Thwomp Master says (6:00 AM): And I never complained Thwomp Master says (6:00 AM): I just said I have 56 complaints |
|
|
|
jhsoft |
|

This grimmace is not the McDonalds kind.

Group: Members
Posts: 78
Member No.: 2850
Joined: 24-October 06
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
| QUOTE (Latia @ Jun 21 2008, 04:43 AM) | 1.Goddess :P 2.sound_play not snd_play 3.the second part with the not ! is repetitive, which results either in an error, or negating the values theirself which causes it to get positive which will cause the player to decelerate even if heīs walking. So, cut it off. |
1. Oops, typo. I wasn't referring you to as a deity (sorry  ) I forgot a comma. Sorry about that. I ended up changing the whole post. Also, I guess I've developed a nasty habit. I need to stop using God as a replacement for words like wow. 2. Nevermind, I'm as clueless as it gets. 3. What do you mean by cut it off? What should I cut off? This post has been edited by jhsoft on Jun 21 2008, 06:24 AM
--------------------
Current Projects: Bony Beetle Strikes Back: Working Title Coding:||||||||| Level Design:||||||||| Sprites and Graphics:||||||||| Sounds:|||||||||| In Total:||||||||||

Which Neglected Mario Character Are You?
| CODE | Thwomp Master says (5:59 AM): I'm not crying Thwomp Master says (6:00 AM): And I never complained Thwomp Master says (6:00 AM): I just said I have 56 complaints |
|
|
|
Sergeant DeeY |
|

~Heh Heh~
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Minigame Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/mcg1.gif) ![Minigame Comp Third Place Badge (3) [*]](https://archive.mfgg.net/html/badges/mct3.gif)

Group: Members
Posts: 1344
Member No.: 4730
Joined: 17-November 07
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
You can use this code for slopes
Put this code in the step event of the object if at relative position (0,4) there is object obj_slope_steep_r move relative to position (0,-hspeed) if at relative position (0,2) there is object obj_slope_r move relative to position (0,-hspeed/2) if at relative position (0,4) there is object obj_slope_steep_l move relative to position (0,hspeed) if at relative position (0,2) there is object obj_slope_l move relative to position (0,hspeed/2)
Collision Event with object obj_slope_r: set the vertical speed to 0 move relative to position (0,-1)
Collision Event with object obj_slope_l: set the vertical speed to 0 move relative to position (0,-1)
Collision Event with object obj_slope_steep_r: set the vertical speed to 0 move relative to position (0,-1)
Collision Event with object obj_slope_steep_l: set the vertical speed to 0 move relative to position (0,-1)
Should this help!
This post has been edited by Darkyoshi on Jun 22 2008, 04:20 AM
--------------------
The signature will not be available when the new forums shows up. ~~DeeY~~
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
[ Script Execution time: 0.0699 ] [ 13 queries used ] [ GZIP Enabled ] [ Server Load: 2.69 ]
| |