Platform Jim Example

Post here your demos and examples with the source files.
Forum rules
Always post the games with a screenshot.
The file must have the ged and data files (complete game source)
Use the forum attachment to post the files.
It is always better to use the first post to put the game files

Platform Jim Example

Postby jimmynewguy » Tue Aug 02, 2011 8:30 pm

Howdy! Just was messing with stuff and felt the urge to post an example on how I do things in the world of platformers. Couple people asked how I did movement and such so this is for them/others who want to see some cool-ness.

It's got my "collision system" that's really quite...not the real way to do things. But it's my work around to stick with GE :) and the blood effect from Awesome Man. I drew everything and made them there sounds as well (the player's run animation was from a tutorial, I edited it to fit GE and colored the headless/neck-less/strange shaped man and tried my best to make him look decent). You can use anything in here as you please. Sorry for the lack of presentability. (That a word?) was thinking of this being a game, but I didn't really have any idea of what it was..so I threw in some pickups and a booby trap and posted it. Oh well :lol:

- Arrow Keys Move
- Z Jumps

Cheers!

PS: More veteran coders, don't judge my bad coding methods! :wink:
Attachments
screen.PNG
OOOO000ooooo.....
Platform Jim.zip
Ahhhhhhh!!!
(69.96 KiB) Downloaded 256 times
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Re: Platform Jim Example

Postby Jagmaster » Tue Aug 02, 2011 11:51 pm

This is helpful for me mainly because the collisions lack the dreaded "Physical response" while still keeping the walls "slippery". I never thought of making a collision detector that looked like that either. +1 :D
User avatar
Jagmaster
 
Posts: 875
Joined: Sun May 08, 2011 4:14 pm
Location: Not where you think.
Score: 82 Give a positive score

Re: Platform Jim Example

Postby skydereign » Wed Aug 03, 2011 12:12 am

Well there are ways to use PhysicalResponse to maintain velocity while preventing you from falling through the ground, or sticking to a wall.
Code: Select all
double xvel = xvelocity;
PhysicalResponse(MOVE_EVENT_ACTOR_ONLY, USE_CALCULATED_MASS, 1.000000, 1.000000, 0.000000, 0.000000);
xvelocity=xvel;

Switch the xvelocity for y to handle walls.

Not going to judge your methods, just curious, can you really read that draw script?
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Platform Jim Example

Postby jimmynewguy » Wed Aug 03, 2011 12:25 am

Thanks Jag.

And yea sky, I can read the draw script. I have a really good memory so I know where I put things and when :) probably doesn't help others that I do things that way though...
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Re: Platform Jim Example

Postby Jagmaster » Wed Aug 03, 2011 12:27 am

This is actually what I've been using for one of my newer projects (not Hrt) I read Dst's perfect collision demo. It doesn't work with ramps or curves real well though, so I've had to make a separate actor for slopes, ramps, ect.

Actually, I didn't even read the draw script. I was looking at collision events. I probably should have though. I have yet to learn more about Collisionfree and stuff like that, so I can have an entire script for a player in draw actor. I have also yet to understand Gag's collision system too (which, works awesomely well with slopes).

Edit: who were you talking to regarding draw actor Sky?
User avatar
Jagmaster
 
Posts: 875
Joined: Sun May 08, 2011 4:14 pm
Location: Not where you think.
Score: 82 Give a positive score

Re: Platform Jim Example

Postby skydereign » Wed Aug 03, 2011 12:33 am

I was asking jimmynewguy, as the code looks (to me) unnecessarily dense, to the point that there are bits of code not directly viewable in the editor. But it seems jimmynewguy remembers the code, instead of going back and reading it, which works in the short run. Writing like that for me would take some serious effort, but to each his own.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Platform Jim Example

Postby Camper1995 » Wed Aug 03, 2011 7:45 pm

Jimmy, man, from now, I will use your collisions in every platformer I will make. Thank you so much.

Great, I really appreciate this!

+1 for you sir :D
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score


Return to Game Demos

Who is online

Users browsing this forum: No registered users and 1 guest

cron