Actionscript 3 :: Improve The Realistic Movement Of The Pool Game?

Dec 15, 2010

Here is my pool game engine done in Box2dFlash.I would like to make this simulation more realistic as I received mixed opinion from pool experts.Here is my standard wall setting:

var leftWall = _sim.addBox({x:0.9, y:8.15, width: 0.6, height: 11.5, density: 0, fillAlpha: wallAlpha, lineAlpha: wallAlpha});

And of the ball:

_solidBall_7 = _sim.addCircle({x:ballPosX - (ballRadius * 5) - 0.8, y:ballPosY, radius:ballRadius, density: 0.1, linearDamping: 1, isBullet: true, restitution: 0.7, angularDamping: 5, skin: Solid_Bordo});

What other params I might try to improve the realistic movement of the pool game?

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Realistic Movement Along Path?

Jun 6, 2009

I'm making a game that involves spaceships following waypoints. Rather than making them move straight to a waypoint,turning, and then moving straight to the next one, it'd be nice to have them follow some sort of bezier curve/path along all of the waypoints.

View 4 Replies

ActionScript 3.0 :: Realistic Car/Vehicle Movement?

Mar 13, 2010

I'm attempting to recreate the old game Asteroids, just as a little project for myself (no angry clients waiting ). I'm controlling the triangle by using KeyboardEvents but while holding down the shoot button (Space Bar) I am unable to go forward and turn left, however I have no problems going forward and turning right at the same time It feels as though the keys are becoming "sticky".

View 5 Replies

ActionScript 1/2 :: Realistic Random Movement Of Multiple MovieClips?

Feb 21, 2011

here is some of my code:

// 30 fps
var humans = 30;
var hSpeed = 4;

[code].....

View 5 Replies

ActionScript 3.0 :: Flash Fire/Flame Effect With Realistic Movement?

Feb 24, 2011

Im creating a game, and I need to create a realistic flame or fire, like a torch, with fluid movement of thge flame and that moves in a natural way.

View 3 Replies

Actionscript 3 :: Flash + Box2d Pool Game Breaks Online Because Shots Are Not Transmitted Precisely?

Dec 25, 2010

I'm, working on this pool game: [URL] open it in TWO browser windows you will see that the 2 player modus starts. When you make a shot, every shot gets copied to the other player. Unfortunately it is not precise enough. The player makes the shot with this code:

[Code]..

View 2 Replies

IDE :: Leg Movement Conditional Statement For Game

Oct 26, 2009

I have a character in a game that moves in accordance with keyboard commands.. I'd like to have it so that when the character moves on the stage his legs simulate walking. Meaning.. when moving right, his legs rotate counter clockwise. But since there are two moving at the same time, one moves forward to a point while the other moves back to a point (the legs don't circle over his head), I need a conditional statement that indicates that when his leg's rotation is greater than 149, it reverses direction until its at a certain point, then moves back.. The below code is for one leg.

