Search Results

Search found 307 results on 13 pages for 'projectile fish'.

Page 1/13 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • re-use '~/.profile` for Fish?

    - by Albert
    (I'm talking about the shell Fish, esp. Fish's Fish.) For Bash/ZSH, I had ~/.profile with some exports, aliases and other stuff. I don't want to have a separate config for environment variables for Fish, I want to re-use my ~/.profile. How? In The FAQ, it is stated that I can at least import those via /usr/local/share/fish/tools/import_bash_settings.py, however I don't really like running that for each Fish-instance.

    Read the article

  • problem in array of shooter sprites which contain different colour bubbles

    - by prakash s
    everyone i am developing bubble shooter game in cocos2d I have placed shooter array which contain different color bubbles like this 00000000 it is 8 bubbles array if i tap the screen, first bubbles should move for shooting the target .png .And if i again tap the screen again 2nd position bubble should move for shooting the target.png bubbles,how it will possible for me because i have already created the array of target which contain different color bubbles, here i write the code : - (void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { // Choose one of the touches to work with UITouch *touch = [touches anyObject]; CGPoint location = [touch locationInView:[touch view]]; location = [[CCDirector sharedDirector] convertToGL:location]; // Set up initial location of projectile CGSize winSize = [[CCDirector sharedDirector] winSize]; NSMutableArray * movableSprites = [[NSMutableArray alloc] init]; NSArray *images = [NSArray arrayWithObjects:@"1.png", @"2.png", @"3.png", @"4.png",@"5.png",@"6.png",@"7.png", @"8.png", nil]; for(int i = 0; i < images.count; ++i) { int index = (arc4random() % 8)+1; NSString *image = [NSString stringWithFormat:@"%d.png", index]; CCSprite*projectile = [CCSprite spriteWithFile:image]; //CCSprite *projectile = [CCSprite spriteWithFile:@"3.png" rect:CGRectMake(0, 0,256,256)]; [self addChild:projectile]; [movableSprites addObject:projectile]; float offsetFraction = ((float)(i+1))/(images.count+1); //projectile.position = ccp(20, winSize.height/2); //projectile.position = ccp(18,0 ); //projectile.position = ccp(350*offsetFraction, 20.0f); projectile.position = ccp(10/offsetFraction, 20.0f); // projectile.position = ccp(projectile.position.x,projectile.position.y); // Determine offset of location to projectile int offX = location.x - projectile.position.x; int offY = location.y - projectile.position.y; // Bail out if we are shooting down or backwards if (offX <= 0) return; // Ok to add now - we've double checked position //[self addChild:projectile]; // Determine where we wish to shoot the projectile to int realX = winSize.width + (projectile.contentSize.width/2); float ratio = (float) offY / (float) offX; int realY = (realX * ratio) + projectile.position.y; CGPoint realDest = ccp(realX, realY); // Determine the length of how far we're shooting int offRealX = realX - projectile.position.x; int offRealY = realY - projectile.position.y; float length = sqrtf((offRealX*offRealX)+(offRealY*offRealY)); float velocity = 480/1; // 480pixels/1sec float realMoveDuration = length/velocity; // Move projectile to actual endpoint [projectile runAction:[CCSequence actions: [CCMoveTo actionWithDuration:realMoveDuration position:realDest], [CCCallFuncN actionWithTarget:self selector:@selector(spriteMoveFinished:)], nil]]; // Add to projectiles array projectile.tag = 1; [_projectiles addObject:projectile]; } }

    Read the article

  • How can i force fish to save new key bindings persistently after closing a terminal window?

    - by NES
    How can i force fish to save new key bindings persistently after closing a terminal window? At the moment i have the problem: -I open a terminal window, the default shell is fish. -i add a key binding with: bind \eg functionname -it works in the terminal window -now i close terminal window -open a new terminal window, again fish is defalut shell -the binding doesn't work any longer and doesn't show up in output of fish -a

    Read the article

  • Add binding to fish that not auto executes the string?

    - by NES
    How do i set up a key binding in fish, so that fish understands not to execute the bindingstring after appending it to commandline but just appending it as string to commandline. I want to set up a binding that appends | less by pressing i.e. ALT + Y. It seems that by default fish understands the command to automatically execute. I.e. When i type ls on commandline and then would press ALT + Y it only should complete the command to look like this ls | less but still not executing it. i'm trying something like this bind \ey " \| less" But fish doesn't accept my syntax

    Read the article

  • Ikoula : les serveurs Green Fish et Crazy Fish gagnent en espace de stockage, que pensez-vous des serveurs dédiés de l'hébergeur ?

    Ikoula : les serveurs Green Fish et Crazy Fish gagnent en espace de stockage que pensez-vous des serveurs dédiés de l'hébergeur ?L'espace de stockage, les performances et le cout sont des aspects clés lorsqu'un développeur, administrateur ou tout autre professionnel de l'IT se lance dans la location d'un serveur pour ses travaux.Ikoula, tout en maintenant la même grille de prix, fait évoluer ses offres de serveurs Green Fish et Crazy Fish avec l'introduction d'un disque dur d'1 To SATA, contre...

    Read the article

  • Bind shift-tab to complete-backward in fish

    - by Sebastian
    I found myself using the auto-complete functionality of the fish-shell, where pressing tab twice or more cycles through the suggestions. But then I accidentaly pressed tab once to many, and I wanted to go back to the previous suggestion, so I pressed shift-tab, which only appended [z to the command. For example, when I type cd D<tab><tab>: ~> cd Desktop/ I press <tab>, result: ~> cd Documents/ Now when I press <shift+tab>, the prompt changes to ~> cd Documents/[Z instead of returning to the desired: ~> cd Desktop/ How do I do this (preferably using the fish_user_key_bindings.fish file)? The documentation only provides the special function complete.

    Read the article

  • How do I make Home and End work in PuTTY SSH with fish shell?

    - by endolith
    Years ago, an Ubuntu update broke this and I've never found a solution. I have fish as my default shell. Ubuntu 12.10 Locally (Gnome Terminal), Home and End keys work fine in both fish and bash. When I log in by SSH using PuTTY, then run bash, Home and End work fine inside of bash. However, when I log in by SSH using PuTTY, in the default fish shell, pressing Home key produces [1~ (sometimes erasing the line, sometimes not). When I press End, it produces [4~. How do I get Home and End to work correctly?

    Read the article

  • How to define an alias in fish shell?

    - by armandino
    I would like to define some aliases in fish. Apparently it should be possible to define them in ~/.config/fish/functions but they don't get auto loaded when I restart the shell. Any ideas? p.s. if anyone is using or has used fish in the past I'd be interested to hear your comments as to whether it offers anything that bash does not.

    Read the article

  • Calculate initial velocity of a 3d vector-based projectile

    - by Frotty
    Okay, so I got a Projectile with 2 Vectors, position and velocity. I now want to calculate the initial velocity for it in order to reach a specific point on the map. Or actually, how high has the start z-velocity to be (because x and y are probably defined by a speed variable) in order for the projectile to hit the marked position. The projectile is influenced by a constant gravity vector. All calculations are done 32 times per second. I want this, because I don't want to use a parabola function, so the projectile can still be influenced by other sources, simply adding some velocity. I didn't really find anything referring to that topic and would be glad for every helping answer, Thanks.

    Read the article

  • Swim into Fun on Your Desktop with the Tropical Fish Theme for Windows 7

    - by Asian Angel
    Do you love watching tropical fish as they swim through serene ocean waters? Then you will definitely want to download the Tropical Fish Theme for Windows 7. The theme comes with nine wallpapers filled with colorful, tropical goodness from the oceanic realms. Download the Tropical Fish Theme [Windows 7 Personalization Gallery] Amazon’s New Kindle Fire Tablet: the How-To Geek Review HTG Explains: How Hackers Take Over Web Sites with SQL Injection / DDoS Use Your Android Phone to Comparison Shop: 4 Scanner Apps Reviewed

    Read the article

  • Move projectile in direction the gun is facing

    - by Manderin87
    I am attempting to have a projectile follow the direction a gun is facing. When using the following code I am unable to make the projectile go in the right direction. float speed = .5f; float dX = (float) -Math.cos(Math.toRadians(degree)) * speed; float dY = (float) Math.sin(Math.toRadians(degree)) * speed; Can anyone tell me what I am doing wrong? The degree is the direction the gun is facing in degree's.

    Read the article

  • Difficulty with projectile's tracking code

    - by RCIX
    I wrote some code for a projectile class in my game that makes it track targets if it can: if (_target != null && !_target.IsDead) { Vector2 currentDirectionVector = this.Body.LinearVelocity; currentDirectionVector.Normalize(); float currentDirection = (float)Math.Atan2(currentDirectionVector.Y, currentDirectionVector.X); Vector2 targetDirectionVector = this._target.Position - this.Position; targetDirectionVector.Normalize(); float targetDirection = (float)Math.Atan2(targetDirectionVector.Y, targetDirectionVector.X); float targetDirectionDelta = targetDirection - currentDirection; if (MathFunctions.IsInRange(targetDirectionDelta, -(Info.TrackingRate * deltaTime), Info.TrackingRate * deltaTime)) { Body.LinearVelocity = targetDirectionVector * Info.FiringVelocity; } else if (targetDirectionDelta > 0) { float newDirection = currentDirection + Info.TrackingRate * deltaTime; Body.LinearVelocity = new Vector2( (float)Math.Cos(newDirection), (float)Math.Sin(newDirection)) * Info.FiringVelocity; } else if (targetDirectionDelta < 0) { float newDirection = currentDirection - Info.TrackingRate * deltaTime; Body.LinearVelocity = new Vector2( (float)Math.Cos(newDirection), (float)Math.Sin(newDirection)) * Info.FiringVelocity; } } This works sometimes, but depending on the relative angle to the target projectiles turn away from the target instead. I'm stumped; can someone point out the flaw in my code?

    Read the article

  • implementing gravity to projectile - delta time issue

    - by Murat Nafiz
    I'm trying to implement a simple projectile motion in Android (with openGL). And I want to add gravity to my world to simulate a ball's dropping realistically. I simply update my renderer with a delta time which is calculated by: float deltaTime = (System.nanoTime()-startTime) / 1000000000.0f; startTime = System.nanoTime(); screen.update(deltaTime); In my screen.update(deltaTime) method: if (isballMoving) { golfBall.updateLocationAndVelocity(deltaTime); } And in golfBall.updateLocationAndVelocity(deltaTime) method: public final static double G = -9.81; double vz0 = getVZ0(); // Gets initial velocity(z) double z0 = getZ0(); // Gets initial height double time = getS(); // gets total time from act begin double vz = vz0 + G * deltaTime; // calculate new velocity(z) double z = z0 - vz0 * deltaTime- 0.5 * G * deltaTime* deltaTime; // calculate new position time = time + deltaTime; // Update time setS(time); //set new total time Now here is the problem; If I set deltaTime as 0.07 statically, then the animation runs normally. But since the update() method runs as faster as it can, the length and therefore the speed of the ball varies from device to device. If I don't touch deltaTime and run the program (deltaTime's are between 0.01 - 0.02 with my test devices) animation length and the speed of ball are same at different devices. But the animation is so SLOW! What am I doing wrong?

    Read the article

  • Fish Interactive Shell full path

    - by Milhous
    Is there a way in the Fish Interactive shell for the full path to be displayed. Currently when I navigate to a directory I get the following shell. millermj@Dodore ~/o/workspace but I would rather see millermj@Dodore ~/o-town/workspace

    Read the article

  • How do I set the title of Terminal.app with the fish shell?

    - by lorin
    I'm trying the fish shell in Mac OS X, intalled using MacPorts. I'd like to have the title of my Terminal window be my current directory. Currently, the title just says Terminal - fish - 80x24 According to the fish documentation, the default fish_title function should provide this behavior. It doesn't do the right thing in Terminal.app, although it does work with iTerm. Defining my own fish_title function doesn't fix the problem. Has anybody been able to get this to work?

    Read the article

  • Game Guide to Purchasing Items in Fish Isle

    There are many things you can purchase in Fish Isle like decorations, buildings, trees, and animals. This Fish Isle guide will show you how to purchase items, but it will also show you how to do thin... [Author: Jake Clark - Computers and Internet - April 17, 2010]

    Read the article

  • Who should respond to collision: Unit or projectile?

    - by aleguna
    In an RTS if a projectile hits a unit. Who should handle the collision? If projectile handles the collision, it must be aware of all possible types of units, to know what damage to inflict. For example a bullet will likely kill a human, but it will do nothing to a tank. The same goes if unit handles a collision. So either way one of them should be aware of all possible types of the other. Of course the 'true' way would be to do full physics simulation, but that's not an option for an RTS with 1000s of units and projectiles... So what are the common practicies in this regards?

    Read the article

  • Aligning a link to the bottom right of a table...in css

    - by IP
    I need to align "Click here" to the bottom right of this table...but in CSS it seems impossible Adding the link as a row or into the footer of the table is no an option <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title></title> <style type="text/css"> #link { float:right; } div { border:solid black; } table { border: solid red; } </style> </head> <body> <div> <table> <tr> <td>Fish fish fish fish fish fish fish fish fish fish fish fish fish fish fish fish fish fish fish fish fish</td> </tr> </table> <a href="." id="link">Click me</a> </div> </body> </html> Any ideas?

    Read the article

  • Projectile Rotation

    - by Alex
    I'm trying to add a projectile system like the projectiles in Realm Of The Mad God. (YouTube it to see what I mean) These projectiles seem to move according to their rotation perfectly and can have nearly any rotation. They also have near perfect hitboxing. What's the maths behind this? My Game works on an integer-based coordinate system, but at the moment projectiles can only shoot either 0, 45, 90, 135, 180, 225, 270 and 315 degrees.

    Read the article

  • Fish Isle Guide to Saving Time When Fishing

    This is a guide to show you how to save time while you are fishing in Fish Isle. This is done by using your options under the multi tool. You have three options which include catching, releasing, and... [Author: Jake Clark - Computers and Internet - April 21, 2010]

    Read the article

  • Lag compensation of projectile shooting game

    - by Denis Ermolin
    I'm thinking about an algorithm for firing projectiles with lag compensation. Now I did find only one descent solution: Player hits fire button. Client sends input "fire". Client waits for server response. Server generates bullet then sends response to client. Client recieves response and finally fires projectile. Is this solution only "trueway"? I find it the only one that can be fair to all of the clients. Valve in this case, doesn't compensate lag from rocket shots. I am feeling that I will not compensate it, too. I think that with today's bandwidth I can close my eyes on this problem, because I don't see any solutions with fair logic. What do you think?

    Read the article

  • Find angle for projectile to meet target in parabolic arc

    - by TheBroodian
    I'm making a thing that launches projectiles in 2D. Its projectiles are fired with a set initial velocity, and are only affected by gravity. Assuming that its target is within range, and that there aren't any obstacles, how would my thing find the appropriate angle at which to launch its projectile (in radians)? The equation for this is found here: Wikipedia: Angle Required to Hit Coordinate Sadly, I'm not a physicist (a.k.a. can't read smart people math) and am having a hard time reading its breakdown. If not only for the sake of anybody else that might read this other than myself, would anybody be kind enough to break the equation down into baby words please?

    Read the article

  • Differences between fish and bash to pass commandline arguments to alias functions?

    - by NES
    From the answers to my other question here i learned about the possibility to pass commandline arguments to a alias function in Bash. In Fish i can edit an alias by editing the file config.fish in ~/.config/fish directory and adding a line like this alias lsp='ls -ah --color=always | less -R;' and it works perfectly. This should be the equivalent to editing ~/.bash_aliases in bash But when i try to setup an alias function to pass arguments like this alias lsp='_(){ ls -ah --color=always $* | less -R; }; _' it doesn't work for fish? Are there any differences between fish and bash in the way to setup an alias to pass commandline arguments that prevent this second alias from working with fish instead of bash?

    Read the article

  • SQLBeat Podcast – Episode 4 – Mark Rasmussen on Machine Guns,Jelly Fish and SQL Storage Engine

    - by SQLBeat
    In this this 4th SQLBeat Podcast I talk with fellow Dane Mark Rasmussen on SQL, machine guns and jelly fish fights; apparently they are common in our homeland. Who am I kidding, I am not Danish, but I try to be in this podcast. Also, we exchange knowledge on SQL Server storage engine particulars as well as some other “internals” like password hashes and contained databases. And then it just gets weird and awesome. There is lots of background noise from people who did not realize we were recording. And I call them out and make fun of them as they deserve; well just one person who is well known in these parts. I also learn the correct (almost) pronunciation of “fjord”. Seriously, a word with an “F” followed by a “J”. And there are always the hippies and hipsters to discuss. Should be fun.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >