[Example] New Platformer Engine -Pixel Perfect Collisions-

Learn to use DS Game Maker by Example.

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby Bobbyloujo » November 23rd, 2011, 10:34 pm

You would have to create a separate object for the bottom screen.
Image
User avatar
Bobbyloujo
Site Admin
 
Posts: 1385
Joined: December 30th, 2010, 8:40 pm
Location: USA

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby aekara » November 24th, 2011, 7:01 am

oh i understand! you mean to have something like BSplayer and TSplayer and when i am on the top and fall dow create object on the button screen at the position i fell on the top
O man it was to simple :?
Working on something big!

My web site here.
aekara
 
Posts: 690
Joined: July 12th, 2011, 1:24 pm
Location: Earth

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby Sonic The Hedgehog » November 24th, 2011, 7:35 am

Bobbyloujo wrote:I didn't use them but could put them in though.


Actually, as I was whipping up an example, I noticed that it didn't quite work. It was an easy fix though. Notice how 'layer' is set to 3. Object_BackgroundLoader loads the collision map. The visible background is just loaded with the room settings.


I think youve heard this error alot but I just fall right through it and I downloaded the action you put on the third post :?:
Sonic is gone for good as far as I know.
Or is he?
Spoiler: show
Probably
User avatar
Sonic The Hedgehog
 
Posts: 807
Joined: June 22nd, 2011, 12:26 pm
Location: My happy place

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby Bobbyloujo » November 24th, 2011, 6:12 pm

Could you post your .dsgm?

also, aekara, you don't even have to create a new object every time you go to a different screen. Just make BSplayer stay off screen until it's needed, and then make it jump to position when it's needed. It doesn't really matter though, both ways would work. Do what's easiest for you.
Image
User avatar
Bobbyloujo
Site Admin
 
Posts: 1385
Joined: December 30th, 2010, 8:40 pm
Location: USA

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby aekara » November 24th, 2011, 10:05 pm

oh i get you!going to try both to see which one suits me more
Working on something big!

My web site here.
aekara
 
Posts: 690
Joined: July 12th, 2011, 1:24 pm
Location: Earth

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby Z-Dragon » December 31st, 2011, 2:52 pm

Can someone here make the ball jump ONLY once?
Still alive. Still ashamed of my past behavior on these forums.
No, really. I'm sorry.

If you see me, no you don't.
Won't be on here as a participant because I have no games in mind to actively pursue and finish. Busy with multiple roleplays and writing, anyway.



_______________________________________________________________________
Current projects:

The Great and Powerful Text-Based Game
P0rtal DS (In perpetual hiatus until Sonic comes back (probably never))
User avatar
Z-Dragon
 
Posts: 254
Joined: December 23rd, 2011, 10:51 pm
Location: New Brunswick, Canada

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby lozeldatkm » January 3rd, 2012, 8:54 am

Found something with your updated engine. Now that you can jump up through the bottoms of the platforms, see what happens when you jump straight up into the tall white pillar in your background there...

I'm really glad you're working on this. I will inevitably be making a large action platformer project (one i started in college, abandoned, tried again a year or two ago when i found a new platform engine for Game Maker, but got discouraged... i think DS homebrew is what I need to breathe new life into this game) and I just may build it off your engine if you don't mind. So I'll be playtesting this a lot trying to help you improve it
lozeldatkm
 
Posts: 17
Joined: January 3rd, 2012, 8:48 am
Location: Kansas City

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby lozeldatkm » January 3rd, 2012, 9:02 am

*accidental double post*
Last edited by lozeldatkm on January 5th, 2012, 11:11 pm, edited 1 time in total.
lozeldatkm
 
Posts: 17
Joined: January 3rd, 2012, 8:48 am
Location: Kansas City

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby Bobbyloujo » January 5th, 2012, 10:29 pm

I know about the pillar thing. The only way to really fix it would be to make it so that you can't jump through platforms, which could be fairly easily done if desired. Otherwise, you would just have to design your levels around the bug.

It's a been a while since I last updated this. If there's anything specific that you would like me to do with it, don't hesitate to ask.

@zdragon, What do you mean? The already doesn't double jump. Do mean you only want it to jump once and the player can never jump again?
Image
User avatar
Bobbyloujo
Site Admin
 
Posts: 1385
Joined: December 30th, 2010, 8:40 pm
Location: USA

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby lozeldatkm » January 5th, 2012, 11:13 pm

clearly, you need one type of block you can jump through, and one you can't. That's how the platformers I've traditionally made were. If you're basing your collisions off background color like this, is it possible to, say, make the pillar gray instead of white, and in your code make grey backgrounds completely impenetrable?
lozeldatkm
 
Posts: 17
Joined: January 3rd, 2012, 8:48 am
Location: Kansas City

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby Bobbyloujo » January 6th, 2012, 1:49 am

Yessir. I have homework to do now but I could work on doing that later or tomorrow.
Image
User avatar
Bobbyloujo
Site Admin
 
Posts: 1385
Joined: December 30th, 2010, 8:40 pm
Location: USA

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby lozeldatkm » January 6th, 2012, 4:45 am