addEventListener(Event.ENTER_FRAME, onLoop);
function onLoop(evt:Event): void{
if (Bear.Leg.rotation >=149){
Bear.Leg.rotation -=1;}
else {Bear.Leg.rotation +=1;}

I know why this doesn't work, it passes 149 and then moves back until it's below 149 and gets stuck in a loop. I need it so that the first statement gets overrided then flips back to it later. How can I do this?

View 2 Replies

ActionScript 2.0 :: Character Movement Script For A Game?

Apr 15, 2010

I'm sorry if this is the wrong section. But I'm looking for help with my actionscript coding. I'm fairly new to Flash. I've only scripted some simple websites so far and this is the first time I try to make a flash game. I started yesterday but I'm already having problems with my script.

I have a scene with 2 layers: one with my character and one with the bounds (ground, ceiling and walls).

Inside my character movie clip, I have this: Which is basically a bunch of frames labeled and with the action to stop();. Each one containing another movie clip with the respective animations. So the idea was, when I press "A", jump to "walk left". And it kinda worked, but I have some problems and I'm not really sure how to solve them.

[Code]...

View 2 Replies

ActionScript 3.0 :: Animate A Characters Movement In A Game?

Dec 13, 2010

Im using Actionscript 3.0 and Adobe flash professional CS5 Im trying to animate a characters movement in a game im designing..Theres 8 differnt instances im going to use for the movement, I decided this upon studying NES zelda and finding his character only has 8 differnt instances for his general movement. See I want the graphics to be pixelated, just like the old games~ I like pixel games.

for example:Whenever I press the LEFT ARROW key I want two instances to switch back and forth between eachother to animate movement, and so I want it to keep doing that until movement is stopped~ as goes the same with the UP, DOWN, and RIGHT arrow keys.

View 2 Replies

ActionScript 2.0 :: Game Enemy Movement And Interaction?

Mar 17, 2008

I'm relatively new to creating games, however I've been a flash website developer (and designer) for over 7 years, and am used to OOP and AS2 Event-based programming. It was a bit tough to swallow the one-global function runs everything method but it all seems to be going fine now. The only problem I'm having right now is my math, and character movement and interaction.Also figuring out hitTests when the player punches, seeing as how you might have multiple hitTests be true, yet I want only those in the front row to receive damage.

Here's what I'm working on: http:[url].....

What I would like it to do, is for the enemies to swarm, but not walk "through" each other.Because the player only has his fists to defend himself (stipulation of the game unfortunately), they need to start far away, but then come up to the player's range and then mosy about in front of the player, jabbing him from time to time. The only thing, is that currently they look like paper dolls, because they move through each other, and the movement isn't very good either. This will allow the player to punch away their health until theirs none left, starting the new wave. my first big problem is the enemy movement and interaction with each other in a simulated 3d environment.The second would be how to get the player to deal damage to them, how can you tell that he punched the guy in the front row, etc.

View 3 Replies

ActionScript 2.0 :: Restricting Game Character's Movement?

Aug 9, 2010

1. How do I prevent my scuba diver from leaving the screen? As when i hold either up, down, left or right long enough he will leave the stage entirely.2. How can I make my sharks enter the screen at random rather than having them enter from the same position each time? Here is my code:

(FOR MY SCUBA)
onClipEvent (load) {
xspeed = 10;

[code].....

View 3 Replies

ActionScript 3 :: Isometric Grid Movement For Object In Game

Mar 4, 2011

I am currently creating a game similar to cafe world, farmville etc (social game). Would like to know how could I make an object move in an isometric direction when my mouse move. For example, when I want to build a house, I click on the house build button, and when my mouse move, I want my house object (stored in the library) to be move together with my mouse in an isometric direction. To give you all a better impression of the solution i am looking for, click on this link for a sketch: [URL]. So I want something like only when my mouse move 20 units more than the original mouse position, then my house item should move to the next grid.

View 1 Replies

Actionscript 3 :: Flash Game Ai - Path OR Automatic Movement

Aug 16, 2011

I am creating a flash game and I've hit a problem I have four objects, lets call them img1 through img4 I need them to move around a maze, witch is made up of blocks (maze.wall.block1 to block53) I have seen tutorials on creating a path however these all involve the object to be added to the stage, where as I am doing it in a as3 class. So my question is either: How can I create a path manualy on the stage, then create an object to follow the path in the as3 class, OR how can I add very simple ai to the img object to move around but change direction when the hitTestObject triggers on the maze.wall.blocks?

View 1 Replies

ActionScript 3.0 :: Flash Background Movement For Shooting Game?

Aug 30, 2011

I'm doing the shooting game. In that character should move left and right by using the arrow keys. The background is movieClip with image. The character is walking very slow sometimes. And the zombies will come automatically. Why the movement is very slow sometimes?

View 4 Replies

ActionScript 3.0 :: Puzzle Game : Movement Of Tile With Mouse And Snap?

May 4, 2011

I trying to make a game like Chicken Get Home.There a different type of levels in the game by arranging the tiles. I made the levels in the art and exported the array value by using mappy. ** How can we use the array value in our code and how to import those levels in the code
** How to move the tile with mouse only to blank position(ie like snapping to next tile)..

View 1 Replies

ActionScript 1/2 :: Adobe Flash CS5 Platform Game Movement With Arrow Keys?

Sep 9, 2010

I am a beginner to flash gaming. I am making a platform game, but  can not reverse my character when he goes backwards. This is my code for left and right: if (Key.isDown(Key.RIGHT)) {_x += speed;} if (Key.isDown(Key.LEFT)) {_x -= speed;} How Can I reverse it so when it goes LEFT, the character turns all the way around?

View 4 Replies

ActionScript 2.0 :: Keyboard Movement - Get The Characters In Flash Game To Move Diagonally

May 7, 2005

I'm trying to get the characters in this Flash game to move diagonally - it works, but the following occurs: The character is walking twice as fast as it does when going left, right, up, downThe walking animation doesn't play PHP Code:

[Code]...

View 11 Replies

ActionScript 3.0 :: Getting Objects From An Object Pool

Jul 31, 2011

I'm learning to use Object-pooling. I'm trying to see how to get objects from the start of the pool and shift all the objects at position i to i-1. I've had a look at Adobe's help file on the subject [URL] but there I'm confused.

[Code]...

View 2 Replies

ActionScript 3 :: Using Object Pool And Flash?

Jan 25, 2011

When is it a good idea to use an object pool in Flash? For example, is it a good/bad idea with bitmaps, MovieClips (with timeline animations inside of them), video, fonts?

View 1 Replies

Flash :: Object Pool Not Working?

Dec 28, 2011

I'm having trouble setting up my object pool. I created a "BallPoll" custom class to handle the pooling logic. I first call fillPool() to add 20 Ball objects into my array. Then in my document class when I want to create a Ball, I check the pool array. It isn't working and I'm not sure why.

[Code]...

View 1 Replies

Actionscript :: Object Pool Design Pattern?

Nov 22, 2010

Can anyone show an example of the object pool design pattern, as written with Actionscript 3.0?

View 1 Replies

ActionScript 3.0 :: Memory Management With An Object Pool

Sep 8, 2009

I've been trying to figure out how Flash does its memory management regarding object declarations but haven't found anything that describes declarations themselves. [code]Basically I want a pool of declared variables that get instantiated only when a certain type is set. I'd have logic in other functions that figures out what the type is and then does certain things to it, but for now I just wanted to know what kind of memory management Flash does with something like this. Does it do nothing until I actually instantiate it (= new Object()) or will space be set aside once I simply declare it (someObj:Object)?

View 2 Replies

ActionScript 3.0 :: Letting Each User Select Only 1 Item From A Pool?

Dec 4, 2011

I'm working on an 8-user app that runs over a wi-fi network using an XML socket. All of the hardware is located inside a medium sized room in a school building.At the start of the app, each user can select 1 role from a pool of 8. However, the socket connection runs at less than realtime, probably because of latency from the wi-fi, so it's possible for two users to make the same selection at the same time. How would I prevent this?

View 1 Replies

Flex :: Get An Access To A Flash Player`s Events Pool?

Sep 22, 2009

I want trace every event on every object, there is way to do it?

View 2 Replies

ActionScript 3.0 :: Pool Ball Physics With The Boundary Be A 3d Sphere

Nov 11, 2009

I'm creating a ball bouncing in 3d. My problem is that I have a square boundaries. top,bottom, front, back. I tried get the the distance ( of the sphere/radius) but went I * vx , vy , vz by 1 or -1. One of the position is - while the other two might by positive. I need pool ball physics with the boundary be a 3d sphere.

View 9 Replies

ActionScript 2.0 :: Radio Buttons Form - Pool System

Apr 20, 2007

I need a flash form script to post, by php, in sql database. The php all right exists and it works very well but I need the flash form. The form must have 3 radio buttons. The radio buttons form is a part of pool system. I create also a form in html (to check the system pool) and it works. Now I need the simple form in flash yo poste the values (A, B or C) in aby php in sql.

View 3 Replies

Actionscript 3 :: Implement An Object Pool For Flex Data/Item Renderers

Oct 6, 2010

You can hook into the creation of Flex 4 item renderers easily enough (through itemRenderer, or itemRendererFunction) allowing you to pull renderers from a custom object pool, but how would you put those renderers back into the pool?

I understand that layout virtualization does a form of object pooling, but I'd like a way to hook in to that. For example, when an itemRendererFunction has been assigned to a data group with a virtualized layout, item renderer construction is indeed deferred, but the instances are not re-used - I'd like to be able to intervene there, if possible.

But even in the case of normal virtualized renderers (where the instances are re-cycled) it would still be useful to be able to manage the pool manually. Pools could be shared between data groups, for example, to reduce the initial buffer required to populate each group.

Is there any way to know when Flex discards an item renderer instance? I have a sinking feeling that there is just no reliable way to tell - even though perhaps there should be.

View 2 Replies

Realistic Clouds In Header?

May 5, 2010

can u tell me how to do realistic clouds in this header ? i will be very greatfull for any tip (sorry for my english ) my header (i love dogs and i projecting a site about them )

View 3 Replies

ActionScript 2.0 :: Circular Movement To Linear Movement - Carousel To Conveyer Belt?

Jul 9, 2010

I've been playing with carousel code, and was wondering how to change it from circular animation (carousel) to left/right linear (conveyer belt) style animation, how to change the mover code and 't.angle = i * ((Math.PI*2)/numOfItems);'

[Code]....

View 1 Replies

ActionScript 2.0 :: [CS3] Realistic Lightbulb Swing?

Feb 7, 2009

im working on a project tats in a dark rook ive ot the lightbuld to flicker and glow but i want it to swing realsitcly across the screenas if it

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved