Search Results

Search found 15196 results on 608 pages for 'browser detection'.

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

  • Collision Detection within Player/Enemy Class

    - by user1264811
    I'm making a 2D platform game. Right now I'm just working on making a very generic Player class. I'm wondering if it would be more efficient/better practice to have an ActionListener within the Player class to detect collisions with Enemy objects (also have an ActionListener) or to handle all the collisions in the main world. Furthermore, I'm thinking ahead about how I will handle collisions with the platforms themselves. I've looked into the double boolean arrays to see which tiles players can go to and which they can't. I don't understand how to use this class and the player class at the same time. Thank you.

    Read the article

  • libgdx - collision detection with tiled map java

    - by user2875021
    currently, I am working on a 2d rpg game which is similar to final fantasy 1-4. I can load up a tiled map and the sprite can walk freely on the map. However, I will like to create a wall for it to stop walking through it. I created three tiled layer Background, Collision, Overhead and one Collision object layer with rectangles only. "How do I handle collisions with the object layer in the tiled map?" "Do I have to create every single rectangle that is in the object layer with Rectangle rectangle = new Rectangle() and rectangle.set(x, y, width, height)in the code?" Thank you very much in advance. Any help is greatly appreciated!

    Read the article

  • Why is my collision detection not accurate?

    - by optimisez
    After trying and trying, I still cannot understand why the leg of character exceeds the wall but no clipping issue when I hit the wall from below. How should I fix it to make him stand still on the wall? From collideWithBox() function below, it shows that playerDest.Y = boxDest.Y - boxDest.height; will get the position the character should standstill on the wall. Theoretically, the clipping effect won't be happen as the character hit the box from below works with the equation playerDest.Y = boxDest.Y + boxDest.height;. void collideWithBox() { if ( spriteCollide(playerDest, boxDest) && keyArr[VK_UP]) //playerDest.Y += 50; playerDest.Y = boxDest.Y + boxDest.height; else if ( spriteCollide(playerDest, boxDest) && !keyArr[VK_UP]) playerDest.Y = boxDest.Y - boxDest.height; } void initPlayer() { // Create texture. hr = D3DXCreateTextureFromFileEx(d3dDevice, "player.png", 169, 44, D3DX_DEFAULT, NULL, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, D3DCOLOR_XRGB(255, 255, 255), NULL, NULL, &player); playerRect.left = playerRect.top = 0; playerRect.right = 29; playerRect.bottom = 36; playerDest.X = 0; playerDest.Y = 564; playerDest.length = playerRect.right - playerRect.left; playerDest.height = playerRect.bottom - playerRect.top; } void initBox() { hr = D3DXCreateTextureFromFileEx(d3dDevice, "brock.png", 330, 132, D3DX_DEFAULT, NULL, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, D3DCOLOR_XRGB(255, 255, 255), NULL, NULL, &box); boxRect.left = 33; boxRect.top = 0; boxRect.right = 63; boxRect.bottom = 30; boxDest.X = boxDest.Y = 300; boxDest.length = boxRect.right - boxRect.left; boxDest.height = boxRect.bottom - boxRect.top; } bool spriteCollide(Entity player, Entity target) { float left1, left2; float right1, right2; float top1, top2; float bottom1, bottom2; left1 = player.X; left2 = target.X; right1 = player.X + player.length; right2 = target.X + target.length; top1 = player.Y; top2 = target.Y; bottom1 = player.Y + player.height; bottom2 = target.Y + target.height; if (bottom1 < top2) return false; if (top1 > bottom2) return false; if (right1 < left2) return false; if (left1 > right2) return false; return true; }

    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

  • How to detect default printer properties from browser?

    - by Annan
    Regardless of if this is a good idea or not, is it possible to detect printer attributes from the browser? The idea is that you want to print out a brochure that's selling something. Depending on different things such as if the printer is black&white/colour, high/low resolution, laser/inkjet, printing to a file, etc, you want to print out the page differently. For example you might choose different text colours or fonts, different image sizes, etc. My initial thoughts are: ActiveX, Flash, Java, Silverlight, browser plugins. Kudos if it's possible in javascript. I'm interested in all ways to do this, cross browser or not. Please no reasons about why this shouldn't be done ^_^

    Read the article

  • Keeping cached browser data inside ASP update panel textboxes/dropdowns for browser back click

    - by pmlevere
    I'm new in VB.net/asp and am running a VB web application in a visual database program called IronSpeed designer. I'm primarily using IronSpeed in this case for its login/role security features. I have a basic two page setup for this app. The user logs in then is taken to AccountEntry.aspx, they enter data into textboxes and select some dropdown values that are linked to a sql database, then they click "submit" to move to Results.aspx. On Results.aspx, the user can change data and then generate several types of reports (PDF, Excel, etc). I'm used to setting up ASP controls inside ASPContent areas, and in these areas if a user performs a browser back click the previously entered data will still be on the page for potential user modification. However in this web app, IronSpeed is setting up the page and asp controls inside an asp update panel. It appears inside an asp update panel, cached values can't be seen on a browser back click. In this case, it's important that the orginally entered values still be there for the user experience if the user advances to Results.aspx then clicks browser back to modify a value on AccountEntry.aspx. If I have to I'll setup Session Variables and disable browser clicking, but that is last resort. Is there any way to save cached data inside an asp update panel and have it there for a browser back click?

    Read the article

  • Cannot set Chrome as default browser

    - by user1951615
    This has been asked before but there is no answer that works for me. The last answer I saw said to use System Settings. If I look there (Details, Default applications, Web), it says that Chrome IS my default browser. But every time I launch Chrome, it asks me again. If I look within Chrome under Settings, Default Browser, it says that it is not the default browser. There is a large button marked "Make Google Chrome the default browser" but, as someone else as already reported, this button has no effect. I am on the stable channel for Chrome. I tried making a comment to the existing thread but was unable to. That is why I am asking as a new question.

    Read the article

  • Updating entities in response to collisions - should this be in the collision-detection class or in the entity-updater class?

    - by Prog
    In a game I'm working on, there's a class responsible for collision detection. It's method detectCollisions(List<Entity> entities) is called from the main gameloop. The code to update the entities (i.e. where the entities 'act': update their positions, invoke AI, etc) is in a different class, in the method updateEntities(List<Entity> entities). Also called from the gameloop, after the collision detection. When there's a collision between two entities, usually something needs to be done. For example, zero the velocity of both entities in the collision, or kill one of the entities. It would be easy to have this code in the CollisionDetector class. E.g. in psuedocode: for(Entity entityA in entities){ for(Entity entityB in entities){ if(collision(entityA, entityB)){ if(entityA instanceof Robot && entityB instanceof Robot){ entityA.setVelocity(0,0); entityB.setVelocity(0,0); } if(entityA instanceof Missile || entityB instanceof Missile){ entityA.die(); entityB.die(); } } } } However, I'm not sure if updating the state of entities in response to collision should be the job of CollisionDetector. Maybe it should be the job of EntityUpdater, which runs after the collision detection in the gameloop. Is it okay to have the code responding to collisions in the collision detection system? Or should the collision detection class only detect collisions, report them to some other class and have that class affect the state of the entities?

    Read the article

  • Clone web browser instance

    - by Sam Saffron
    Is there a tool/service that would allow 2 developers to browse the web on separate machines and have dev 1 control dev 2s session and the opposite, without the need for a hardcore remote access like terminal services. Im thinking etherpad for web browsing

    Read the article

  • watin attachto Embedded browser

    - by MHop
    I have a c# windows form project using watin. I would love to attach to the web-browser control on a form, is this possible? Is there any sample code on how to attach to the embedded web-browser control. //Looks like this only works for actual IExplorer instances. window = WatiN.Core.Browser.AttachTo(WatiN.Core.Find.ByTitle("Google"));

    Read the article

  • Make page to tell browser not to cache/preserve input values

    - by queen3
    Most browser cache form input values. So when user refreshes page, the inputs have same values. Here's my problem. When user clicks Save, server validates POSTed data (e.g. checked products), and if not valid, sends it back to browser. However, as stated above, even if server clears selection for some values, they may still be selected because of browser cache! My data has invisible (until parent item selected) checkboxes, so user may be even not aware that some previous value is still selected, until clicks Save again and gets error message - even though user thinks it's not. Which is irritating. This can be resolved by doing Ctrl-F5, but it's not even a solution.Is there automatic/programmatic way to tell browser not to cache form input data on some form/page?

    Read the article

  • Toolbar Cleaner Strips Toolbars, Add-ons, and Browser Helper Objects

    - by Jason Fitzpatrick
    If you’re trying to remove all the crap off a friend’s bogged down computer, Toolbar Cleaner is a handy little app that does a thorough job stripping away spammy toolbars, dubious add-ons, and browser helper objects. Toolbar Cleaner is a free application that helps remove unwanted garbage from your Internet Explorer, Firefox, and Google Chrome installations–including third-party toolbars, extensions/add-ons, and browser helper objects (plug-ins that modify your browser behavior and can contain malware). If you’re dealing with a machine drowning under all the toolbars and crapware that have snuck onto the system, it’s a nearly one-click solution to purging all of them. Hit up the link below to read more about the software and grab a copy. Toolbar Cleaner is freeware, Windows only. Toolbar Cleaner [via Freeware Genius] HTG Explains: Why It’s Good That Your Computer’s RAM Is Full 10 Awesome Improvements For Desktop Users in Windows 8 How To Play DVDs on Windows 8

    Read the article

  • Determining which JavaScript/CSS browser features are required

    - by Alan Neal
    My website uses a variety of technologies, such as JQuery, new CSS definitions (e.g., moz-selection, -webkit-user-select), etc. The site works perfectly with Google Chrome and Safari, but has some quirkiness in Firefox, IE, and some of the other browsers. I want to write a script to check for necessary browser features but, with several thousand lines of code and CSS definitions, I'm not certain which features I should be looking for. Is there some sort of online analysis (similar to how JSLint operates) that would tell me which features my script and CSS files need? Are there tools (like FireBug) that provide this info?

    Read the article

  • Mobile phone detection (brand, model, browser etc)

    - by SyaZ
    What do you use to detect visitor's mobile phone, down to the model if possible? Currently we maintain our own database but it's really getting behind due to lack of manpower to maintain it, so we decided to give 3rd party solution a try. These are my candidates but I don't have time to really try them all: DeviceAtlas - 1 year personal evaluation, but basic license is affordable. Their database look solid with daily update and user-contributed tests / updates. I am favoring this one at the moment. DetectRight - I was recommended this by a colleague but really can't find much from their site. 20k devices -- really? WURFL - Open source, database collaboratively derived from UAProf. So basically if you're going with UAProf solution, you're better off with WURFL. DetectMoBileBrowsers - This looks like the simplest of all. Too bad it's language dependent (PHP). Please share your experience or suggestions!

    Read the article

  • How should I evaluate new browser languages?

    - by Andrea
    In these days there are many projects whose aim is to bring new languages to the browser by compiling them to JavaScript. Among the others one can mention ClojureScript, CoffeScript, Dart, haXe, Emscripten, Amber Smalltalk. I'd like to try a few of these out, but I am not sure what I should be looking for when evaluating these languages to see if they are suitable for production. How should I evaluate a new browser language, and what are the pitfalls I should be looking for?

    Read the article

  • How to install Opera Browser?

    - by bruce
    I am trying to install opera browser from the terminal. I downloaded the 'debian' installer because it didn't show up in software center. It completely destroyed my software center - it is frozen and I have no idea how to fix (I have a different thread for that though). Can I use this thing called synaptic package manager to install Opera? or am I stuck with Firefox? How do I install Opera Browser?

    Read the article

  • Without using a pre-built physics engine, how can I implement 3-D collision detection from scratch?

    - by Andy Harglesis
    I want to tackle some basic 3-D collision detection and was wondering how engines handle this and give you a pretty interface and make it so easy ... I want to do it all myself, however. 2-D collision detection is extremely simple and can be done multiple ways that even beginner programmers could think up: 1.When the pixels touch; 2.when a rectangle range is exceeded; 3.when a pixel object is detected near another one in a pixel-based rendering engine. But 3-D is different with one dimension, but complex in many more so ... what are the general, basic understanding/examples on how 3-D collision detection can be implemented? Think two shaded, OpenGL cubes that are moved next to each other with a simple OpenGL rendering context and keyboard events.

    Read the article

  • Legal issues regarding embedding a toolbar into a browser [closed]

    - by OmarOthman
    We are in the process of developing a software that provides service to internet users and we would like to ask about the legal liabilities of some issues. Of course, everything is to be done with the consent of the user of our software but our concern is about third party tools and services that may be invoked/used by our product. In particular, these are the concerns: (1) Embedding a toolbar to an existing browser. This screenshot is an example, where the words in the highlighted toolbar are passed to www.google.com for searching, and the contents of the window are the results of the search. I want to know if any consent should be obtained before such a toolbar can be embedded in a web browser, whether there are any legal requirements by the web browser; whether different web browsers have different requirements (at least for Internet Explorer, Firefox, Chrome, Opera and Safari). (2) Invoking a free website from that toolbar (like Google’s search page). The screenshot above demonstrates such an existing toolbar. (3) Full ownership and unrestricted access to the data entered to this toolbar. In the screenshot above, I want to take the words (translation english to spanish) and own them, i.e. storing them in my database and do some processing on them. (4) Ability to track the pages entered by the user starting from that free website. In the screenshot above, you can notice that the user opted only for the third result, whose URL is translate.google.com. I want to have access to this and all URLs clicked from this page for some processing as well. This is a commercial application, so I need a very concrete, precise and reference-supported answer.

    Read the article

  • Why not open a PDF file in the browser but first save it to the harddisk?

    - by Lernkurve
    Question Is it correct that saving a PDF to the harddisk first, and then opening it from there with some PDF reader (not the browser) is safer than opening it directly with the browser plugin? My current understanding I know that the PDF browser plugin might have a security leak and a manipulated PDF file might exploit it and get access to the user's computer. I recently heard that saving the PDF file frist and opening it then was safer. I don't understand why that should be safer. Can anyone explain? My logic would suggest that a manipulated file started from the harddisk can just as well exploit a security leak, say for instance, of Adobe Acrobat Reader.

    Read the article

  • Most efficient arc for developing cross-browser support?

    - by Chris Hasbrouck
    I'm curious to hear what approach people take to planning for cross-browser support when developing a website. There are generally two approaches I've seen developers take in their workflow: -optimize for webkit then apply hacks for IE7-9, or -optimize for IE7-8 then apply newer features for IE9/webkit Basically starting at the front of technology and working toward the back, or starting at the back of technology and working toward the front. How do you do things? What advantages or disadvantage do you perceive in the different way of doing things wrt to developing cross-browser support?

    Read the article

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