Go Back   kirupaForum > Flash > Game/AI Programming

Reply
 
Thread Tools Display Modes
Old 09-08-2009, 02:43 AM   #1
ash_at_risk
Registered User
chasing game

hello friends ,
I am trying to develop a game where our car(yellow) is chased by enemy car(green) , if enemy car catches us , game over but i am unable to figure out ,how i can make it feasible to make enemy car to catch us.
One way i think to make it possible is that i have implemented the bezier tween throughout the track, pause the tween if enemy Car hits our car for 2-3 seconds , game over if time exceeds & no car movement is detected from player side, but how can i get the player car position at any instant of time?
but If i get it by any means , the tween of the enemy start from begining every time the coordinate of car position is passed onto enemy Tween function
Please guide me
i have attached the required files
Attached Files
File Type: zip Game.zip (141.7 KB, 21 views)
ash_at_risk is offline   Reply With Quote

Sponsored Links (Guests Only) - Register | Need Help?
 

Old 10-05-2009, 09:27 PM   #2
Lou
Flash Novice
 
Lou's Avatar
Location Willits, Ca. USA

Posts 142
Hello ash, trying to create this game using tweens on the timeline will be a big headache. What you should do is look into using movieclips and actionscript.

There are a few great game-making tutorials listed in the sticky of game/ai programming: http://www.kirupa.com/forum/showthread.php?t=43182

I would recommend these to get started:

• Kirupa AS1 OOP
http://www.kirupa.com/developer/oop/index.htm

• Tile Based Games by TONYPA
http://www.tonypa.pri.ee/tbw/index.html

__________________

Lou is offline   Reply With Quote
Old 10-07-2009, 11:26 AM   #3
TOdorus
Hot 'n Funky
 
TOdorus's Avatar
Location Nijmegen, Netherlands

Posts 390
Quote:
Originally Posted by ash_at_risk View Post
but how can i get the player car position at any instant of time?
but If i get it by any means , the tween of the enemy start from begining every time the coordinate of car position is passed onto enemy Tween function
Just get it fromt he mc? You have given the yellow car movieclip the name "car", so it would be as simple as:
Code:
var playerCurrentX = car.x
var playerCurrentY = car.y
ofcourse you don't need to use the two variables playerCurrentX and playerCurrentY as you can just reference to the car directly.

__________________
Blog: Vipe Games updated 3 dec 2009
TOdorus is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:21 AM.

SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple. flash components
Creative web apps. Make your own free flash banners and photo slideshows.
Check out the great, high-quality flash extensions. Buy or sell stock flash, video, audio and fonts for as little as 50 cents at FlashDen.

Flash Transition Effects

Flash Effect Tutorials

Digicrafts Components
Flash effects. Art without coding. Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com
Streamsolutions Content Delivery Networks Flipping Book - page flip flash component.
Flash-Gallery.com - Get your flash photo gallery (flash component or swf gallery Learn how to advertise on kirupa.com
 

cdn
content delivery network (cdn)

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Copyright 2010 - kirupa.com Copyright 2010 - kirupa.com