473,480 Members | 2,001 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

boundry collision problem

1 New Member
Dear readers, I am currently making a flash based role playing game, I use flash 8 basic. I am using very simple code to deal with collisions.
while (_root.wall.hitTest(_root.pc._x-pc_radius, pc._y, true)) {
now first off pc stands for the player character. Second off when you move him instead of him moving everything else moves to create a scrolling world! Now the source code I used had this exact same code. As you guessed there are four of these bits of code each adjusting to a diffrent side from wich the pc can collide with the wall. Simple enough. In his game the wall was one big movie clip that the player was in, he then hollowed it out to make rooms and hallways. Now when you hit this wall it moves the charecter in a ++ or -- fashion according to where he collided. It works just fine. But in mine I do just the same thing but instead of the charcter moving everything else does to create a scrolling world.
When the pc in my game hits a wall he is bounced to the very edge of the movie clip this end depends on wich side he hit the wall. Do I really have to create hundreds of small sqaure shaped movie clips that make up the walls of the game or can I use just one movie clip or is there a way to clone the properties of that one small sqaure so that I could cut and paste it around the screen and have each one run on the same code like in java
Mar 23 '08 #1
0 1604

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

Similar topics

1
4188
by: Chris Foote | last post by:
Today I happened to accidentally name one of my project's files 'email.py', which collides with the module of the same name in Python's standard library: from email.MIMEText import MIMEText ...
3
3159
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...
4
3283
by: Dave | last post by:
Hi folks, I am trying to develop a routine that will handle sphere-sphere and sphere-triangle collisions and interactions. My aim is to develop a quake style collision engine where a player can...
17
2651
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...
1
2083
by: Bryan Bullard | last post by:
hi, how does one align a static struct to a 4kb boundry? thanks, bryan
4
1740
by: Brian Basquille | last post by:
Hello all, Well, we've gotten to it: the real meaty area of my Air Hockey game.. Any help or suggestions for the following would be much appreciated. In plain terms: My paddle needs to be...
4
2745
by: king | last post by:
I have an application which links to a 3rd-party shared library(say a) and dlopens another one(say b). And each of those 3rd party shared libraries requires another shared library respectively(say...
0
2151
by: licombo | last post by:
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...
2
2774
by: Rolf | last post by:
Hello- I’m integrating blogging software (www.b2evolution.net) into my app and have run into a namespace-collision problem. In my code, I’ve defined a User class, and so have the b2evolution...
1
9536
by: May Amor | last post by:
Helu gurus!!! I have a code below about hashing method with collision resolution...My problem is how to use the collsion resolution again if the hash index though has already a value. Please kinda...
0
7048
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,...
0
6911
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...
0
7091
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...
1
6743
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...
0
5344
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4488
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...
0
2999
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2988
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
185
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...

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.