Daily Archives

Articles indexed Sunday November 3 2013

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

  • I get the following error when i open any progaram in vi please help me

    - by Adithya Chakilam
    E325: ATTENTION Found a swap file by the name ".ptr.c.swp" owned by: honey dated: Sat Oct 26 12:49:38 2013 file name: ~honey/ptr.c modified: YES user name: honey host name: honey-desktop process ID: 2542 While opening file "ptr.c" dated: Sun Nov 3 09:05:49 2013 NEWER than swap file! (1) Another program may be editing the same file. If this is the case, be careful not to end up with two different instances of the same file when making changes. Quit, or continue with caution. (2) An edit session for this file crashed. If this is the case, use ":recover" or "vim -r ptr.c" to recover the changes (see ":help recovery"). If you did this already, delete the swap file ".ptr.c.swp" to avoid this message. "ptr.c" 9L, 136C Press ENTER or type command to continue

    Read the article

  • Up, down, right arrow keys and delete key not working

    - by user210780
    I have already read Delete and arrow keys not working and tried what is written there. I have also tried restarting my computer. I have also searched elsewhere for answers, but I haven't found any solution. I am using Ubuntu 12.04, and there were not problems yesterday, but for the last hour, I've had the following problem. When I press the up or the right arrow, nothing happens. When I press the down arrow, it doesn't make anything go down, but something appears in the upper right corner of my screen: http://i.imgur.com/pmnFOCD.png When I press the delete key, nothing gets deleted, but something appears in the upper right corner of my screen: http://i.imgur.com/Wu9czel.png The left arrow still works. Can anybody help me get my three arrow keys and delete key back?

    Read the article

  • Bluetooth Issues Ubuntu 13.10

    - by Eduardo
    I have a bluetooth headset which works perfectly on Ubuntu 13.04. Now I update to 13.10, and here is what's happing: After installing blueman, bluetooth-suport, pulseaudio-module-bluetooth and so on, I can find my device, pair it and connect to the headset service. But the device does not appear on the Sound Settings, so I just can't select it as input/output device. In other words, it's connected but "useless". So, searching around for solutions, I found a software called stream2ip. With this I can connect the device and it appears on the Sound Settings, the sound plays on the device as well, but I microphone does not work, even when selected on the settings, also the A2DP option still not working. Stream2ip isn't a solution at all, I mean everything was working without it in the previous Ubuntu version. Maybe I'm missing something, and I hope someone could give me any hint. And formally, the question: How can I get the A2DP output option and the input working again, on the Ubuntu 13.10? Thanks!

    Read the article

  • Probably the dumbest and poitnless question to ask

    - by Anthony Adams
    How can I dual boot this with Windows 8? I've tried to burn to a CD, never have a enough memory or the program tells me that the CD isn't writable. So, I want to run from USB. But I never understood how to run the program from the USB, how to download it on to the USB and how to set up the computer to run the USB before the Hard Drive. I am a beginner trying to learn Linux, if any one could help a newbie like me, that would be much appreciated.

    Read the article

  • cuda install in ubuntu13.10?

    - by hexiangpeng
    the cuda_install_.log show ERROR: Unable to build the NVIDIA kernel module. ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com. The driver installation is unable to locate the kernel source. Please make sure that the kernel source packages are installed and set up correctly. and the other .log show ^ /tmp/selfgz3964/NVIDIA-Linux-x86-319.37/kernel/nv-i2c.c: In function ‘nv_i2c_del_adapter’: /tmp/selfgz3964/NVIDIA-Linux-x86-319.37/kernel/nv-i2c.c:327:14: error: void value not ignored as it ought to be osstatus = i2c_del_adapter(pI2cAdapter); ^ make[3]: * [/tmp/selfgz3964/NVIDIA-Linux-x86-319.37/kernel/nv-i2c.o] ?? 1 make[2]: * [module/tmp/selfgz3964/NVIDIA-Linux-x86-319.37/kernel] ?? 2 NVIDIA: left KBUILD. nvidia.ko failed to build! make[1]: * [module] ?? 1 make: * [module] ?? 2 - Error. ERROR: Unable to build the NVIDIA kernel module. ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com. i don't understand

    Read the article

  • No sound on fresh install of 13.10

    - by Totalnon
    I installed a new copy of 13.10 today and cannot get my audio to work. Speakers test good on other devices, enabled in the BIOS, worked this morning in a Windows environment. I ran all of the available updates through apt-get. aplay -l lists my card (which tells me Ubuntu recognizes the hardware, I have been looking around the web and trying various things to no avail. Pulse folder permissions seem fine, I've reinstalled ALSA, and the card shows both digital and analog in the system settings sound section. I have tried this guide: Sound Troubleshooting Guide As well as looked through these forums under the tags sound and 13.10 Anyone have any ideas that may help me?

    Read the article

  • Some problems with the keyboard layout

    - by user203053
    When I press some keys, sometimes some letters are replaced by others. For example e is replaced with "0we" and c with "x9a". Also other keys are changed. My keyboard layout is actually German. But whenever this problem occurs, it changes to English and I cannot change it back. Occasionally everything works fine. How do I find out whether the keyboard is damaged or just some settings are not right?

    Read the article

  • After upgrading to 13.10, biblatex and biber are not compiling my references

    - by Lewelma
    I am working on a thesis using LaTeX, with my references relying on biblatex-apa. Ubuntu 13.04 provided all my LaTeX needs. But after upgrading to 13.10, the biblatex / biber combo will no longer compile my APA-style references. No other changes have been made to my documents or references -- and the rest of the document appears fine (albeit with broken references and no bibliography). I found reference to a possible cause -- which is that biblatex 1.7-1 is incompatible with texlive 2013 (as available through the 13.10 repositories) -- and that issue may be fixed by biblatex 2.7a-1 which has been committed upsteam in Debian. See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718244 However, that doesn't help me much, as I need to compile my references quite soon. How can I get my references to compile in the meantime? Is there a patched biblatex or biber that I can manually slot in place? Is the upstream fix on its way? or do I need to go to TexLive and do a replacement install directly (which is not my preference). Thanks!

    Read the article

  • Suddely internet is not accessible

    - by user189708
    I am going crazy here. One day everything was working fine. I turned pc off and went to sleep. Next day turn pc on and cannot access internet (from any browser). The situation is: I cannot open any webpage from browser (tried Firefox and Epiphany) and cannot receive emails in thunderbird. BUT if I run firefox from console as sudo, I can use it as usual. I can access Skype and pretty much any other network stuff (like installing software with apt-get etc.), also if I use Astrill VPN software I can access webpages even running without sudo. I haven't install any software or anything like that for several days = I have not a clue what could cause this. Just by the way, other Win PC in our home has no issue. Here is what I have tried to fix this: I have tried to restart my pc, router, modem - multiple times I have tried to change permissions to my firefox profile I have tried to completely re-install firefox and start with blank profile, thus no addons I have tried to change /etc/resolv.conf to an IP of my router (it was 127.0.1.1) I have tried to change my hostname (from tomino-NB to tominoNB) I think I might try even more stuff. None of it works. Can someone please try to help me. Thank you UPDATE 1: I have tried this: Removing resolv.conf - Didn't help Also "ping" and "dig" commands cannot resolve host UPDATE 2: I have tried to edit nameservers in resolv.conf but still no effect. I can ping router as well as I can ping outside IP. So definitely just some DNS issue. Is it possible that something is rewriting path to resolv.conf and using different file? UPDATE 3: I have just restarted PC and everything works now... resolv.conf went back to nameserver 127.0.1.1 . I have no clue what happened that it works again...

    Read the article

  • Setting PIdgin up for Lync2013

    - by Stu2000
    I having difficulty setting up pidgin to work with my company's microsoft 365's communicator lync 2013 (not 2010) account. I either receive a message stating authentication failed, or Incompatible authentication scheme chosen: NTLM depending upon the user agent values used from this wiki It appears that both the user agent values that start with UCCAPI provide authentication failed error, which I'm guessing is "closer" to the solution. I have triple checked that the password is correct. Below are some images of my settings (I have changed the company name to "company" for annonymity. I am running pidgin with a script in order to fix a write error issue: export NSS_SSL_CBC_RANDOM_IV=0 pidgin -d I am also using the latest version of SIPE (1.10.1) by using this ppa: https://launchpad.net/~aavelar/+archive/ppa What settings do I need to change/add to get it to work?

    Read the article

  • How can I make the function keys the default on a Logitech K760 Bluetooh keyboard?

    - by Chas. Owens
    I had hoped that solaar would help, but it seems to only work for the Logitech wireless devices that use Logitech's proprietary scheme. I have Bluetooth keyboard (K760). I know it can be told to use the function keys (rather than the media keys) by default because I can do it on under OS X with software from Logitech. Just remapping the keys won't work as F1, F2, and F3 are special in that they switch which Bluetooth device I connect to and the keys are not sent to the OS.

    Read the article

  • How can I properly create /dev/dvd?

    - by chazomaticus
    Certain programs look for /dev/dvd by default to find DVDs. When I first boot my computer without a DVD inserted, /dev/dvd exists and points to the correct place (/dev/sr0). However, when I insert a DVD, /dev/dvd disappears. I'd like it to stick around so I don't have to navigate to /dev/sr0 in programs that are looking for DVDs. How do I ensure that the /dev/dvd symlink exists and points to the right place? It looks like I can add something to /etc/udev/rules.d/70-persistent-cd.rules. This site gives a couple of examples, but the 70-persistent-cd.rules file says "add the ENV{GENERATED}=1 flag to your own rules", which isn't part of the examples. The man 7 udev page is impenetrable to me, and I'm not convinced the linked page gives 100% of the information I need. So, what can I do on a modern, Ubuntu 12.04 (or later) system to make /dev/dvd always exist and point to the right device? EDIT: Is it as simple as adding ENV{GENERATED}=1 to the rules in the linked page, something like this: SUBSYSTEM=="block", KERNEL=="sr0", SYMLINK+="dvd", GROUP="cdrom", ENV{GENERATED}=1 Is that the right information for modern Ubuntu? What is ENV{GENERATED} doing there, when it wasn't generated, but hand-written?

    Read the article

  • Will Google treat this JavaScript code as a bad practice?

    - by Mathew Foscarini
    I have a website that provides a custom UX experience implemented via JavaScript. When JavaScript is disabled in the browser the website falls back to CSS for the layout. To make this possible I've added a noJS class to the <body> and quickly remove it via JavaScript. <body class="noJS layout-wide"> <script type="text/javascript">var b=document.getElementById("body");b.className=b.className.replace("noJS","");</script> This caused a problem when the page loads and JavaScript is enabled. The body immediately has it's noJS class removed, and this causes the layout to appear messed up until the JavaScript code for layout is executed (at bottom of the page). To solve this I hide each article via JavaScript by adding a CSS class fix which is display:none as each article is loaded. <article id="q-3217">....</article> <script type="text/javascript">var b=document.getElementById("q-3217");b.className=b.className+" fix";</script> After the page is ready I show all the articles in the correct layout. I've read many times in Google's documentation not to hide content. So I'm worried that the Google will penalize my website for doing this.

    Read the article

  • Tracking form abandonment

    - by Alec Sanger
    I'm looking for a decent way to track form abandonment. Ideally, I would like to see how many people start filling out a form but do not complete it, as well as the last field that was filled out. The website is a fairly large Wordpress site with quite a few forms. Some of these forms are to register for events, some are for donations, some are for information requests. My first attempt at this was adding a generic jquery that bound functions to all forms on the site. When a form element was blurred, I would trigger a Google Analytics event with the name of the form, the name of the field, and whether or not it was filled. I expected to be able to go to the Event Flow section in Google Analytics and see the flow of these form events, however since there are so many forms and other events occurring on the website, Google wouldn't let me break them out very well. The other issue was the Quform doesn't name their fields anything relevant, and it doesn't look like we can name them ourselves. This results in a lot of ugly form names that don't mean anything without cross-referencing the actual form. Does anybody have any suggestions on how I can achieve more usable form abandonment metrics in a scenario like this?

    Read the article

  • Domain mapping issues

    - by Nadya
    I have two domain names - .com & .co.uk bought with 123-reg and just one student Windows hosting pack associated with the .co.uk domain. The .com domain is the main one which people would be trying to access, so I just mapped the domain to the hosting this morning. The problem is that I would really like it to be functional by tomorrow morning and the usual waiting time is 24-48 hours. Is there point in stopping the process and trying with forward it with CNAME record instead, does it take less time? (I can just go back and do proper domain mapping during the weekend) Also, is there a possible way to check whether the domain mapping has been done correctly before these 24-48 hours? From some computers I get 404 Error on homepage.

    Read the article

  • Can't create site connection in Contribute. Adminstrator account removed from domain

    - by tribus
    I have been tasked with administering several sites through Contribute. The previous administrator has since left and his domain account was removed. I believe I had been set up as an additional admin on these sites previously. However, when I attempt to create a connection through "My Connections" in Contribute using SFTP and my credentials, I get the following error: I have verified that I have read/write access to these sites through FTP. How can I take control of these sites through Contribute so that I can start administering them? Is this related to the removal of the previous admin's account?

    Read the article

  • How to point GoDaddy to EntryDNS domain

    - by geminiCoder
    I have a server connected via dynamic IP. I have set up EntryDNS to manage the change of my IP. If I put in my EntryDNS URL it points me to my server's current IP. I purchased a domain from GoDaddy, but I have been unable to get it to point to my EntryDNS. What I want is to be able to ssh to my server, but ideally I'd like to do this by using my domain name. I must confess I'm a bit overwhelmed by the GoDaddy interface. So the bottom line is, how do I point my GoDaddy domain to my DNS domain so that when I look up the domain I get the current IP of the server?

    Read the article

  • Is there an app/script I can deploy to enable my users to change their own LDAP passwords?

    - by Tom Wright
    I've recently enabled LDAP based authentication on my domain. This has allowed us to use a single set of credentials to administer the blog, the forum and the wiki. Unfortunately, this has come at the cost of users being able to change their own passwords. Ideally, users would be able to visit a page (i.e. mydomain.com/account), authenticate and then change their password. Does anyone know of a script or app that will allow me to do this quickly and easily? I guess it wouldn't be hard to write in PHP, but I'd prefer not to have the hassle.

    Read the article

  • Normal maps red in OpenGL?

    - by KaiserJohaan
    I am using Assimp to import 3d models, and FreeImage to parse textures. The problem I am having is that the normal maps are actually red rather than blue when I try to render them as normal diffuse textures. http://i42.tinypic.com/289ing3.png When I open the images in a image-viewing program they do indeed show up as blue. Heres when I create the texture; OpenGLTexture::OpenGLTexture(const std::vector<uint8_t>& textureData, uint32_t textureWidth, uint32_t textureHeight, TextureType textureType, Logger& logger) : mLogger(logger), mTextureID(gNextTextureID++), mTextureType(textureType) { glGenTextures(1, &mTexture); CHECK_GL_ERROR(mLogger); glBindTexture(GL_TEXTURE_2D, mTexture); CHECK_GL_ERROR(mLogger); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, textureWidth, textureHeight, 0, glTextureFormat, GL_UNSIGNED_BYTE, &textureData[0]); CHECK_GL_ERROR(mLogger); glGenerateMipmap(GL_TEXTURE_2D); CHECK_GL_ERROR(mLogger); glBindTexture(GL_TEXTURE_2D, 0); CHECK_GL_ERROR(mLogger); } Here is my fragment shader. You can see I just commented out the normal-map parsing and treated the normal map texture as the diffuse texture to display it and illustrate the problem. As for the rest of the code it interacts as expected with the diffuse textures so I dont see a obvious problem there. "#version 330 \n \ \n \ layout(std140) uniform; \n \ \n \ const int MAX_LIGHTS = 8; \n \ \n \ struct Light \n \ { \n \ vec4 mLightColor; \n \ vec4 mLightPosition; \n \ vec4 mLightDirection; \n \ \n \ int mLightType; \n \ float mLightIntensity; \n \ float mLightRadius; \n \ float mMaxDistance; \n \ }; \n \ \n \ uniform UnifLighting \n \ { \n \ vec4 mGamma; \n \ vec3 mViewDirection; \n \ int mNumLights; \n \ \n \ Light mLights[MAX_LIGHTS]; \n \ } Lighting; \n \ \n \ uniform UnifMaterial \n \ { \n \ vec4 mDiffuseColor; \n \ vec4 mAmbientColor; \n \ vec4 mSpecularColor; \n \ vec4 mEmissiveColor; \n \ \n \ bool mHasDiffuseTexture; \n \ bool mHasNormalTexture; \n \ bool mLightingEnabled; \n \ float mSpecularShininess; \n \ } Material; \n \ \n \ uniform sampler2D unifDiffuseTexture; \n \ uniform sampler2D unifNormalTexture; \n \ \n \ in vec3 frag_position; \n \ in vec3 frag_normal; \n \ in vec2 frag_texcoord; \n \ in vec3 frag_tangent; \n \ in vec3 frag_bitangent; \n \ \n \ out vec4 finalColor; " " \n \ \n \ void CalcGaussianSpecular(in vec3 dirToLight, in vec3 normal, out float gaussianTerm) \n \ { \n \ vec3 viewDirection = normalize(Lighting.mViewDirection); \n \ vec3 halfAngle = normalize(dirToLight + viewDirection); \n \ \n \ float angleNormalHalf = acos(dot(halfAngle, normalize(normal))); \n \ float exponent = angleNormalHalf / Material.mSpecularShininess; \n \ exponent = -(exponent * exponent); \n \ \n \ gaussianTerm = exp(exponent); \n \ } \n \ \n \ vec4 CalculateLighting(in Light light, in vec4 diffuseTexture, in vec3 normal) \n \ { \n \ if (light.mLightType == 1) // point light \n \ { \n \ vec3 positionDiff = light.mLightPosition.xyz - frag_position; \n \ float dist = max(length(positionDiff) - light.mLightRadius, 0); \n \ \n \ float attenuation = 1 / ((dist/light.mLightRadius + 1) * (dist/light.mLightRadius + 1)); \n \ attenuation = max((attenuation - light.mMaxDistance) / (1 - light.mMaxDistance), 0); \n \ \n \ vec3 dirToLight = normalize(positionDiff); \n \ float angleNormal = clamp(dot(normalize(normal), dirToLight), 0, 1); \n \ \n \ float gaussianTerm = 0.0; \n \ if (angleNormal > 0.0) \n \ CalcGaussianSpecular(dirToLight, normal, gaussianTerm); \n \ \n \ return diffuseTexture * (attenuation * angleNormal * Material.mDiffuseColor * light.mLightIntensity * light.mLightColor) + \n \ (attenuation * gaussianTerm * Material.mSpecularColor * light.mLightIntensity * light.mLightColor); \n \ } \n \ else if (light.mLightType == 2) // directional light \n \ { \n \ vec3 dirToLight = normalize(light.mLightDirection.xyz); \n \ float angleNormal = clamp(dot(normalize(normal), dirToLight), 0, 1); \n \ \n \ float gaussianTerm = 0.0; \n \ if (angleNormal > 0.0) \n \ CalcGaussianSpecular(dirToLight, normal, gaussianTerm); \n \ \n \ return diffuseTexture * (angleNormal * Material.mDiffuseColor * light.mLightIntensity * light.mLightColor) + \n \ (gaussianTerm * Material.mSpecularColor * light.mLightIntensity * light.mLightColor); \n \ } \n \ else if (light.mLightType == 4) // ambient light \n \ return diffuseTexture * Material.mAmbientColor * light.mLightIntensity * light.mLightColor; \n \ else \n \ return vec4(0.0); \n \ } \n \ \n \ void main() \n \ { \n \ vec4 diffuseTexture = vec4(1.0); \n \ if (Material.mHasDiffuseTexture) \n \ diffuseTexture = texture(unifDiffuseTexture, frag_texcoord); \n \ \n \ vec3 normal = frag_normal; \n \ if (Material.mHasNormalTexture) \n \ { \n \ diffuseTexture = vec4(normalize(texture(unifNormalTexture, frag_texcoord).xyz * 2.0 - 1.0), 1.0); \n \ // vec3 normalTangentSpace = normalize(texture(unifNormalTexture, frag_texcoord).xyz * 2.0 - 1.0); \n \ //mat3 tangentToWorldSpace = mat3(normalize(frag_tangent), normalize(frag_bitangent), normalize(frag_normal)); \n \ \n \ // normal = tangentToWorldSpace * normalTangentSpace; \n \ } \n \ \n \ if (Material.mLightingEnabled) \n \ { \n \ vec4 accumLighting = vec4(0.0); \n \ \n \ for (int lightIndex = 0; lightIndex < Lighting.mNumLights; lightIndex++) \n \ accumLighting += Material.mEmissiveColor * diffuseTexture + \n \ CalculateLighting(Lighting.mLights[lightIndex], diffuseTexture, normal); \n \ \n \ finalColor = pow(accumLighting, Lighting.mGamma); \n \ } \n \ else { \n \ finalColor = pow(diffuseTexture, Lighting.mGamma); \n \ } \n \ } \n"; Why is this? does normal-map textures need some sort of special treatment in opengl?

    Read the article

  • Precision loss when transforming from cartesian to isometric

    - by Justin Skiles
    My goal is to display a tile map in isometric projection. This tile map has 25 tiles across and 25 tiles down. Each tile is 32x32. See below for how I'm accomplishing this. World Space World Space to Screen Space Rotation (45 degrees) Using a 2D rotation matrix, I use the following: double rotation = Math.PI / 4; double rotatedX = ((tileWorldX * Math.Cos(rotation)) - ((tileWorldY * Math.Sin(rotation))); double rotatedY = ((tileWorldX * Math.Sin(rotation)) + (tileWorldY * Math.Cos(rotation))); World Space to Screen Space Scale (Y-axis reduced by 50%) Here I simply scale down the Y value by a factor of 0.5. Problem And it works, kind of. There are some tiny 1px-2px gaps between some of the tiles when rendering. I think there's some precision loss somewhere, or I'm not understanding how to get these tiles to fit together perfectly. I'm not truncating or converting my values to non-decimal types until I absolutely have to (when I pass to the render method, which only takes integers). I'm not sure how to guarantee pixel perfect rendering precision when I'm rotating and scaling on a level of higher precision. Any advice? Do I need to supply for information?

    Read the article

  • How do I duplicate a Box2d simulation, mid-simulation?

    - by Whyte
    I want to serialize the state mid-game, send it over the network to an identical computer (same CPU, same OS, same binary), load it there, and have the two games run in tandem doing the exact same simulation, without one of them drifting off and going haywire. In short: I want pop-in, pop-out networking support on my HIGHLY physics-intensive game, where sending object coordinates every few seconds is impossible, due to having thousands of objects, and many clients. I tried this with Box2D, and saving an object's location/velocity/etc wasn't enough... there's internal state that's not accessible through any public methods. My current workaround is to force EVERY client to save its entire worldstate and reload it from scratch, whenever a new player connects... but this is obviously bad practice, because it hangs the game for everyone whenever someone new connects. However, it works, with zero desynchronization. So, anyone know of any other techniques that can help me? Or should I just kiss my project goodbye?

    Read the article

  • How to tile multiple procedurally generated textures?

    - by Burhuc
    I'm trying to develop a procedural tile generator for a game, mostly for the ground tiles, instead of using "hand-drawn" tiles. To achieve this I'm using Perlin noise and a sine wave with multiple parameters, which already gives me pretty nice results. I don't want to generate 1 tile and repeat that one forever for one ground type, but I want to avoid recurrences, so I'm generating n different tiles. The problem I'm having now is that I want to tile the generated textures (smooth transitions). At the moment I have this: 4 256x256 textures. I thought a simple method would be to just add the positions of the different tiles to the noise generation algorithm, so that, when creating the 4 256x256 textures, it would behave like it would create a 512x512 texture, but that somehow didn't work as intented. So how can I tile those textures?

    Read the article

  • Seek Steering Behavior with Target Direction for Group of Fighters

    - by SebastianStehle
    I am implementing steering algorithms with group management for spaceships (fighters). I select a leader and assign the target positions for the other spaceships based on the target position of the leader and an offset. This works well. But when my spaceships arrive they all have a different direction. I want them to keep to look in the same direction (target - start). I also want to combine this behavior with a minimum turning radius that is based on the speed. The only idea I have is to calculate a path for each spaceship with an point before the target position, so the ships have some time left to turn into the right position. But I dont know if this is a good idea. I guess there will be a lot of rare cases where this can cause a problem. So the question is, if anybody knows how to solve this problem and has some (simple code) or pseudocode for me or at least some good explanation.

    Read the article

  • Moving sprite from one vector to the other

    - by user2002495
    I'm developing a game where enemy can shoot bullets towards the player. I'm using 2 vector that is normalized later to determine where the bullets will go. Here is the code where enemy shoots: private void UpdateCommonBullet(GameTime gt) { foreach (CommonEnemyBullet ceb in bulletList) { ceb.pos += ceb.direction * 1.5f * (float)gt.ElapsedGameTime.TotalSeconds; if (ceb.pos.Y >= 600) ceb.hasFired = false; } for (int i = 0; i < bulletList.Count; i++) { if (!bulletList[i].hasFired) { bulletList.RemoveAt(i); i--; } } } And here is where i get the direction (in the constructor of the bullet): direction = Global.currentPos - this.pos; direction.Normalize(); Global.currentPos is a Vector2 where currently player is located, and is updated eveytime the player moves. This all works fine except that the bullet won't go to player's location. Instead, it tends goes to the "far right" of the player's position. I think it might be the problem where the bullet (this.pos in the direction) is created (at the position of the enemy). But I found no solution of it, please help me.

    Read the article

  • XNA windows phone release black textures

    - by Lukasz Kajstura
    i just made a 3d game in XNA for windows phone 7. I build it in release mode on visual studio 2010 and suddenly when I run game there is no textures on models - 2 models are black and one is transparent. Models are in .X format exported from 3dsmax and have textures in .jpg also added to game content. I set build action to none and all worked fine in debug mode. When I change to release mode - black textures. When I set build action to compile it gives me warning: Asset was built 2 times with different settings: using TextureImporter and TextureProcessor using TextureImporter and TextureProcessor, referenced by... and still no textures. What can I do?

    Read the article

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