A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 40

Thread: Side Scroll Discussion

  1. #1
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    Hi guys I see there is a great interest in side scroling games this is why I oppened a new thread. I hope we will get a good discussion here. So:

    1. How to scroll the background ?
    2. How to jump ?
    3. How to climb ladders ?

    Is that good for start ? Ill try to do some samples tonight.
    Happy thanx giving for thouse who selebrate it.
    Mad_sci

  2. #2
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    Ok guys as I promissed here is the first tut which I did for ya. click inside and use the left and right arrow keys to go all the way to the right and back.
    download the fla.

    questions ?

    mad_sci

    Check the last post for updates.
    [Edited by Mad-Sci on 11-23-2000 at 11:39 AM]

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Posts
    198
    Theres a bit of a flaw in your movie, when you start scrolling, it wont stop when you let go of the key. I could post an fla on how to make your character jump too.

  4. #4
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    Ok let me continue,
    In the following example I added some platforms and you can climb on the ladders.

    bugs there are many but this is only an example
    the scroll bug fixed in the this example.
    Mad_sci

    Booya it will be cool go man...
    [Edited by Mad-Sci on 11-23-2000 at 11:40 AM]

  5. #5
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    HOMEWORK
    using the above fla. make swf as this many platforms and ladders ( and bugs )


    Mad_sci





    [Edited by Mad-Sci on 11-23-2000 at 11:40 AM]

  6. #6
    Junior Member
    Join Date
    Nov 2000
    Posts
    2

    Smile

    Hi!

    Umm.... The ladder zip link is wrong.

    It will not download. Thanks for giving example on how to do this, it is very helpful for people, like me, that plan on making games in Flash.

    Seeya!
    Torkm

  7. #7
    Member
    Join Date
    Oct 2000
    Posts
    42
    Keyboard handling is all wrong, its like you can climb the latter and just move the object around all over the place, not a very impressive example what you have here, nice attempt though.

    By the way, I do understand that this is just an example as you mention.
    [Edited by OxBlood Ruffin on 11-23-2000 at 03:18 AM]

  8. #8
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    Tnx for jumpin in guys sorry for the link its fixed now. Right now its possible when you drop from a platform to move the ball this gives you an illusion that you can move it all arround Ill give better sample. Im trying to show you guys the steps needed to fix a bugs in a game as well..
    tnx OxBlood.
    Mad_sci

  9. #9
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    now when you drop off the platform you cant use the left and right arrow keys.
    mad_sci

    check the last example posted...
    [Edited by Mad-Sci on 11-23-2000 at 11:51 AM]

  10. #10
    Senior Member Olorin's Avatar
    Join Date
    Aug 2000
    Posts
    1,151
    I think it's better if there is side-way movement when falling. Perhaps you shouldn't allow the ball to move when it's already falling, but it should travel a little bit in the direction it was going when it fell off a platform. That way you can fall off a platform and get on another platform that is close to and under the one you fell off.

    Olorin

  11. #11
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    yep sounds good, tnx for joining Olorin.
    Mad_sci

  12. #12
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    Ok guys I had to delete the previous examples because it will slow down the forum. Ill be posting one movie at a time with the zip as well

    [swf width="200" height="100" background="#FFDDBB"]http://savco.virtualave.net/tut/ladder.swf[/swf]
    http://savco.virtualave.net/tut/ladder.zip

    ok side drop added. if you keep pressing the key when you are off the platform the ball will go in the currant direction + down if you release the key it will go strait down.

    Mad_sci
    O dont forget to collect the coins


    [Edited by Mad-Sci on 11-23-2000 at 12:28 PM]

  13. #13
    Senior Member Olorin's Avatar
    Join Date
    Aug 2000
    Posts
    1,151
    Looking good, how about a doorway that opens when you've collected all the coins?

    BTW, what happened to that other platform game you were working on, with the creepy background ?

    Olorin (still working on his 3d-action game, posibly going to work on a side scroller after that )

  14. #14
    Senior Member
    Join Date
    Jun 2000
    Posts
    435
    Hay Mad-Sci that’s cool!
    Sorry I have not participating in your discussion, I have bin doing a lot of work.

    I'm just curious. ^.^ You know? Felines and curiosity go well.
    1) What is your preferred method of collision detection and why?
    2) Tile management? All thou it looks like you are not using tiles in this one?

    Just some questions that will hopefully spark a bit more of a conversation! I would be glad to answer questions to. But I don’t have the time to just sit down and weight out all that I know, so its up to you to ask!

  15. #15
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    Ok, now about the first games a while ago my comp crashed realy hadrd. The Partition Table was gone for some reason as well as all my fla. docs and swf. It was imposible to recover. For the first platform I collected a lot of tiles and each one was scripted separately. All of them in the library just drag and drop. This is all gone and most probably Ill try again at some point.

    1. for collision detection I use hitTest(). But it all depends how many objects Im planning to paste on the stage. For a platforms is good cuz how many of them you might have max arround 10. For a game like PacMan though I use a look up table.
    2. Tiles: I use 2 types of tiles only:
    ```- tiles which do nothing just art work.
    ```- tiles which trigger event on collision. In thouse I use onMovieClip (load) to build a look up table ( array ) on the fly. for example:
    1. create and empty array ( 30,30) 30 coll 30 rows in frame 1 of the MC
    2. onMovieClip (load) just send a number or letter to that array.
    3. Look in that array each time you move the hero and after that in a container ( array 2 ) to see which event you have to trigger. Thus you script the tile only once, drag and paste on the stage. and correct the container acordingly.

    Mad_sci

  16. #16
    Senior Member
    Join Date
    Jul 2000
    Posts
    198
    Sorry, it took so long, but here is the jump demo. Just navigate with the arrow keys, and use space to jump.
    [swf width="200" height="100" background="#ffffff"]http://www.geocities.com/autogame/jumpdemo.swf[/swf]
    FLA: http://www.geocities.com/autogame/jumpdemo.zip
    [Edited by Booya Climber on 11-23-2000 at 06:57 PM]

  17. #17
    Senior Member
    Join Date
    Jun 2000
    Posts
    435
    Hay Mad-Sci, sorry about your lost files! I have a MD drive I burn backups to every weekend now to prevent lost data! A precaution that saved most of my work when my computer took a relay bad dump a while back! You should make backups in the future it might come in handy!

    As for my opinion about “hitTest”… I know I have seed it in the past but your new file might help to illustrate it better. Climb up a later when the ball is in the wall move from side to side?

    Using “hitTest” will only tell you if objects are overlapping and then you must adjust the position of the objects to prevent them from occupying the same space. This takes an extra step, and if you remember your zombie game the object will appear to bounce back out of the ground? Because the graphics must physically overlap for “hitTest” to work!

    To create smooth animations you need to know what will happen to the moving objects before you physically move them. So you can make the adjustments before the screen is updated.

    Well that’s my 2 cents? I am working on testing some workarounds that might make “hitTest” do just that but I still prefer the traditional binding-box methods.

    FlashCat

  18. #18
    hey guys, what do you think about using the tile array method??

  19. #19
    Senior Member
    Join Date
    Jun 2000
    Posts
    435
    Acutely I am using 2D Arrays to store all my tile data, after a lot of trial and error I came to the concussion it was probably the best method.

  20. #20
    Senior Member
    Join Date
    Jul 2000
    Posts
    198
    One way to get around the hittest problem is to use an invisible square around the area you want to hittest. What I did on a platformer I was making awhile ago, I had the invisible box above my platform, and when it hit that, it set the _y property so it appeared like it was on the platform. This makes it so there is no bouncing out of the platform also.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center