Search Results

Search found 2184 results on 88 pages for 'sprite kit'.

Page 51/88 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • In a browser, is it best to use one huge spritesheet or many (10000) different PNG's?

    - by Nick
    I'm creating a game in jQuery, where I use about 10000 32x32 tiles. Until now, I have been using them all separately (no sprite sheet). An average map uses about 2000 tiles (sometimes re-used PNG's but all separate divs) and the performance ranges from stable (Chrome) to a bit laggy (Firefox). Each of these divs are positioned absolutely using CSS. They do not need to be updated every tick, just when a new map is loaded. Would it be better for performance to use spritesheet methods for the divs using CSS background-positioning, like gameQuery does? Thank you in advance!

    Read the article

  • rotate player based off of joystick

    - by pengume
    Hey everyone I have this game that i am making in android and I have a touch screen joystick that moves the player around based on the joysticks position. I cant figure out how to also get the player to rotate at the same angle of the joystick. so when the joystick is to the left the players bitmap is rotated to the left as well. Maybe someone here has some sample code I could look at here is the joysticks class that I am using. `public class GameControls implements OnTouchListener { public float initx = DroidzActivity.screenWidth - 45; //255; // 320 og 425 public float inity = DroidzActivity.screenHeight - 45;//425; // 480 og 267 public Point _touchingPoint = new Point( DroidzActivity.screenWidth - 45, DroidzActivity.screenHeight - 45); public Point _pointerPosition = new Point(DroidzActivity.screenWidth - 100, DroidzActivity.screenHeight - 100); // ogx 220 ogy 150 private Boolean _dragging = false; private boolean attackMode = false; @Override public boolean onTouch(View v, MotionEvent event) { update(event); return true; } private MotionEvent lastEvent; public boolean ControlDragged; private static double angle; public void update(MotionEvent event) { if (event == null && lastEvent == null) { return; } else if (event == null && lastEvent != null) { event = lastEvent; } else { lastEvent = event; } // drag drop if (event.getAction() == MotionEvent.ACTION_DOWN) { if ((int) event.getX() > 0 && (int) event.getX() < 50 && (int) event.getY() > DroidzActivity.screenHeight - 160 && (int) event.getY() < DroidzActivity.screenHeight - 0) { setAttackMode(true); } else { _dragging = true; } } else if (event.getAction() == MotionEvent.ACTION_UP) { if(isAttackMode()){ setAttackMode(false); } _dragging = false; } if (_dragging) { ControlDragged = true; // get the pos _touchingPoint.x = (int) event.getX(); _touchingPoint.y = (int) event.getY(); // Log.d("GameControls", "x = " + _touchingPoint.x + " y = " //+ _touchingPoint.y); // bound to a box if (_touchingPoint.x < DroidzActivity.screenWidth - 75) { // og 400 _touchingPoint.x = DroidzActivity.screenWidth - 75; } if (_touchingPoint.x > DroidzActivity.screenWidth - 15) {// og 450 _touchingPoint.x = DroidzActivity.screenWidth - 15; } if (_touchingPoint.y < DroidzActivity.screenHeight - 75) {// og 240 _touchingPoint.y = DroidzActivity.screenHeight - 75; } if (_touchingPoint.y > DroidzActivity.screenHeight - 15) {// og 290 _touchingPoint.y = DroidzActivity.screenHeight - 15; } // get the angle setAngle(Math.atan2(_touchingPoint.y - inity, _touchingPoint.x - initx) / (Math.PI / 180)); // Move the ninja in proportion to how far // the joystick is dragged from its center _pointerPosition.y += Math.sin(getAngle() * (Math.PI / 180)) * (_touchingPoint.x / 70); // og 180 70 _pointerPosition.x += Math.cos(getAngle() * (Math.PI / 180)) * (_touchingPoint.x / 70); // make the pointer go thru if (_pointerPosition.x > DroidzActivity.screenWidth) { _pointerPosition.x = 0; } if (_pointerPosition.x < 0) { _pointerPosition.x = DroidzActivity.screenWidth; } if (_pointerPosition.y > DroidzActivity.screenHeight) { _pointerPosition.y = 0; } if (_pointerPosition.y < 0) { _pointerPosition.y = DroidzActivity.screenHeight; } } else if (!_dragging) { ControlDragged = false; // Snap back to center when the joystick is released _touchingPoint.x = (int) initx; _touchingPoint.y = (int) inity; // shaft.alpha = 0; } } public void setAttackMode(boolean attackMode) { this.attackMode = attackMode; } public boolean isAttackMode() { return attackMode; } public void setAngle(double angle) { this.angle = angle; } public static double getAngle() { return angle; } }` I should also note that the player has animations based on when he is moving or attacking. EDIT: I got the angle and am rotating the sprite around in the correct angle however it rotates on the wrong spot. My sprite is one giant bitmap that gets cut into four pieces and only one shown at a time to animate walking. here is the code I am using to rotate him right now. ` public void draw(Canvas canvas,int pointerX, int pointerY) { Matrix m; if (setRotation){ // canvas.save(); m = new Matrix(); m.reset(); // spriteWidth and spriteHeight are for just the current frame showed //m.setTranslate(spriteWidth / 2, spriteHeight / 2); //get and set rotation for ninja based off of joystick m.preRotate((float) GameControls.getRotation()); //create the rotated bitmap flipedSprite = Bitmap.createBitmap(bitmap , 0, 0,bitmap.getWidth(),bitmap.getHeight() , m, true); //set new bitmap to rotated ninja setBitmap(flipedSprite); setRotation = false; // canvas.restore(); Log.d("Ninja View", "angle of rotation= " +(float) GameControls.getRotation()); } ` And then the draw method // create the destination rectangle for the ninjas current animation frame // pointerX and pointerY are from the joystick moving the ninja around destRect = new Rect(pointerX, pointerY, pointerX + spriteWidth, pointerY + spriteHeight); canvas.drawBitmap(bitmap, getSourceRect(), destRect, null);

    Read the article

  • How to implement the light trails for a tron game?

    - by Link
    Well I was creating a TRON style game, but had an issue with creating the actual light trails for the game. What I'm doing currently is I have an array the same size as my window in pixel size, implemented like this: int* collision[800][600]; Then when the bike goes on a certain pixel, it is marked with a 1 for traveled on. However what is the most efficient way to create a working light trail display? I tried to do something like this: int i, j; for(i=0; i<800; i++) for(j=0; j<600; j++) if(*collision[i][j] == 1) Image::applySurface(i, j, trailSurface, gameScreen); But it isn't working properly? It just fills the whole screen with a sprite instead. Whats a better/faster/working way to do this?

    Read the article

  • Which isometric angles can be mirrored (and otherwise transformed) for optimization?

    - by Tom
    I am working on a basic isometric game, and am struggling to find the correct mirrors. Mirror can be any form of transform. I have managed to get SE out of SW, by scaling the sprite on X axis by -1. Same applies for NE angle. Something is bugging me, that I should be able to also mirror N to S, but I cannot manage to pull this one off. Am I just too sleepy and trying to do the impossible, or a basic -1 scale on Y axis is not enough? What are the common used mirror table for optimizing 8 angle (N, NE, E, SE, S, SW, W, NW) isometric sprites?

    Read the article

  • Movement in RPG

    - by user1264811
    I want to make an RPG game in which I move tile by tile. So when I hit up, the tile row that I am on decreases by one for example. Also, it's supposed to be a slow movement so that I can see the change in tile, i.e. I can see my sprite move from tile to tile. Currently, with the code I have, when I hit a direction on my keyboard, I move several blocks within seconds and by the time I release the button I have already gotten a nullPointerException error because I have left the map. How can I slow down the movement?

    Read the article

  • SDK Android : améliorations de performances pour l'émulateur avec le support du GPU

    SDK Android : améliorations de performances pour l'émulateur avec le support du GPU Google vient de publier une mise à jour du kit de développement (SDK) pour Android. Au coeur de cette nouvelle version, des améliorations de performances et de nouvelles fonctionnalités pour l'émulateur Android qui viennent résoudre le problème de lenteur de l'environnement qui ne cadrait plus avec les nouvelles versions de l'OS. L'outil permettant aux développeurs de tester leurs applications Android sur un ordinateur de bureau prend désormais en charge le GPU pour Android 4.X. Cette nouveauté va permettre de profiter de l'accélération matérielle pour avoir une simulation plus réaliste de...

    Read the article

  • Join Us at Oracle OpenWorld Latin America (Dec 4-6)

    - by Zeynep Koch
    Hello to all Latin Americans,  Oracle Openworld Latin America is starting tomorrow. Oracle Linux will be showcased in different sessions and in the exhibition area. Here's some of the links and details to our sessions: Session Schedules: http://www.oracle.com/openworld/lad-en/session-schedule/index.html Oracle Linux sessions: New Features in Oracle Linux: A Technical Deep Dive,    Dec 4, 13:30-14:30, Mezzanine Room 7 Oracle Linux Strategy and Roadmap,   Dec 4, 17:15-18:15, Mezzanine Room 5 Oracle OpenWorld Latin America Exhibition Halls Hours Tuesday, December 4 12:00–19:3018:15–19:30 (Dedicated Hours)Wednesday, December 511:00–19:3018:30–19:30 (Dedicated Hours)Thursday, December 6 11:00–19:0017:45–19:00 (Dedicated Hours) We will also hand out the following in our booth, don't forget to visit us: - Oracle Linux and Oracle VM DVD Kit  - Server Virtualization for Dummies  See you there :)

    Read the article

  • MonoDroid est disponible gratuitement, en version de test avant la mouture finale payante

    MonoDroid est disponible gratuitement, en version de test avant la mouture finale payante Mise à jour du 06.01.2011 par Katleen En mars dernier, nous vous parlions déjà du projet MonoDroid (voir news précédente), cet outil dont le but est de permettre aux développeurs de travailler sur .Net depuis Android (et sous d'autres systèmes pour ses autres versions) grâce à une totale disponibilité pour eux des APIs de l'OS de Google. Sa preview était très attendue. Figurez-vous que la voici, enfin. Elle permet d'utiliser les librairiesOpenGL et OpenTK et de compiler du code à la volée (en cas de code natif). Elle offre également un kit de développement complet en ligne de commande (compatible...

    Read the article

  • How can I change this isometric engine to make it so that you could distinguish between blocks that are on different planes?

    - by l5p4ngl312
    I have been working on an isometric minecraft-esque game engine for a strategy game I plan on making. As you can see, it really needs some sort of shading. It is difficult to distinguish between separate elevations when the camera is facing away from the slope because everything is the same shade. So my question is: can I shade just a specific section of a sprite? All of those blocks are just sprites, so if I shaded the entire image, it would shade the whole block. I am using LWJGL. Are there any other approaches to take? Heres a link to a screenshot from the engine: http://i44.tinypic.com/qxqlix.jpg

    Read the article

  • Rotation, further I go from 0:0, the further the object positions around the origin while rotating

    - by Serguei Fedorov
    For some reason I am having the issue where the following code: global.spriteBatch.Draw(obj.sprite, obj.getPosition(), null, Color.White, obj.rotation, obj.center, 2f, SpriteEffects.None, 1); causes the object to rotate around the origin in such a way, as though there is an offset to the position relative to its location. The calculation for the center it correct and this happens even if I set the pivot to be the location of the object. The further I get from 0:0 the larger the radius or rotation. I am not sure what is going on here because given the following tutorial http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2D/Rotation.php I have done the code setup correctly. Any ideas? Any help is greatly appreciated!!!

    Read the article

  • How to deal with characters picking up and dropping objects in a 2D game

    - by pm_2
    I'm quite new to game development, so would like to get a consensus on methods of doing this. My game features a 2D character that is able to pick up and drop objects, for example, a stick. My question is: is it advisable / possible to manipulate the image of the character and image of the stick to make it look like the character is now carrying a stick; or is it best to have a separate sprite sheet for the character with the stick and the character without? EDIT: To be clear - I have a lot of characters, with a few items (4 separate items and over 20 characters)

    Read the article

  • Programming Windows Identity Foundation - ISBN 978-0-7356-2718-5

    - by TATWORTH
    This book introduces a new technology that promises a considerable improvement on the ASP.NET membership system. If you ever had to write an extranet, system you should be aware of the problems in setting up membership for your site. The Windows Identity Foundation promises to be an excellent replacement. Therefore the book Programming Windows Identity Foundation - ISBN 978-0-7356-2718-5 at  http://oreilly.com/catalog/9780735627185, is breaking new ground. I recommend this book to all ASP.NET development teams. You should reckon on 3 to 5 man-days to study it and try out the sample programs and see if it can replace your bespoke solution. Rember this is version 1 of WIF and give yourself adequete time to read this book and familiarise yourself with the new software. Some URLs for more information: WIF home page at http://msdn.microsoft.com/en-us/security/aa570351.aspx The Identity Training Kit at http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=c3e315fa-94e2-4028-99cb-904369f177c0 The author's blog at http://www.cloudidentity.net/

    Read the article

  • Microsoft publie deux outils open-source en rapport avec Outlook pour faciliter le développement d'a

    Mise à jour du 27/05/10 Microsoft publie deux outils open-source en rapport avec Outlook Pour permettre l'utilisation plus facile du format PST dans le développement d'applications Microsoft vient de publier deux outils open-source de développement en rapport avec Outlook. Le but affiché est de faciliter la création d'applications qui utiliseront le format de fichier des e-mails et des dossiers personnels de son client de messagerie : le format PST. Les deux outils en questions sont le « File Format Software Development Kit » et le « PST Data Structure View Tool ». Cette annonce est la suite logique...

    Read the article

  • How to move an object along a circumference of another object?

    - by Lumis
    I am so out of math that it hurts, but for some of you this should be a piece of cake. I want to move an object around another along its ages or circumference on a simple circular path. At the moment my game algorithm knows how to move and position a sprite just at the edge of an obstacle and now it waits for the next point to move depending on various conditions. So the mathematical problem here is how to get (aX, aY) and (bX, bY) positions, when I know the Centre (cX, cY), the object position (oX, oY) and the distance required to move (d)

    Read the article

  • RIM met à jour son SDK pour BlackBerry pour mettre fin à l'exode des développeurs vers Android : suf

    Mise à jour du 07/04/10 RIM met à jour ses outils pour BlackBerry Et tente de mettre fin à l'exode des développeurs vers Android et iPhone OS Research in Motion, la société qui gère l'OS et les outils de développement pour les BlackBerry, vient de sortir un nouveau plug-in BlackBerry Java pour Eclipse ? le 1.1, qui permet de simuler le fonctionnement d'une appli sur les différents types de modèles de marque, la version 2.0 du BlackBerry Web plug-in (pour Eclipse et Visual Studio) et un nouveau SDK (BlackBerry Java software development kit) ? qui inclue pas moins de 20.000 APIs (calendrier, contacts, caméra, etc.). Le but est claire, rendre la...

    Read the article

  • OpenJDK 7 disponible en version bêta, des voix s'élèvent contre sa licence jugée restrictive

    OpenJDK 7 disponible en version bêta Des voix s'élèvent contre sa licence jugée restrictive Mise à jour du 28/02/2011 par Idelways OpenJDK 7, le Kit de Développement du Java SE 7 est désormais disponible en version bêta (Milestone 12). Les développeurs peuvent dès maintenant télécharger et s'assurer que leurs applications compilent et s'exécutent correctement sous cette version, et se familiariser ainsi avec les nouveautés du langage. La disponibilité générale de ce SDK est prévue dans exactement 5 mois. Mark Reinhold, architecte en chef de la plateforme Java chez Oracle, explique que cette version a passé...

    Read the article

  • Windows Phone 8 pourra synchroniser les SMS avec Outlook.com ? Des détails sur le stockage dans le Cloud de l'OS révélés

    Fuite du SDK de Windows Phone 8 absence du support de JavaScript et Silverlight, plusieurs nouveautés de l'OS dévoilées Microsoft devrait publier officiellement le SDK pour Windows Phone 8, la prochaine mise à jour majeure du système d'exploitation mobile, dans les jours à venir. Mais les "adopteurs précoces" impatients de se frotter à la plateforme n'auront pas à attendre. Une version - semblerait-il ? finale du kit de développement pour Windows Phone 8 a fuité sur le Net. L'outil est actuellement téléchargeable sur le forum chinois WPXAP et également sur un serveur de Microsoft après avoir renseigné un mot de passe. Ce qui peut se révéler le plus surprenant dans...

    Read the article

  • XNA Spritebatch sorting by texture vs depth

    - by Motig
    I am refining my 2D game engine, and I want to look in to sorting sprite batches by texture (because I'm quite often using the same textures repeatedly). However, I also want to retain a few 'layers' of depth (i.e. ground < buildings < units < GUI etc). My question is, which of the following is the best approach (in terms of performance)? Create multiple SpriteBatches and Begin() and End() them in order; or... Create a single SpriteBatch and call Begin() and End() multiple times, once for each layer (in order)?

    Read the article

  • How to achieve excellence in iOS Development? [on hold]

    - by Ashish Pisey
    I have been developing iOS apps for six months now and every day i find something new and exciting to learn. i feel blessed with apple docs and 3rd party APIs.I have four apps on the App Store.i have tried almost all the basic core features of iOS except core-data. MY recent interests are dynamic UI,physics(sprite kit) and social apps.As i feel lost in vast pool of knowledge,i would like to know from you expert iOS developers, what particular features should i concentrate on for the future? should i try opengl-es for 3d gaming for 64 bit processors or stick to basic 2d physics gaming for some time or the evergreen social apps category ? appreciate your help, thanx

    Read the article

  • World to Pixel Transformation

    - by D00d
    My objects have a location in world coordinates (basically 1.0f is a meter). If I simply draw my objects using their world coordinates, each meter will correspond to a pixel. Obviously that's not what I want. Now, I don't want to have to apply a transformation to each and every object's position when I draw them. As I happen to be using XNA, and spritebatch allows a Matrix to be passed in as an argument in it's begin method, I was wondering if there is a way to pass the World to Pixel transformation in there. Any suggestions? So far Matrix.CreateScale(new Vector3(zoom, zoom, 1)) puts the objects in their proper spot, but it also scales up the sprites. Is there a way to transform the position without enlarging the sprite? Thanks

    Read the article

  • Tizen 2.0 disponible avec son SDK, Samsung pourrait bientôt lancer un smartphone sous l'OS mobile open source fondé sur Linux

    Tizen 2.0 disponible avec son SDK Samsung pourrait bientôt lancer un smartphone sous l'OS open source fondé sur Linux Tizen 2.0, le système d'exploitation mobile open source fondé sur Linux est désormais disponible en version alpha avec son kit de développement. Tizen est né à la suite de l'abandon de MeeGo par Nokia. Il est soutenu par les développeurs de MeeGo d'Intel, Samsung et la fondation Linux. L'OS est destiné à une large gamme de dispositifs dont les smartphones, tablettes, netbooks, SmartTV et les systèmes de divertissement embarqués des véhicules. Cette étape importante du développement de Tizen montre un OS dont le code se rapproche d'une version qui pourra bientôt êtr...

    Read the article

  • Cocos2d iOS A* Star Path finding help

    - by user32581
    Hello I need help implementing this class https://github.com/sqlboy/tiled-games/tree/master/src into my iOS game. Im using the suggested code of: AStarPathFinder pathFinder = [[AStarPathFinder alloc] initWithTileMap:tileMap collideLayer:@"collide"]; // Optionally, you can set the name of the collide property key and the value it expects. [pathFinder setCollideKey:@"collidable"] // defaults to COLLIDE [pathFinder setCollideValue:@"True"] // defaults to 1 // highlight a path (src and dst are tile coorindates) [pathFinder highlightPathFrom:srcTile to:dstTile]; // move a sprite [pathFinder moveSprite:player from:srcTile to:dstTile atSpeed:0.1f]; I get the following error: Instance method '-initWithTileMap:collideLayer:' not found (return defaults to 'id') This is the official post for the class: http://www.cocos2d-iphone.org/forums/topic/just-pushed-a-cctmxtiledmap-a-pathfinding-class-to-github/ The only other code I added was: #import "AStarPathFinder.h" I think I am perhaps missing something! I am grateful for any help!

    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

  • How much isometric sprites can one optimize by mirroring and alike?

    - by Tom
    I am working on a basic isometric game, and am struggling to find the correct mirrors. I have managed to get SE out of SW, by scaling the sprite on X axis by -1. Same applies for NE angle. Something is bugging me, that I should be able to also mirror N to S, but I cannot manage to pull this one off. Am I just too sleepy and trying to do the impossible, or a basic -1 scale on Y axis is not enough? What are the common used mirror table for optimizing 8 angle (N, NE, E, SE, S, SW, W, NW) isometric sprites?

    Read the article

  • Problem playing repeat animation/action?

    - by Beast
    I'm calling this function on multiple sprites after checking numberOfRunningActions()"to play same animation but it's not working only the first tagged sprite plays the animation. What am I doing wrong? void CGame::playAnimation(const char* filename, int tag, CCLayer* target) { CCAnimation* animation = CCAnimation::animation(); CCSprite* spriteSheet = CCSprite::spriteWithFile(filename); for(int i = 0; i < spriteSheet->getTexture()->getPixelsWide()/SIZE; i++) // SIZE is an int value { animation->addFrameWithTexture(spriteSheet->getTexture(), CCRect(SIZE * i, 0, SIZE, SIZE)); } CCActionInterval* action = CCAnimate::actionWithDuration(1, animation, true); CCRepeatForever* repeatAction = CCRepeatForever::actionWithAction(action); target->getChildByTag(tag)->runAction(repeatAction); }

    Read the article

< Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >