Added: 2 years ago
From: DevNote
Views: 8,027
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (75)

Sign In or Sign Up now to post a comment!
  • at 2:45 it just keeps falling trough, no errors or anything. Everything is the same as you, please help

  • HOW THE FUCK DO YOU KNOW HOW TO WRITE THAT STUFF

  • @tammamn YouTube is such a pain in the ass to comment on.

  • @tammamn Also, where are the advanced tutorials?

  • Comment removed

  • Comment removed

  • Comment removed

  • thank you so much i was able to do this because of YOU :)

  • OMG AMAZINGG VIDEOOO!!

    damn this is complicated!

  • Hi there, I've managed to Gravitate my player, but when I insert the code for boundaries the player doesn't respawn and falls straight down. Any idea how I can fix this? Thanks

  • how i do to make my player dont jump again and agin without hit the floor???

  • I had an error with the collision where the game would crash, often taking Flash with it. This was somehow related to setting the _vy variable (which I had defined as velocityY in my version) to 0 after the collision occoured. I fixed this by setting it's value to the y-position of the character movieclip, just in case anyone else is having the same problem.

  • Dear DevNote,

    You are a lifsaver!

    That is all....

    haha, nah, cheers mate, you've helped a lot with my assignments. I'll send you a link to the game once it's finished.

  • Love it, please create the advance tutorial, really looking forward to it. By the way, do you accept bribes?

  • Amazing tutorials. Looking forward to the advanced ones if you ever do them :)

  • How, exactly, would one prevent the infinite jumps? I've tried checking online, but I'm new to flash and anything I try just gives me more errors.

  • @697134002

    Nevermind, I figured it out.

  • @697134002 care to share?

  • could some one post the full script for me as a comment

  • @NightmareEdits

    go to his website wwwdevnoteorg put the dots and click on DocumentMain

    and you wil see the full code

  • How could I check for collision with an Orb, against walls in all directions? (The idea beeing, that the character is a floating orb)

    My first idea was to check not simply for player.x/.y but for .x-50/.y-50, .x+50/.y-50, .x-50/.y+50,. x+50/.y+50 (Because the Radius is 50)

    However, this feels like an unclean solution and I can think of cases where this would give me unwanted results.

    Is there a better solution?

    Thanks in advance and a big thumbs up for your videos!

  • I keep getting error #1084 in both lines 70 and 88. It's in:

    if (_boundaries.hitTestPoint(_pla­yer.x _player.y, true))

    Please help, i don't know what to do!

  • ive got a problem im doing a platformer slide with no gravity or jumping and the camera works but the character gets pulled to the left of the screen please help asap

  • @ThomasChadders Sorry Ignore this i write up the code wrong

  • these tutorials are excellent! are you still planning on releasing the advanced tutorials? i would be very interested in watching them

  • What the fuck dude, can't you explain what we are doing?

    This isn't a tutorial in anyway. No explanation of what we're doing. Just you doing it.

  • is there a way to place an object on the stage without having it scroll along with the player?

  • @TheMrClunge

    just put it on the stage

    it wil only scroll along if you put code below  with the linkage name so just put the object on the stage and it won't scroll along

    instance_name.x += (stage.stageWidth * 0.3) - player.x;

  • brilliant mate! wish my tutor at university was half as good as you!x

  • so based off your coding I began to script on my own... It took me a while but I did it. Question though. I have a character walking animation that from 1-29 frames is him walking right, and walking 30-58 of him walking left. I've been sitting here trying to think of a function or input that would do something like. If Left arrow is held down. gotoAndPlay frame 30..because I have 58 scripted to go back to 30 and 29 to return back to frame 2, 1 is him in a standing position.

  • Thanks very much for these videos, they were very helpful. One problem I have is that if I am at the side of the platform with a little bit hanging off, the player can stand on it, but if I jump on it the player falls through. Is there a way around that? Thank you :)

  • another way to fix the continues jump is to make another boolean var. in the area where you declare your other private var's add in private var jump:Boolean; in the your main function add jump = false; In your key controls add this to case 38 if(jump) { _vy = -20; jump = false; } and in your processCollisions in your hit test point checks add this jump = true; That should work. I tried to add a check for vy == 0 but i was still able to double jump at certain points of hte jump.
  • @MyMadMonster This really helped me a lot! Thanks a bunch!!

  • O, I forgot to mention that I just duped the code and used y. I figured it might be messing with the boundary to determine respawns but it seems to reset anyways but after a longer fall. So I'm pretty sure this is not the best way to go about it.

    _boundaries.y += (stage.stageHeight * 0.5) - _player.y;

    _player.y = stage.stageHeight * 0.5;

  • Amazing video, thanks for this quick guide that has shown me soooooo much. BTW if anyone tried adding a camera tie to the y axis you may notice that the boundaries constantly shake. I'm not sure if this is a good way of doing it but it seems to work. I went into the processCollisions() method and changed the while collision inside the if to say _player.y -=1; instead of .1 and that stops the shaking. Just a quick fix, let me know if its not a good permanent fix. Thanks again DevNote!

  • Great tutorial hope you upload the advanced one soon. Looks like you have a great deal of good tips you can teach.

  • For anybody looking to fix the continuous jumping problem. Look for the following:

    private function keyDownHandler(e:KeyboardEvent­):void

    {

    After this line (line 50), put the following:

    if (_vy == 0)

    {

    Lower down in the code (line 76), it should say "default:" followed by two brackets. Put another right bracket on the line below the default line:

    }

    Hope this helps.

  • @benod thanks for the great tip!

    for those needing a 100% reliable solution (e.g. for professional-grade projects, and projects developed for paying clients), i do want to point out that this solution will act somewhat unstably when the "player" is walking down declines (i.e. the jump will seem to be randomly and repeatedly disabled in these situations).

  • how would you make bullets?

  • @benod @DevNote if you move your if(_vy == 0){ to right AFTER the case 38: and just include the _vy = -20; within it, it seems to be loads more reliable and work better with the other keys. Just saying, easier solution.

  • Everything works perfectly and a huge thank you! But now I have been trying to progress further with this current script to enhance some of the features. I've been trying to add x and y directions to the scroll function but am having some trouble. I thought by repeating the current lines but with .y instead of .x and stageHeight instead of width would have worked but clearly I'm not thinking about this in the right way. Any suggestions please?

  • @hypersnegl given that there are no error messages to work off of, i think the best first step would be to try using the original source code (found at devnote [dot] org). also, if you're testing the app straight off of the adobe flash ide, make sure the keyboard shortcuts are turned off on the swf window ("Control" -> "Disable Keyboard Shortcuts").

    let me know if that doesn't work. i'm sure we can figure it out without too much trouble.

  • Hi again,

    Everything works for me apart from the arrow keys. When I put in the (e.keycode) bits I get this error:

    "1119: Access of possibly undefined property keyCode through a reference with static type flash.events:Event."

    -Any ideas why this might be?

    Many thanks dude, awesome tutorial. I've 'liked' it, (not sure where the star ranking system went lol.)

  • @KingWill1987 looks like you put "Event" where "KeyboardEvent" was supposed to be..? let me know if that doesn't work, and I'll try'n figure out another possible solution :)

    thanks for the "like" !

    but seriously.. no more stars huh?

  • @DevNote, right first time... Can't believe I've been staring at that for ages and not seen it.

    Thanks! :):)

  • Comment removed

  • very good tutorial learning much ^^

  • glad to hear it. thank you for the positive feedback!

  • Hello. Thanks for this tutorial. Only one issue here --

    My boundaries work except for when I try to jump upon them. If I fall from one block onto the next, my collision is working but when I jump, I fall through the next block.

  • EDIT: Never mind that last comment. I erased the scribbles I made with the paint brush as boundaries and recreated them with boxes. That did the trick.

    Looking forward to watching your other vids.

    Kind regards

  • thank you for the feedback. it seems that you've figured it all out already, but just in case others have missed the details, i want to mention here that the problem with paint brush boundaries is that they can be too thin for a collision to be triggered. i.e. the player and the boundary images never overlap.

  • Great tutorial dude! how can i disable the infinite jump

  • Great videos!! Is the and ETA on the advanced class?

  • Nice video! this really helped me. i just have one question. is there any way to fix the infinite jumping? i know you said you would put that in the advanced tutorial, but is there an easy way to fix it?

  • thanks! the easiest way to disable infinite jumping is to test and flag sufficient boundary proximity per frame and enable jumping only when the boundary is farther than a predetermined distance.

    for example, when you're testing for boundary collisions (as seen in the tutorial), also keep track of whether the test came back true or false, then use that result to also enable or disable the jump button for that particular frame.

    this is the unoptimized solution, but the groundwork is the same.

  • "optimizing" this particular solution method would involve testing strategic distances from the player (i.e. not just testing for collision, but also testing for near-collision). this will prevent the jump being disabled when your player is simply walking down a steep slope.

    hope that helps! sorry for the wait for that next tutorial, been really busy with the day job (aren't we all).

  • great tutorials man ! you should teach this at my uni !

    only one problem, everything works perfectly untill i add the last 2 lines of code:

    _boundaries.x += (stage.stageWidth * 0) - _player.x;

    _player.x = stage.stageWidth = 0.5;

    after i add these the final flash movie flashed white then has flashed of my coundaries appearing then dissapearing!

    any theories on what is wrong ?

    cheers

  • yup! i think you left out the ".5" in that first line (see 6:25).

    thanks for watching!

  • woop ! thanks :P

  • Superb tutorial!

  • you rock dude

  • haha, wow.. thank you!

  • yeah same thing here. tried it got impatience and screwed up took another hour at home succeded in 1 go. ty mate you helped me out for my school project ;)

  • ehm you said you got an advanced tutorial can you link me plz

  • Firstly, I'm thankful to hear that the video was of help in something as practical as a school project.

    Secondly, I'm sorry but I haven't yet gotten around to formatting and uploading the advanced tutorials. I'd list off all my "good" excuses, but I know no one cares for that.

    However, it's definitely on my todo list, so don't give up on me just yet. If you subscribe, you'll get a notification whenever the new tutorials are posted (I'm not selling anything; it's just for your convenience).

  • I successfully completed the side scroller by following this tutorial exactly, so thanks very much once again!

  • Superb just what I was looking for thank you man!!

  • Great! I'm glad it helped.

  • Great tutorials!

  • Thanks for the positive feedback!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more