dcsimg
A Flash Developer Resource Site

Results 1 to 16 of 16

Thread: Car Movement (Expanding Project)

  1. #1
    Junior Member
    Join Date
    Oct 2005
    Posts
    13

    Car Movement (Expanding Project)

    Hi guys, back again, this time with a wip in mind.

    I posted a little while back regarding a car "game" that i was making to study flash actionscripting and effects and such.

    New ideas keep popping in my head for it, so I'm going to do my best, to try and incorporate them all. Hopefully with all of your help I can get this accomplished.

    So, here is the up to date wip progress.

    Car project

    (lol, i have no name for it. Any suggestions would be better then "Car Project")

    pressing h will five you controls and a heads up for what to come.


    For now, my concern is, ive made light beams, and i want them to appear when the user hits a certain key, however, the lights are there own seperate movie clips and part of the "car" movieclip, so that it follows the rotation/movement of the car, as does the chassis and wheel.

    I want the lights to appear(so _alpha = 100) when the user hits the key. but i cant seem to get the lights to respond.

    Any suggestions? thanks.

    Thats all for now.

    Crits and comments welcome.
    Last edited by Hukt; 03-28-2006 at 05:42 PM.

  2. #2
    Junior Member
    Join Date
    Oct 2005
    Posts
    13
    Ok, update time.

    Tweaked a few settings/bugs.

    Also, added toggable headlights, that really light the ground, using blending.

    Can be found here:

    Car project(v.5)

    suggestions and comments well appreciated!

  3. #3
    Senior Member SlimSlaby's Avatar
    Join Date
    May 2005
    Posts
    158
    How can I get rid of that overlay ? Is there a button to toggle it off ?

  4. #4
    Junior Member
    Join Date
    Oct 2005
    Posts
    13
    the headlights? to toggle them on/off hit shift.

    hit h for help and controls if your unsure.

  5. #5
    Senior Member SlimSlaby's Avatar
    Join Date
    May 2005
    Posts
    158
    thanks.. i think i accidentally hit h and didn't know it.. couldn't get rid of the help overlay...

  6. #6
    Game Gecko moe8585's Avatar
    Join Date
    Sep 2002
    Location
    Raleigh, NC
    Posts
    111
    The car has very smooth motions, but maybe reverse shouldnt be as fast as forward.
    Free Online Games @ GameGecko.com

    Games For Websites @ GamesForWebsites.com

    Contact me if you would like GameGecko to sponsor or license your games.

  7. #7
    Junior Member
    Join Date
    Oct 2005
    Posts
    13
    ok! thanks Ill get right on it.

  8. #8
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,796
    I get a solid 50 fps.

    I don't like how fast the car steers. If I were in the heat of playing an actual game, I'd find myself zig zagging left right because it's so hard not to over-steer.

    Also, since Space is supposed to be a "hard stop" it should over-ride the forward motion. It should stop the car regardless if I am pressing cursor up. (or at the very least, slow the movement down to a CRAWL).

    I like where it's going though.

  9. #9
    Senior Member TeroLebe's Avatar
    Join Date
    Mar 2003
    Location
    Lahti, Finland
    Posts
    302
    If you release throttle car doesn't continue steering, although car wheels was turned. Also the steering isn't real enough, maybe You should turn car relative to the speed (now it looks like it would always rotate with the same speed despite the cars speed).

  10. #10
    Senior Member ozmic66's Avatar
    Join Date
    Oct 2005
    Posts
    472
    I like the movement. its very smooth (and the graphics are looking nice too)
    one thing though is that the car is skidding all over the place

    try to add some sort of resisting force by moving it perpendicularly to the direction of the wheel with the same force its moving at divided by some friction constant

    i have some code of such an experiment i did and it works pretty nicely, where each wheel has its own grip (on the road) and friction (for very smooth wheels or icy terrain) coefficients. the grip allows the car to move less if the wheels are perpendicular to the movement of the car (like a car being hit from the side) and the friction affects the movements in all directions.

    message me if you want a more detailed explenation

  11. #11
    Junior Member
    Join Date
    Oct 2005
    Posts
    13
    Thanks for all your comments thus far guys, I very much appreciate it.

    Update:
    -fixed the turning issue when you let of of accelerate
    -tweaked friction a bit
    -automated daylight/nightlight
    -add options menu(not functional at this point)
    -added functional brake lights
    -fixed hard brake issue

    Car project v0.6

    ozmic66, ill toss you a PM, this could greatly help me.

    Once again, thanks for the comments/suggestions...keep them coming!

  12. #12
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,796
    Uh oh. Something happened. The FPS dropped to 33 now. I used to get 50.

    I also just figured out what's wrong with the steering. When you let go of Left or Right, the wheels should straight out.

  13. #13
    Junior Member
    Join Date
    Oct 2005
    Posts
    13
    Yeah, I know the fps dropped. It happened when i added the automatic daylight system. Ive probably done it wrong. it basically runs a looping counter.

    Is there any other way to do this more effeciently?
    -ive tried using the users system clock to count intervals, but i couldnt get the right results, based on how the fps was affecting the code.

    and as for the steering, is you hold a steering wheel to the left or right, it should stay turned, until you let go, no?

    thanks for the comments.

  14. #14
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,796
    Quote Originally Posted by Hukt
    Yeah, I know the fps dropped. It happened when i added the automatic daylight system. Ive probably done it wrong. it basically runs a looping counter. Is there any other way to do this more effeciently?
    -ive tried using the users system clock to count intervals, but i couldnt get the right results, based on how the fps was affecting the code.
    SetInterval() maybe?

    and as for the steering, is you hold a steering wheel to the left or right, it should stay turned, until you let go, no?
    Yeah. And when you let go, the wheels should straighten out again. What does your game car do when Left Cursor or Right Cursor is let go? It stays turned.

    PS: FPS seems to be back up to 52 now.
    .

  15. #15
    Junior Member
    Join Date
    Oct 2005
    Posts
    13
    Point well taken. Thanks.

    I'll work on that straight away.

    I appreciate the FPS report. If others could do that more often now, as well, id like that. As i add more the FPS, slowly drops.

    Thanks again.

  16. #16
    God yeps's Avatar
    Join Date
    Dec 2005
    Location
    :noitacoL
    Posts
    660
    wow i wish i could do something like that

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