473,785 Members | 2,794 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question about the collision detection and score indicator......

1 New Member
I am making a flash game which is similar to the classic game Asteroids. I am stuck in the final step of the game where I have to make the collision detection working before the whole game is functioning..

My problem is I cannot figure it out how can I make the collision detection working in my game..because those asteroids are coded to appears on the stage every five seconds from the library, so I cannot give the asteroids an instance name and create the collision detection in the "normal" way, because it is not on the stage.

To simplify what I want to do is, when the spaceship hit the asteroid, the game will over (jump to the "end" scene)

Beside of that, I want to make a score indicator in my game, i want it to based on the among of time user survive, that's mean, when they surived for 3 seconds, then they will get 3 point, so how can I get the value from the timer or "timerTextField " textbox.

To simplify what I want, there is a time counter in my game, and I want to use the time counter as my score counter, that's mean, player will get 1 point every second. Until they hit by asteroid, game is over. So the longer time they survive, the higher score they can get.

Here is the attached fla file, if someone want to look at the code...
thanks a lot!

http://files-upload.com/253655/asteroid.zip.html
May 27 '07 #1
0 2170

Sign in to post your reply or Sign up for a free account.

Similar topics

3
3175
by: Thorsten Reichelt | last post by:
Hi, I'm involved in a research project on spatial prepositions. In that project we use very simple, static 3D maps that are represented in a tiny subset of x3d enriched with some few linguistic information. Until now, we home-brewed all 3D-related calculations for two reasons: First, we thought we'd get away with pretty basic and simple stuff throughout the project. Second, we didn't detect even one Python module that would support x3d...
60
7308
by: Fotios | last post by:
Hi guys, I have put together a flexible client-side user agent detector (written in js). I thought that some of you may find it useful. Code is here: http://fotios.cc/software/ua_detect.htm The detector requires javascript 1.0 to work. This translates to netscape 2.0 and IE 3.0 (although maybe IE 2.0 also works with it)
38
5089
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find out what i'm doing wrong, and so far it seems i'm doing it the right way. Here's my code...any suggestions would be appreciated. <script language="javascript"> <!-- window.open("256fx/index.htm", "", "height=400, width=600"); //-->
3
3064
by: pertheli | last post by:
Hello, I have a large array of pointer to some object. I have to run test such that every possible pair in the array is tested. eg. if A,B,C,D are items of the array, possible pairs are AB, AC, AD, BC and CD. I'm using two nested for loop as below, but it is running very slow whenever I access any data in the second loop.
1
1690
by: Tim Conkling | last post by:
I've run into a problem with a game I'm designing -- I (think) I need to do something ugly, for speed reasons, and I'm wondering if people here might have any ideas about how solve my problem more elegantly: I'm using a templated container that I created for this project that sorts objects based on a numerical value. That is, each object in the container has an integer value associated with it, and objects with lower integer values come...
8
1466
by: twoeyedhuman1111 | last post by:
Okay, I have this sample code: class a; class b; class b { public: private:
17
2676
by: Mark | last post by:
uhhmmm... not really sure how to word this. i cant get get this to compile.. i'm not sure what the proper syntax to do this is.. hopefully it's self explanatory. here's my class: ------ class TileMap { public:
3
2290
by: wandoledzep | last post by:
I have been banging my head on a wall for two days now. All I have is a picbox bouncing around the form, and I want it to react when it hits the block (another picbox). Everything works correctly except when the "ball" hits the "block" right in the ball's center, it reacts incorrectly. I know this should not be this hard. Can anyone clear this up any??? Thanks. BTW I'm working on a Breakout-type game. Here's my code: (*P.S. Nevermind the...
7
5549
by: Humakt | last post by:
This is 2D game where there are breakable boxes in the middle two bats on both sides and one or more balls breaking the boxes. Kind of like a mixup of pong and breakout. Collision detection generally works find but I have trouble when the ball is hitting corners of the box. That is particularly annoying to check especially when levels are very different of each other. This is the function where I check collision with boxes. public...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10152
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10092
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7500
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.