Search Results

Search found 5806 results on 233 pages for 'graphics'.

Page 186/233 | < Previous Page | 182 183 184 185 186 187 188 189 190 191 192 193  | Next Page >

  • How to rotate a group of objects around a common center?

    - by user1662292
    I've made a model in 3D Studio Max 9. It consists of a variety of cubes, clyinders etc. In XNA I've imported the model okay and it shows correctly. However, when I apply rotation, each component in the model rotates around it's own centre. I want the model to rotate as a single unit. I've linked the components in 3D Max and they rotate as I want in Max. protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); model = Content.Load<Model>("Models/Alien1"); } protected override void Update(GameTime gameTime) { camera.Update(1f, new Vector3(), graphics.GraphicsDevice.Viewport.AspectRatio); rotation += 0.1f; base.Update(gameTime); } protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); Matrix[] transforms = new Matrix[model.Bones.Count]; model.CopyAbsoluteBoneTransformsTo(transforms); Matrix worldMatrix = Matrix.Identity; Matrix rotationYMatrix = Matrix.CreateRotationY(rotation); Matrix translateMatrix = Matrix.CreateTranslation(location); worldMatrix = rotationYMatrix * translateMatrix; foreach (ModelMesh mesh in model.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.World = worldMatrix * transforms[mesh.ParentBone.Index]; effect.View = camera.viewMatrix; effect.Projection = camera.projectionMatrix; effect.EnableDefaultLighting(); effect.PreferPerPixelLighting = true; } mesh.Draw(); } base.Draw(gameTime); } More Info: Rotating the object via it's properties works fine so I'm guessing there's something up with the code rather than with the object itself. Translating the object also causes the objects to get moved independently of each other rather than as a single model and each piece becomes spread around the scene. The model is in .X format.

    Read the article

  • Usb stick too slow to benchmark?

    - by user85340
    I have a Core 2 Duo [email protected] with 3GB RAM. After some time using XUbuntu 10.10 on an 8GB stick I decided to switch to 12.04 and put it onto a 32GB stick (Transcend). I use an EXT4 with no journalling, noatime etc set. /tmp and /run is using tmpfs. And it is REALLY slow. MUCH slower than the old Xubuntu on the 8GB stick. Starting takes minutes, all applications "fade" because they respond too slow. I first thought that the NVidia graphics card is responsible for this, because there seem to be some known problems with that. Doing the adjustment (uncheck the sync checkbox) did not help. I believe the root cause is that the access to the USB stick is extremely slow. Running the read benchmark of the disk utility then brought the message "disk is too slow to benchmark"! BUT: When I do the same benchmark with the live CD I get around 20MB read performance and have a very responsive system! So how can I find out what is going one here?

    Read the article

  • Ubuntu 11.10 won't let me login; it kicks me back to login screen

    - by zlyfire
    I was just copying files from my external HDD to my .wine directory, when I noticed the place where the launchers are (Unity desktop) was getting fuzzy and holding onto graphics from the things in the location prior(i have it autohide when a window covers it). I assumed it was just RAM problem, so I canceled the copying, since it wasn't actually important. The glitch remained, and so did another; very slow response time. The mouse moved just fine, but windows were waiting about a minute after I hit the x button to close or even switch active window. Once again, I blamed RAM (only have 2 GBs) so I restarted. Usually, it autologs me into my account, since I'm the only user, but this time it presented me with the login screen. I thought it odd, but tried to log in. A black screen with some text pops up (assuming terminal screen) for half a second then kicks me back to the login screen. I tried the guest account and no luck. I went into terminal (alt+ctrl+f1) and logged in and it worked. I deleted .Xauthority, made new account, and even rebooted quite a few times, all to no avail. Anyone have an idea?

    Read the article

  • Bad Performance With Games Under Wine in Ubuntu 12.04

    - by Pandem
    I'm somewhat new to Linux. I've dabbled with it before but never more than just experimentation in a VM or dual boot where I almost always reverted back to Windows soon after (more due to a lack of commitment than a dislike for the OS). Anyway my problem is that in the two games (Guild Wars and Team Fortress 2) I've tried so far I get fairly bad performance. Despite both games having a "Platinum" rating I've still been forced to run both in DirectX 8, otherwise they either crash, have texture defects or the UI is missing. By "bad performance" I mean sub-30 FPS where there are some players and regular large framerate drops with video settings on low. Currently in my mind I believe the performance issues are just a problem with the drivers because my graphics card is a AMD 7850 which is virtually brand new and probably not properly supported yet but I'm unsure and would appreciate advice or tips to improve things. I have Ubuntu 12.04 installed and I am usually logged in a Gnome Classic session. I have installed AMD's proprietary drivers (Catalyst version 12.4) and have Wine 1.4 installed. I have used Winetricks to install DX9/DX10 dlls and other things.

    Read the article

  • Unity is broken after upgrading to 12.10 (Optimus laptop)

    - by SyS
    I upgraded to GNU/Linux Ubuntu 12.10 but have been unable to use Unity properly afterwards. Indeed, I encountered the exact same problem as a lot of people: the Unity side and top bars are not displaying, although in my case, Unity seems completely broken, as I can't even right-click. However, in my case, it's worth noticing that I have an Optimus laptop with a Nvidia graphics card (GeForce GT 540M). Bumblebee and its 'optirun' command is working just fine, as usual, after the upgrade. I tried several things, as resetting Compiz and Unity (with the command 'setside unity') -- which works but I have to do it everytime I boot and it resets all my settings -- updating/reinstalling/reconfiguring my Nvidia drivers as well as bumblebee, trying with Nouveau drivers instead of nvidia-current, check if linux-headers-generic were installed (they were). However, I couldn't reset xorg.conf files as they're just not there. There is neither xorg.conf file, nor its backup in /etc/X11. I think this is where the problem comes from, although I'm far from an expert. Maybe retrieving a xorg.conf file will fix this mess, but I have no idea how to do that. I'm just tired and don't know what to do. So, here I am, begging for your help.

    Read the article

  • Is there a standard way to track 2d tile positions both locally and on screen?

    - by Magicked
    I'm building a 2D engine based on 32x32 tiles with OpenGL. OpenGL draws from the top left, so Y coordinates go down the screen as they increase. Obviously this is different than a standard graph where Y coordinates move up as they increase. I'm having trouble determining how I want to track positions for both sprites and tile objects (objects that are collections of tiles). My brain wants to set the world position as the bottom left of the object and track every object this way. The problem with this is I would have to translate it to an on screen position on rendering. The positive with this is I could easily visualize (especially in the case of objects made of multiple tiles) how something is structured and needs to be built. Are there standard ways for doing this? Should I just suck it up and get used to positions beginning in the top left? Here are the OpenGL calls to start rendering: // enable textures since we're going to use these for our sprites glEnable(GL_TEXTURE_2D); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // enable alpha blending glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // disable the OpenGL depth test since we're rendering 2D graphics glDisable(GL_DEPTH_TEST); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0, WIDTH, HEIGHT, 0, 1, -1); glMatrixMode(GL_MODELVIEW); I assume I need to change: glOrtho(0, WIDTH, HEIGHT, 0, 1, -1); to: glOrtho(0, WIDTH, 0, HEIGHT, 1, -1);

    Read the article

  • Intermittent sound

    - by ej159
    The sound on my machine (Medion Akoya S5610) works intermittently. If I reboot enough times I do get sound. This happened before I upgraded, when running Oneiric too. I have fiddled around with alsa-base.conf, putting in different values for model in options snd-hda-intel model=but still the issue persists (although I get the impression that I am more like to have sound on the next reboot if I have edited that file although I can't be sure of this). Adding index=0 does not help the situation either. I have been thinking that this problem could be related some how to the order that driver modules are loaded. The snd-hda-intel module is also used for the sound card (ALC888) in my graphics card. Could it be that these are some how competing? If so, how do I add a preference when they are using the same module? This is the result of lspci -nn | grep Audio (when sound was not working): 00:1b.0 Audio device [0403]: Intel Corporation 82801I (ICH9 Family) HD Audio Controller [8086:293e] (rev 03) 01:00.1 Audio device [0403]: Advanced Micro Devices [AMD] nee ATI RV620 HDMI Audio [Radeon HD 3400 Series] [1002:aa28] I've been wrestling with this problem for ages and ages and have spent days looking for answers on forums but to no avail so I would appreciate any help you can give. Many thanks

    Read the article

  • Can anyone point me to some open source directX rendering engines or frameworks? [on hold]

    - by Jim
    I'm completely new to graphics API programmming, but not at all new to the theory and principle operation of game engines and rendering engines. That being said, I want to do some experiments of rendering very dense geometry scenes in a basic rendering engine or game engine. I don't need a lot of bells and whistles. What I need is enough control that I can implement my own scene graph algorithms and control the rendering pipeline very specifically. My ideal candidate engine would be either a rendering engine or game engine with a modular design that might be ready to go out of the box but would be simple enough in case I need to rip out some of the guts in the rendering management and implement my own. It's a tough call because I'm right at the level where it's almost better to go from scratch, but there's no sense in having to build every single basic thing such as heirarchical transforms, etc. I just want to work with rendering optimization to push dense geometry for maximum FPS. Does anyone have a suggestion for an engine or basic framework to use? I requested DirectX in my title because I figured it would likely be better supported and less likely for me to run into some obscure less-documented problem. But OpenGL might be acceptable if the recommended framework was definitely better than my other options. EDIT: I should add that I really want GPU tessellation support (part of adding to the density of geometry detail).

    Read the article

  • fresh install of ubuntu 12.04 using usb stick booted into tty1?

    - by croc
    I just installed ubuntu 12.04 alternate for the first time to give it a try using a usb stick burned with UnetBootIn. It installed without a problem. But it booted into a tty1 console without booting into a GUI. after loging into the tty1 console i typed 'unity'. it appeared that the system doesn't have unity desktop !!! How can it be solved ? My installation didn't show any error. Something worth mentioning: 1. during installation i had to choose an option saying 'customize the system to your needs' something like that i don't remember correctly with options 'SSH server','Mail Server', 'Ubuntu Desktop',.....,'Manual selection of packages' etc. I chose 'Ubuntu Desktop'. I haven't encountered something like this in ubuntu 11.04. to do an installation of alternate iso using UnetBootIn i used '12.04_Hdmedia' option of that software and had to change file extension of .ude to .udeb in /pool/main/l/linux that i found in Alternate ubuntu cdrom detect to go around with the cdrom detection problem. I have a 945G intel graphics.

    Read the article

  • Google Chrome with strange behavior

    - by user72274
    I'm former Chromium-browser user, but after not upgrading the PPA for 2 months, I switched to Google Chrome browser yesterday. Everything is okay, except some strange behavior on some pages and crashing after loading "chrome://" configuration pages. The best known website with strange behavior is youtube, there is a picture what I see: When I open user menu in top right corner, it crashes that way and even after closing the menu, some parts of menu stay display. You may say it's Youtube problem, no, I have this problem at least on three other websites, here it is on Imgur: The problem isn't for the whole side, sometimes it happens from the middle of the screen. The interesting part is that it happens everytime in the same distance from the right border. When I check the DOM elements with the Developer tool, the overlay which shows element's position is rendered how it should be. What is more, if there is anchor after the crashed area, it works after clicking on it. Selecting text in crashed page is impossible. I hope there is enough information to give me an advice, thanks in advance. :) EDIT: Here is what the browser posted in "chrome://gpu-internals/": Graphics Feature Status Canvas: Software only, hardware acceleration unavailable Compositing: Hardware accelerated 3D CSS: Hardware accelerated CSS Animation: Software animated. WebGL: Hardware accelerated WebGL multisampling: Hardware accelerated Problems Detected Accelerated CSS animation has been disabled at the command line. Accelerated 2d canvas is unstable in Linux at the moment. Ubuntu 12.04 | Gnome-shell 3.4.1 | ATI Radeon 4550 | Screen resolution 1024*768 | Chrome version 20.0.1132.57 (Official Build 145807)

    Read the article

  • What is the standard technique for shifting the frames of a sprite according to user input?

    - by virtual__
    From my own experience, I developed two techniques for changing the sprites of a character that's reacting to user input -- this in the context of a classic 2D platformer. The first one is to store all character's pixmaps in a list, putting the index of the currently used pixmap in an ordinary variable. This way, every time the player presses a key -- say the right arrow for moving the character forward -- the graphics engine sees what's the next pixmap to draw, draws it, and increments the index counter. That's a pretty common approach I believe, the problem is that in this case the animation's quality depends not only on the number of sprites available but also on how often your engine listens to user input. The second technique is to actually play an animation every key press event. For this you can use any sort of animation framework you want. It's only necessary to set the timer, the animation steps and to call the animation's play() method on your key press event handler. The problem with that approach is that is lacks responsiveness, since the character won't react to any input while the current animation is still being played. What I want to know is whether you are using one of these techniques -- or something similar -- in your games, or whether there's a standard method for animating sprites out there that's widely known by everybody but me.

    Read the article

  • Independent HTML5 Physics Game: Any Feedback? [closed]

    - by mndoftea
    I've been independently developing a physics-based HTML5 game. I haven't used any libraries or engines; all the code, including the physics, is my own. It is free for a while on the Chrome Web Store and I was hoping that I could get some feedback on it. You can get it for Chrome here: https://chrome.google.com/webstore/detail/dbnmkpcomailjochphnmfklofkmgenci. I know this is not a normal question, but I'm happy for answers to be abstracted/generalized for broader use. Im asking here because I don't know anyone else personally who does this stuff. Any thoughts, comments or ideas you might have would be greatly appreciated! The physics system is written in JavaScript and works by setting up the differential equations of motion (plus a few conditions) and evaluating them numerically using the Euler method. The graphics are done through the HTML5 canvas and the music is done through the audio element. (Said music is in the public domain by the way). You can see the code by going to VIewView Source in Chrome.

    Read the article

  • monitor height differences & the mouse going off screen

    - by fastmultiplication
    In ubuntu 10.10 I have a dual monitor setup. I have an nVidia graphics card and am using twinview. One of the monitors is 1024 pixels high and the other is 900. In the monitor configuration screen & in real life, I have them set up side by side, 1024 on the left. The result of this is that when I am on the bottom of the left monitor and move the mouse to the right, it goes into the hidden area below the right monitor's visible area. It seems like it would make a lot more sense for it to be bumped up to the bottom of the right monitor - since one almost never wants to move the mouse into an area of the screen that doesn't show up. And, systems I have used before have been set up that way. How can I set this up? I am not interested in lists of window managers for ubuntu; I would like to know the identity of a particular WM or set of steps I can take to solves the particular problem I have outlined above. Thanks! EDIT: I changed to use two seperate X window monitors, and set them up relatively positioned so that just the corner touches and the mouse can cross there, so the difference in heights doesn't matter.

    Read the article

  • how to use double buffering in awt? [on hold]

    - by Ishanth
    import java.awt.event.*; import java.awt.*; class circle1 extends Frame implements KeyListener { public int a=300; public int b=70; public int pacx=360; public int pacy=270; public circle1() { setTitle("circle"); addKeyListener(this); repaint(); } public void paint(Graphics g) { g.fillArc (a, b, 60, 60,pacx,pacy); } public void keyPressed(KeyEvent e) { int key=e.getKeyCode(); System.out.println(key); if(key==38) { b=b-5; //move pacman up pacx=135;pacy=270; //packman mouth upside if(b==75&&a>=20||b==75&&a<=945) { b=b+5; } else { repaint(); } } else if(key==40) { b=b+5; //move pacman downside pacx=315; pacy=270; //packman mouth down if(b==645&&a>=20||b==645&&a<=940) { b=b-5; } else{ repaint(); } } else if(key==37) { a=a-5; //move pacman leftside pacx=227; pacy=270; //packman mouth left if(a==15&&b>=75||a==15&&b<=640) { a=a+5; } else { repaint(); } } else if(key==39) { a=a+5; //move pacman rightside pacx=42;pacy=270; //packman mouth right if(a==945&&a>=80||a==945&&b<=640) { a=a-5; } else { repaint(); } } } public void keyReleased(KeyEvent e){} public void keyTyped(KeyEvent e){} public static void main(String args[]) { circle1 c=new circle1(); c.setVisible(true); c.setSize(400,400); } }

    Read the article

  • No sound Ubuntu 12.04 through HDMI

    - by MikeMan
    Specs: Asus G73JH i7/720; ATI Mobility 5870 I have read through a lot of threads on getting HDMI sound to work and non of them have fixed my issue. Granted I am very new to Linux and know only the GUI aspect of what it does from finding similarities that Windows 7 has. I would like to become a Linux Power User and I figured this would be a good step to get started. I was able to successfully install my graphics driver and it shows in use. I connect the HDMI to my HD TV and I get no sound. I don't care about auto switch for sound, that would be great but not necessary. I just want my sound to work through the HDMI. What I have tried: Changed GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.audio=1" pact set-card-profile 0 output:hdmi-surround Failure: no such entity Sound Settings: Right-click Sound indicator ? Sound Settings ? Output Tab, and set Digital Output (S/PDIF) Built in Audio Speakers Built in Audio I only get 2 settings. If I right-click the area below those 2 in the "play sound through" box, I get no "show hidden devices". I am also doing all this with the HDMI connected to eliminate any possibility for error.

    Read the article

  • LiveCD not booting/can't install Ubuntu 11.04

    - by user20318
    So, i got a new laptop somedays ago and as usualy, i went formated it to install Ubuntu. Download 11.04 and burned it on my pendrive using my old laptop (running 11.04). When i tryed to boot from the LiveUSB on my new laptop, it just showed me some weird graphics and if i select any option (can't see what im selecting), it gives me a black screen and that is all. Then i tryed to boot with this LiveUSB on my old laptop, and it worked just fine ._. Burned a CD with Ubuntu 11.04 (64bits) and the problem continue. Then i tought it could be my CD Driver, since the laptop is new and all... burned a Windows 7 64 bits DVD and it worked just fine. Also, if i check the CD/Pendrive inside Windows Seven, all the files there are ok. Anyone have any idea of what can be? I found lots of questions about this, but none of them had the weird menus i'm getting ._. oohh... i also get a "prefix is not set" before the weird menu appears :S My sis specs: Intel Core i5 2400 Intel HD 3000 4gb DDR3 If anyone can help, i will be really greatfull ._.

    Read the article

  • Fresh Ubuntu 12.10 install no desktop or wing bar

    - by Travis
    After a fresh installm of ubuntu 12.10 (complete erase) after logging in it appears i have no taskbar or much of anything, although i can still execute my terminal with CTRL+ALT+T. i looked around a little, seems i'm not the only person who has had this problem. I found here: http://ubuntuforums.org/showthread.php?p=12303179#post12303179 From there, i found myself here: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-updates/+bug/1068341 I followed precisely the instructions provided which were: this problem is solved this way Switch to a terminal (Ctrl-Alt-F1). Login as your username. Install linux source (sudo apt-get install linux-source) and headers (sudo apt-get install linux-headers-3.5.0-17-generic). Uninstall nvidia driver - this depends on which version you installed (sudo apt-get remove nvidia-current or sudo apt-get remove nvidia-current-updates or sudo apt-get remove nvidia-experimental-304). Reinstall nvidia driver (sudo apt-get install nvidia-current-updates). If it successfully installs, restart the computer (sudo shutdown -r now). Source Desktop does not show when I installed nvidia drivers! I have rebooted, and i am still having the exact same problem. so i back at square one. can someone help me please? this is my room mates computer and i told him i was "fixing" it and now i feel like i've ruined it. Any help is greatly appreciated. Thank you for your time.

    Read the article

  • Can't boot after compiling 3.1 kernel, can only get to terminal

    - by olssy
    Long story short: I tried compiling kernel 3.1 on Ubuntu 11.10 at the same time I had an update waiting for a reboot. Computer would boot to a black screen and would hang there. Ended up installing 11.10 on top of old install with a Live CD. Now I had a purple screen on bootup but it would end up booting. Realized Grub was the problem and tried some stuff but nothing worked. I ended up trying to install propriety ATI video drivers and since that nothing has worked, no grub menu(purple screen) and when it boots into the kernel it ends up hanging, I can sometimes get a terminal up with alt-fx. I have tried removing the ati drivers with the ati script, purging my fglrx driver, reconfiguring my xconf.org and following any tutorial I can find about fixing a broken graphics driver, but to no avail. I've gotten to a point were it seems that the ati propriety drivers are correctly loaded but it still has no grub boot menu and won't boot into Ubuntu. I've chased down my logs and this line is from kern.log: unity-greeter[3269]: segfault at 0 ip b7245cbbsp bf9d3900 error 4 in libgio-2.0.so.0.3000.0[b71ad000+142000] That line leads me to believe I don'T have the correct libgio-2 librairy on my system but have no idea how to find out what package has the correct version... My xorg.conf has no errors and seems to imply the fglrxdrm module got loaded correctly. Would be a bit complicated pasting the whole file here but if it would help I'll post it. LAstly, running fglrxinfo give me: Error: Unable yo open display (null) Any help or link to another tutorial would be appreciated. Thanks.

    Read the article

  • Ubuntu 11.04 64bits Keeps Randomly Freezing

    - by user971602
    This has been a real headache for me since the number of freezes has increase from twice a week to about 1 or twice a day. The system just halts and nothing can be done but hitting the restart button. At the beginning I thought it was related to Flash since I was getting random freezes when playing full screen flash videos online. I also thought it could be the wireless pci card. But the system has freezed using browsing around GNOME. The truth is, the freezes are really random and strange. I checked this thread Ubuntu keeps randomly freezing and try to ssh my computer using another one, but I could not ssh since it was really totally frozen. NumLock or CapsLock wasn't responding or blinking. Since I could not ssh I, also ignored this article https://wiki.ubuntu.com/X/Troubleshooting/Freeze According to my wife, the system has also halted under Win7 Pro 64bit but with less frequency. Here is my system configuration Intel Core i7 2600k ASRock Z68 Extreme3 gen3 Motherboard Crucial M4 128GB CT128M4SSD2 SSD WD Caviar Green WD10EADS 1TB SATA II G.SKILL Ripjaws X Series 8GB (2 x 4GB) DDR2 OCZ ModXStream 600W Power Supply Rosewill RNX-N300X PCI Wireless Adapter No external Graphics Card I remove the Wireless card and used Ethernet to see if the problem was the that, but I got a freeze after doing that. I also ran memtest86 and everything was ok. The only other thing I might suspect of is the SSD. I will try to clone the SSD to a HDD to see if that solve the problem. At this point I am stuck with the freezes. Do anyone have a clue of why this is happening and how can i solve this?

    Read the article

  • using NetBeans for rotate a figure in a label [migrated]

    - by user134812
    I was reading this post: http://forums.netbeans.org/post-8864.html and what I have done so far is to make a jFrame in NetBeans, on it I have drawn a jPanel and inisde the panel I have drawn a jLabel on it and use the icon property to put an image on it; until now all is so far so good. I would like to make a program that everytime I click on the figure it rotates it to the right. Actually I have found the following code: public class RotateImage extends JPanel{ // Declare an Image object for us to use. Image image; // Create a constructor method public RotateImage(){ super(); // Load an image to play with. image = Toolkit.getDefaultToolkit().getImage("Duke_Blocks.gif"); } public void paintComponent(Graphics g){ Graphics2D g2d=(Graphics2D)g; // Create a Java2D version of g. g2d.translate(170, 0); // Translate the center of our coordinates. g2d.rotate(1); // Rotate the image by 1 radian. g2d.drawImage(image, 0, 0, 200, 200, this); } but for what I see this code is for making the panel and other components from scratch, for my purposes it is not so good because I need to put several figures on my jFrame. Could somebody can give me a hint how to do this?

    Read the article

  • LibGDX onTouch() method kill on touch

    - by johnny-b
    How can I add this on my application. i want to use the onTouch() method from the implementation of the InputProcessor to kill the enemies on screen. how do i do that? do i have to do anything to the enemy class? please help Thank you M @Override public boolean touchDown(int screenX, int screenY, int pointer, int button) { return false; } here is my enemy class public class Bullet extends Sprite { private Vector2 velocity; private float lifetime; public Bullet(float x, float y) { velocity = new Vector2(0, 0); } public void update(float delta) { float targetX = GameWorld.getBall().getX(); float targetY = GameWorld.getBall().getY(); float dx = targetX - getX(); float dy = targetY - getY(); float distToTarget = (float) Math.sqrt(dx * dx + dy * dy); velocity.x += dx * delta; velocity.y += dy * delta; } } i am rendering all graphics in a GameRender class and a gameworld class if you need more info please let me know Thank you

    Read the article

  • Battery Life in ubuntu 14.04

    - by user287466
    Today i had fresh installation of ubuntu 14.04 previously i had ubuntu 12.04 and had 5 to 6 hours of battery backup even at constant work, but in 14.04 getting 3 hrs only, tried with tlp but no use. lspci: 0:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) 00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04) 00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04) 00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4) 00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4) 00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04) 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05) 02:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)

    Read the article

  • Will buy simple Cocos2D bubbles iPad game for private use (source)

    - by boliva
    Hi, First of all, sorry if this is the wrong place for posting this kind of request. IDK if is there already a marketplace on the stack community. I'm a fairly experienced iPhone/iPad developer with several Apps already published. I have a deep understanding of Objective-C and the Cocoa framework, as well as with the iPhone development tools. However, I have never used Cocos2d (or any other gaming engine for that matter) as I've mostly specialized in utilities/productivity Apps. I am in the urgent need of developing a really simple iPad game (for which I will provide all of the media assets - graphics and sounds) that needs to be deployed in about a week from now. Basically the game should allow the user to pop bubbles of different size and speed as they move from the bottom to the top of the screen. While I could take the time to read the documentation and start working on this game myself, I'm currently with a couple of other projects that I need to finish soon, so I would like to ask for the help of some other more experienced Cocos2D developer which could develop this game on its basic form for me. If you think you can help, please send me your quote, timing and, if possible, samples of previous work done with Cocos2D that would be similar to what I need. I can provide more detail upon request. Best and thank you all.

    Read the article

  • Where to find information about ubuntu compatible or certified hardware/PC models

    - by Halkinn
    I am buying a new desktop PC in early 2013, anyway this question should apply to someone intending to buy a new laptop/ultrabook as well. This machine is not meant for gaming, and if I ocasionally do it, I can survive with minimum graphics. However I may need some heavy multimedia edition or multitasking at times, so basically my greatest priority is a good processor, after that perhaps average graphic card (if onboards are not enough, I am still not informed enough about that), at least 4GB of RAM with possibility of expansion. I know there are some PC models specially designed to ship with Ubuntu, which is the OS I use the most these days. However, most people around me use Windows and some software with unsupported versions for Linux and not having a Windows license becomes a bit problematic. Given that, I would like to find information about which PC models or even manufacters currently on the market have the best compatibility with Ubuntu, I am still undecided between building my own desktop or buying a pre-made model, so I would like to find information both for certified models and certified hardware or even Ubuntu partners that may work closely with Canonical. Where to find this information in order to make sure that I will have a good experience with Ubuntu on my new PC in the years to come?

    Read the article

  • Trouble with collision detection in XNA?

    - by Lewis Wilcock
    I'm trying to loop through an list of enemies (enemyList) and then any that have intersected the rectangle belonging to the box object (Which doesn't move), declare there IsAlive bool as false. Then another part of the code removes any enemies that have the IsAlive bool as false. The problem im having is getting access to the variable that holds the Rectangle (named boundingBox) of the enemy. When this is in a foreach loop it works fine, as the enemy class is declared within the foreach. However, there are issues in using the foreach as it removes more than one of the enemies at once (Usually at positions 0 and 2, 1 and 3, etc...). I was wondering the best way to declare the enemy class, without it actually creating new instances of the class? Heres the code I currently have: if (keyboardState.IsKeyDown(Keys.Q) && oldKeyState.IsKeyUp(Keys.Q)) { enemyList.Add(new enemy(textureList.ElementAt(randText), new Vector2(250, 250), graphics)); } //foreach (enemy enemy in enemyList) //{ for (int i = 0; i < enemyList.Count; i++) { if (***enemy.boundingBox***.Intersects(theDefence.boxRectangle)) { enemyList[i].IsDead = true; i++; } } //} for(int j = enemyList.Count - 1; j >= 0; j--) { if(enemyList[j].IsDead) enemyList.RemoveAt(j); } (The enemy.boundingBox is the variables I can't get access too). This is a complete copy of the code (Zipped) If it helps: https://www.dropbox.com/s/ih52k4e21g98j3k/Collision%20tests.rar I managed to find the issue. Changed enemy.boundingBox to enemyList[i].boundingBox. Collision works now! Thanks for any help!

    Read the article

< Previous Page | 182 183 184 185 186 187 188 189 190 191 192 193  | Next Page >