cool. and if not, it's something I could probably do myself when I get around to it. we'll just see.
lozeldatkm
 
Posts: 17
Joined: January 3rd, 2012, 8:48 am
Location: Kansas City

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby Bobbyloujo » January 7th, 2012, 2:51 am

I got lazy and never did it. It wouldn't be that hard to do though. I'll give a little hint so you can do it yourself. In the Object_Player step event there is a comment that says "Up hills/hitting platforms". This is what detects where the ground is and keeps the player above it. Study it until you completely understand how the algorithm works. Then reverse the algorithm so that it works with the top of the player sprite instead of the bottom and makes it so that the player gets pushed to the bottom of the color coded collision area instead of the top. To make it detect a color other than white, change the values of "Red", "Green", and "Blue" in the If BG pixel color action. The easiest color to use would be black; all the values would just be 0.

You said in one of your other posts that you can understand code but you're not good at writing your own algorithms. I won't doubt your ability to figure out how the code works and reverse engineer it.

Happy coding :)
Image
User avatar
Bobbyloujo
Site Admin
 
Posts: 1385
Joined: December 30th, 2010, 8:40 pm
Location: USA

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby lozeldatkm » January 9th, 2012, 7:29 am

yeah that sounds easy enough. i'll post it when i get around to it
lozeldatkm
 
Posts: 17
Joined: January 3rd, 2012, 8:48 am
Location: Kansas City

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby liamdude321 » May 22nd, 2012, 10:53 pm

What version of dsgm were you using? Maybe you could re upload the file? Cause all I got was a falling ball as well.
liamdude321
 
Posts: 1
Joined: April 15th, 2012, 6:25 pm

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby Bobbyloujo » June 1st, 2012, 1:05 am

Latest version of DSGM. Here it is reuploaded. It still works fine for me.
Attachments
New Platformer Engine.dsgm
(94.5 KiB) Downloaded 463 times
Image
User avatar
Bobbyloujo
Site Admin
 
Posts: 1385
Joined: December 30th, 2010, 8:40 pm
Location: USA

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby Z-Dragon » January 24th, 2013, 11:09 pm

Hey, could somebody upload this for me? My DSGM files got wiped from my pc after it crashed, and I need a platformer engine for a project. Thanks.
Still alive. Still ashamed of my past behavior on these forums.
No, really. I'm sorry.

If you see me, no you don't.
Won't be on here as a participant because I have no games in mind to actively pursue and finish. Busy with multiple roleplays and writing, anyway.



_______________________________________________________________________
Current projects:

The Great and Powerful Text-Based Game
P0rtal DS (In perpetual hiatus until Sonic comes back (probably never))
User avatar
Z-Dragon
 
Posts: 254
Joined: December 23rd, 2011, 10:51 pm
Location: New Brunswick, Canada

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby Nobody » January 24th, 2013, 11:23 pm

Z-Dragon wrote:Hey, could somebody upload this for me? My DSGM files got wiped from my pc after it crashed, and I need a platformer engine for a project. Thanks.

Open your dsgm folder. Inside the examples folder should be a project called "Maze." Inside it shows you how to detect object collisions based on sides. Where the buttons are held, the actual code that allows you to move will be replaced with gravity code since you can only fall until you land on the object.
Feel free to ask me for help. I'm on the forum a lot.

Recent Projects:
Retro Ducks: viewtopic.php?f=13&t=3533 (latest)
The Living Dead 2: viewtopic.php?f=13&t=3483
Crafters DS (Minecraft 2D Clone!) viewtopic.php?f=13&t=3082
User avatar
Nobody
 
Posts: 2323
Joined: February 14th, 2011, 12:08 am
Location: United States of America

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby Z-Dragon » January 24th, 2013, 11:46 pm

Wow, thanks Nobody! Better try it out as soon as I can. I'll just need a variable for the gravity shift and some new code. That helped a lot.
Still alive. Still ashamed of my past behavior on these forums.
No, really. I'm sorry.

If you see me, no you don't.
Won't be on here as a participant because I have no games in mind to actively pursue and finish. Busy with multiple roleplays and writing, anyway.



_______________________________________________________________________
Current projects:

The Great and Powerful Text-Based Game
P0rtal DS (In perpetual hiatus until Sonic comes back (probably never))
User avatar
Z-Dragon
 
Posts: 254
Joined: December 23rd, 2011, 10:51 pm
Location: New Brunswick, Canada

Re: [Example] New Platformer Engine -Pixel Perfect Collision

Postby Nobody » January 25th, 2013, 12:11 am

you're welcome. That's what I'm here for. Just remember that you are only allowed 128 objects in a room, so plan wisely!
Feel free to ask me for help. I'm on the forum a lot.

Recent Projects:
Retro Ducks: viewtopic.php?f=13&t=3533 (latest)
The Living Dead 2: viewtopic.php?f=13&t=3483
Crafters DS (Minecraft 2D Clone!) viewtopic.php?f=13&t=3082
User avatar
Nobody
 
Posts: 2323
Joined: February 14th, 2011, 12:08 am
Location: United States of America

PreviousNext

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron