A Flash Developer Resource Site

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

Thread: "Tank" motion

  1. #1
    Senior Member
    Join Date
    Jul 2000
    Posts
    323
    Just finished what I guess you could call a movement engine and I'm getting ready to build a game around it... I stuck my testing sim on the web, and was wondering what you guys think of it...

    http://ug.cs.sunysb.edu/~shlaskoi/TankMotionSim.swf

    Yet another program to remind me how much I hated trig and physics in high school, and how much I use them now...

  2. #2
    wow, that looks great.
    good job.

    I think you could get some really cool motion if it didn't have to stop every time it turned... let it skid a little.

  3. #3
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,092
    That is interesting Xentor.
    could you get it to turn while moving
    and set the break to Key B?

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Posts
    323
    You kidding? I added extra code specifically so it WOULDN'T turn while moving... That was kinda the idea

    As for brakes, it's supposed to be completely automatic... right now it hits the brake when either 1) The necessary braking distance exceeds the distance to the mouse pointer, or 2) The mouse pointer moves more than 15 degrees from the forward angle in either direction.

    The whole idea is that it's supposed to be difficult to control... I just started on a game where you drive an army tank around a parking lot squishing pedestrians

  5. #5
    Junior Member
    Join Date
    Jul 2000
    Posts
    8
    I think what karl and jydnas are suggesting is a great idea if you were developping a more arcade like game, and you may want to keep it in mind for another project.
    But If classic simulation is your goal, then the 'engine' you've made is fantastic. Ive played sims before and that is really how a tank moves. Once you get the hang of it, I think it will leave gamers with a better sense of how tank navigation is an art. Post a link to the game when its done.

  6. #6
    Senior Member
    Join Date
    Jul 2000
    Posts
    323
    Simulation? Actually, I just felt like doing something different

    Making the tank turn while moving would actually involve deleting a few lines of code... Would take about 10 seconds... I think this makes it a bit more interesting, since people will have to get used to the movement and slow acceleration...

  7. #7
    Senior Member
    Join Date
    Jun 2000
    Posts
    435
    Xentor,

    Ha ha, that’s COOL! I cant what to see what your going to do with it!

  8. #8
    Senior Member
    Join Date
    Jul 2000
    Posts
    323
    The game is about halfway done already

    Hey... Anyone have a top-down view of a walking person? I need cannon fodder, and my graphical skills are next to nil

    *****

    Oh, by the way... In the game, I changed it a bit... Gave it better brakes... So now braking is about 2 * acceleration.
    [Edited by Xentor on 07-21-2000 at 12:47 PM]

  9. #9
    Senior Member
    Join Date
    Jul 2000
    Posts
    323
    Well, it's done... The graphics are terrible, like all my games, but it's done... It's not on the main site yet, but here's the backdoor link

    http://www.joke-of-the-day.com/games...Dir=flashgames

    Oh, and if you don't see the "How to Play" section, that's because I haven't written it yet :P

  10. #10
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    Hey man well done I got 2019. so you dont get scored if you sit on one place right ? That is good. Though I was making rotations siting on one place in the middle and got score bigger than if I chase the guys . But the game is cool.
    Mad_sci
    PS I dont think you need any AI at this level it is good as is.

  11. #11
    Senior Member
    Join Date
    Jun 2000
    Posts
    435
    Mowahahahaha… Die Pedestrians, Die… Hahaha… That’s was fun, It reminds me of this old shareware game where you kill little stick figure people with all kinds of stuff like fire and big rocks.

    I was wondering haw you setup your collision detection? Are you just compare the tanks location to all the people then moving all the objects. Or do you have a more streamlined method? Just curios?

    Grate Work, Xentor!

  12. #12
    Senior Member
    Join Date
    Jul 2000
    Posts
    323
    Thank guys

    FlashCat - I expected that question...

    Since it's a serious pain to code collision detection with a rotating rectangle, I kinda cheated...
    There are actually two invisible circles (Actually no shape at all, but you can think of them as circles) on top of the tank. One of them is halfway between the center and the front-middle, and the other halfway to the back. So the two circles basically cover MOST of the tank. It's not perfect, but it works.
    Each pedestrian continuously measures the distance between its center and each of the masking circles. That's the way I like to code... Object-oriented philosophy... Each clip takes care of itself (Unless it's more efficient to do otherwise).

  13. #13
    Senior Member
    Join Date
    Jun 2000
    Posts
    435
    Cool I was thinking something a long those lines. It definitely works well in your game.

    Unfortunately if you where to use the same approach on a much lager game you would be out of processing power in a hart beat.

    Any haw its very COOL!

    It looks like a good start for a mission based game, with big guns, missiles and other enemy tanks.

  14. #14
    Senior Member
    Join Date
    Jul 2000
    Posts
    323
    Woah woah... I don't write BIG games... They don't pay me enough for that :P

  15. #15
    Senior Member
    Join Date
    Jun 2000
    Posts
    435
    They pay you to right Flash Games! Your lucky, I get paid to make dynamic presentations, internal sites and kiosks. Boring! But the pay is good!


  16. #16
    Senior Member
    Join Date
    Jul 2000
    Posts
    323
    Well, actually I get paid to do a lot of stuff... Programming, database maintainance, etc... Basically everything the rest of them don't know how to do... The flash games were just a spur-of-the-moment idea that got big...

    Oh, but technically, I'm just a lowly intern

  17. #17
    Senior Member
    Join Date
    Jun 2000
    Posts
    435
    Yep. That’s the way it was for me about a year as a intern when I was in high school. But when I turned 19 I asked for a full time position with all the benefits and they gladly gave it to me. They even gave me flexible work time so I could attend Night College.

    You just have to ask, they will pay you peanuts as long as you are willing to work for peanuts. But don’t posh it too much try and find out what it tasks to be an employee, and work to meet those goal. So when you ask, the only difference is your age and that’s not a valid reason for them to deny you the position you deserve.

  18. #18
    Senior Member
    Join Date
    Jul 2000
    Posts
    323
    Nah, you don't get it... I'm already 19... I've been working here since the beginning of last summer... I'm their best tech guy, and they know it... I already get paid about $15/hr, and that's really not that bad, considering I only work here during the SUMMER

    I'm full-time in college, so this is a summer job... I do, however, get benefits and such... Of course, if they want me back next year, they'll have to raise the price

  19. #19
    Senior Member
    Join Date
    Jun 2000
    Posts
    435
    Yah. I am on the 8, year plan for college! But I just Turned 20 July/3, Another year wiser or something like that Lol. :P

  20. #20
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756

    o boy

    I feel old and useless. he he
    I need help guys with some scripting. its a stupid thing:
    pseudocode:

    count=count+1
    coll=coll+1
    x=x+20
    If x > 400
    x=0
    y=y+20
    row=row+1
    end
    Name="/cell_"&row&"_"&coll
    duplicateMC('cell_0_0",name,100+count)
    SetProperty (name,_x)=x
    SetProperty (name,_y)=y

    Result: duplication fine. SetProperty not working I tryed eval already not avail. he he
    Any thoughts.
    tnx

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