Search Results

Search found 3566 results on 143 pages for '2d physics'.

Page 10/143 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Running Unity 2d - Does not work on actual system but works fine in VM

    - by Dylan
    So I'm running Ubuntu 10.10 and I cannot get Unity 2d to work with my system. This is particularly frustrating as it works just fine in all the VMs I've tested it on. I actually really like Unity and I want to get to know it (in part) before Ubuntu 11.04. I checked Synaptic and it looks like everything's there. The only thing not installed are dev libs and so on. Should I install those as well? Obviously the difference between my system and a VM is that the VM is running off a basically brand new OS. I only use VMs to test new stuff out and remake them often, so my only guess is that I have something installed on my system that is preventing Unity from running. Any thoughts?

    Read the article

  • Triangle - Rectangle Intersection in 2D

    - by Kevin Boyd
    I had previously asked this for 3D but now I changed my strategy and would like to do the intersection in 2D. The Rectangle is axis aligned and will always be in a fixed position, and has a constant shape and size, basically I want to clip the red areas of the triangles that extend outside the bounds of the rectangle The triangles could be in any position, shape or size, I my code I have a loop where I check the triangles one by one however I am still clueless about the math. I have identified 5 cases of triangle rectangle intersection as shown here. How do I find the intersection points of the triangle and the rectangle?

    Read the article

  • Unity 2d support dropped in 12.10, what now?

    - by tomodachi
    So its been announced. Ubuntu is dropping unity 2d support. I wouldn't mind if it wasn't for two things that are important to me. 1) A working system Unity is nice, i try to use it quite often. But it lags. 2) Support for older hardware. I also have old computers. You can imagine how they would work with unity if my current laptop is slog in Ubuntu. I guess i could use another desktop environment/ window manager , like switching to fluxbox. Anyone have any suggestion ideas/solutions on how to proceed with Ubuntu in the future? All insights welcome

    Read the article

  • can't login to Unity always login to Unity 2D

    - by Goddard
    I select Ubuntu on login and it always loads Unity 2D. I ran /usr/lib/nux/unity_support_test -p And got this error X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 137 (NV-GLX) Minor opcode of failed request: 4 () Resource id in failed request: 0x21f Serial number of failed request: 42 Current serial number in output stream: 42 I'm using 12.04 with all the latest updates. nvidia-installer --version nvidia-installer: version 295.53 ([email protected]) Sat May 12 00:34:26 PDT 2012 The NVIDIA Software Installer for Unix/Linux. This program is used to install, upgrade and uninstall The NVIDIA Accelerated Graphics Driver Set for Linux-x86_64. Copyright (C) 2003 - 2010 NVIDIA Corporation.

    Read the article

  • OpenGL 2D Depth Perception

    - by Stephen James
    This is the first time i have ever commented on a forum about programming, so sorry if I'm not specific enough. Here's my problem: I have a 2D RPG game written in Java using LWJGL. All works fine, but at the moment I'm having trouble deciding what the best way to do depth perception is. So , for example, if the player goes in front of the tree/enemy (lower than the objects y-coordinate) then show the player in front), if the player goes behind the tree/enemy (higher than the objects specific y-coordinate), then show the player behind the object. I have tried writing a block of code to deal with this, and it works quite well for the trees, but not for the enemies yet. Is there a simpler way of doing this in LWJGL that I'm missing? Thanks :)

    Read the article

  • OpenGL 2D Depth Perception

    - by Stephen James
    I have a 2D RPG game written in Java using LWJGL. All works fine, but at the moment I'm having trouble deciding what the best way to do depth perception is. So , for example, if the player goes in front of the tree/enemy (lower than the objects y-coordinate) then show the player in front), if the player goes behind the tree/enemy (higher than the objects specific y-coordinate), then show the player behind the object. I have tried writing a block of code to deal with this, and it works quite well for the trees, but not for the enemies yet. Is there a simpler way of doing this in LWJGL that I'm missing?

    Read the article

  • how to create 2D collision detection

    - by Aidan Mueller
    I would like to know the best or most effective way to test for 2D collision. I also can do AABBs but when you have a line, for example, that is rotated 45º, and it is really long. it will be hitting things when it shouldn't. I might be able to go through the pixels to see if they are touching others, but that might be slow if I had a big picture. and it might add some complications if I had a movie clip made of several images. How do I check collision between two Images? How would I do circle to box? Please help : ) PS: I do know java so you can write with java syntax and then use a made up GL

    Read the article

  • Alt-Tab in Unity 2D makes app icon jiggle instead of switching

    - by itsadok
    I'm using Unity 2D as my desktop, and it works fine most of the time, but every now and then, I try to Alt-Tab to switch to a different application, and instead of switching to that window, the launcher bar opens, and the icon of the application I was trying to switch to starts jiggling. If I try to switch to something else, that icon starts jiggling too. If I click on the icon with the mouse, then it stops jiggling and switches to the requested window. What is this behavior? I haven't seen any mention of jiggling icons in Unity. I don't understand the original purpose of this, and I'd like a way to fix it so that I won't have to use the mouse.

    Read the article

  • Java 2D Rectangle Collision? [on hold]

    - by Andreas Elia
    I am just wanting to know of another (longer OR shorter) way of getting 100% effective collisions on a 2D plat-former. The current collision system that is in place works from coords on the level and does not always work reliably. Thank you in advance for any help/support. The current system draws a rectangle and is checking to see if any two points collide. From testing, the system can sometimes "glitch" and allow the player to collide into walls etc. Player Class http://pastebin.com/2zE8vz8R Main Class http://pastebin.com/A6Utb3ti

    Read the article

  • android: How to apply pinch zoom and pan to 2D GLSurfaceView

    - by mak_just4anything
    I want to apply pinch zoom and panning effect on GLSurfaceView. It is Image editor, so It would not be 3D object. I tried to implement using these following links: https://groups.google.com/forum/#!topic/android-developers/EVNRDNInVRU Want to apply pinch and zoom to GLSurfaceView(3d Object) http://www.learnopengles.com/android-lesson-one-getting-started/ These all are links for 3D object rendering. I can not use ImageView as I need to work out with OpenGL so, had to implement it on GLSurfaceView. Suggest me or any reference links are there for such implementation. **I need it for 2D only.

    Read the article

  • Fast pixelshader 2D raytracing

    - by heishe
    I'd like to do a simple 2D shadow calculation algorithm by rendering my environment into a texture, and then use raytracing to determine what pixels of the texture are not visible to the point light (simply handed to the shader as a vec2 position) . A simple brute force algorithm per pixel would looks like this: line_segment = line segment between current pixel of texture and light source For each pixel in the texture: { if pixel is not just empty space && pixel is on line_segment output = black else output = normal color of the pixel } This is, of course, probably not the fastest way to do it. Question is: What are faster ways to do it or what are some optimizations that can be applied to this technique?

    Read the article

  • monotouch 2d pixel with correct resolution

    - by acidzombie24
    I am writing up a game that is size sensitive. It needs to be pixel perfect. I believe the resolution is 480x320 pixels with the iphone being twice the width and height. My code is grid based with images exactly 16x16pixels. I found samples of opengl in the past but I never found any good tutorial that had 0,0 the top left and was the correct size in resolution (which made images look terrible) What can I use? I'd like to write the code in C# (or C++ but C# is preferred) and use monotouch. I don't know any libraries for 2d graphics. I'll figure out sound and such afterwards and I seen documentation on monotouch for input.

    Read the article

  • Drawing large 2D sidescroller level terrain

    - by Yar
    I'm a relatively good programmer but now that it comes to add some basic levels to my 2D game I'm kinda stuck. What I want to do: An acceptable, large (8000 * 1000 pixels) "green hills" test level for my game. What is the best way for me to do this? It doesn't have to look great, it just shouldn't look like it was made in MS paint with the line and paint bucket tool. Basically it should just mud with grass on top of it, shaped in some form of hills. But how should I draw it, I can't just take out the pencil tool and start drawing it pixel per pixel, can I?

    Read the article

  • Obtain rectangle indicating 2D world space camera can see

    - by Gareth
    I have a 2D tile based game in XNA, with a moveable camera that can scroll around and zoom. I'm trying to obtain a rectangle which indicates the area, in world space, that my camera is looking at, so I can render anything this rectangle intersects with (currently, everything is rendered). So, I'm drawing the world like this: _SpriteBatch.Begin( SpriteSortMode.FrontToBack, null, SamplerState.PointClamp, // Don't smooth null, null, null, _Camera.GetTransformation()); The GetTransformation() method on my Camera object does this: public Matrix GetTransformation() { _transform = Matrix.CreateTranslation(new Vector3(-_pos.X, -_pos.Y, 0)) * Matrix.CreateRotationZ(Rotation) * Matrix.CreateScale(new Vector3(Zoom, Zoom, 1)) * Matrix.CreateTranslation(new Vector3(_viewportWidth * 0.5f, _viewportHeight * 0.5f, 0)); return _transform; } The camera properties in the method above should be self explanatory. How can I get a rectangle indicating what the camera is looking at in world space?

    Read the article

  • Boat passing under a bridge in a 2D tile based RTS

    - by aleguna
    I'm writing a 2D tile based RTS. And I want to add a 'pseudo 3D' feature to it - bridges over the rivers. I havent't start any coding yet, just trying to think how it fits the collision detection model. A boat passing under the bridge and a unit moving over the bridge will eventually occupy the same cell on the map. How to prement them from colliding? Is there a common approach to solve such a problem? Or I need to implement a 3D world to do this?

    Read the article

  • Rotating multiple points at once in 2D

    - by Deukalion
    I currently have an editor that creates shapes out of (X, Y) coordinates and then triangulate that to make up a shape of those points. What will I have to do to rotate all of those points simultaneously? Say I click the screen in my editor, it locates the point where I've clicked and if I move the mouse up or down from that point it calculates rotation on X and Y axis depending on new position relevant to first position, say I move up 10 on the Y axis it rotates that way and the same way for X. Or simply, somehow to enter rotation degree: 90, 180, 270, 360, for example. I use VertexPositionColor at the moment. What are the best algorithms or methods that I can look at to rotate multiple points in 2D at once? Also: Since this is an editor I do now want to rotate it on the Matrix, so if I want to rotate the whole shape 180 degree that's the new "position" of all the points, so that's the new rotation = 0 for example. Later on I probably will use World Matrix rotation for this, but not now.

    Read the article

  • 2D management game [on hold]

    - by Simon Bull
    Very newbie question but I have a game idea in mind. It will be 2d and data centric, like football manager. However I am struggling to find a platform that would suit. I am an experienced line of business developer so am happy to write code, but I would like a platform that does some of the leg work for me so was avoiding OpenGL. I would also like to be able deploy to iOS, android, windows and OS X. What are the options? To be more clear, the game is not a normal platform or shooter type game, so game maker is likely to be way too basic and unity seems a little over the top (though I am not sure if the GUI options would fit?). The majority of the game is more like business screens just displaying data and having buttons to click. Are there options for this type of game (May help to look at football manager)?

    Read the article

  • Recommended 2D Game Engine for prototyping

    - by Thomas Dufour
    What high-level game engine would you recommend to develop a 2D game prototype on windows? (or mac/linux if you wish) The kind of things I mean by "high-level" includes (but is definitely not limited to): not having to manage low-level stuff like screen buffers, graphics contexts having an API to draw geometric shapes well, I was going to omit it but I guess being based on an actual "high-level" language is a plus (automatic resource management and the existence a reasonable set of data structures in the standard library come to mind). It seems to me that Flash is the proverbial elephant in the room for this query but I'd very much like to see different answers based on all kinds of languages or SDKs.

    Read the article

  • 2D Particle Explosion

    - by TheBroodian
    I'm developing a 2D action game, and in said game I've given my primary character an ability he can use to throw a fireball. I'm trying to design an effect so that when said fireball collides (be it with terrain or with an enemy) that the fireball will explode. For the explosion effect I've created a particle that once placed into game space will follow random, yet autonomic behavior based on random variables. Here is my question: When I generate my explosion (essentially 90 of these particles) I get one of two behaviors, 1) They are all generated with the same random variables, and don't resemble an explosion at all, more like a large mass of clumped sprites that all follow the same randomly generated path. 2) If I assign each particle a unique seed to its random number generator, they are a little bit -more- spread out, yet clumping is still visible (they seem to fork out into 3 different directions) Does anybody have any tips for producing particle-based 2D explosions? I'll include the code for my particle and the event I'm generating them in. Fire particle class: public FireParticle(xTile.Dimensions.Location StartLocation, ContentManager content) { worldLocation = StartLocation; fireParticleAnimation = new FireParticleAnimation(content); random = new Random(); int rightorleft = random.Next(0, 3); int upordown = random.Next(1, 3); int xVelocity = random.Next(0, 101); int yVelocity = random.Next(0, 101); Vector2 tempVector2 = new Vector2(0,0); if (rightorleft == 1) { tempVector2 = new Vector2(xVelocity, tempVector2.Y); } else if (rightorleft == 2) { tempVector2 = new Vector2(-xVelocity, tempVector2.Y); } if (upordown == 1) { tempVector2 = new Vector2(tempVector2.X, -yVelocity); } else if (upordown == 2) { tempVector2 = new Vector2(tempVector2.X, yVelocity); } velocity = tempVector2; scale = random.Next(1, 11); upwardForce = -10; dead = false; } public FireParticle(xTile.Dimensions.Location StartLocation, ContentManager content, int seed) { worldLocation = StartLocation; fireParticleAnimation = new FireParticleAnimation(content); random = new Random(seed); int rightorleft = random.Next(0, 3); int upordown = random.Next(1, 3); int xVelocity = random.Next(0, 101); int yVelocity = random.Next(0, 101); Vector2 tempVector2 = new Vector2(0, 0); if (rightorleft == 1) { tempVector2 = new Vector2(xVelocity, tempVector2.Y); } else if (rightorleft == 2) { tempVector2 = new Vector2(-xVelocity, tempVector2.Y); } if (upordown == 1) { tempVector2 = new Vector2(tempVector2.X, -yVelocity); } else if (upordown == 2) { tempVector2 = new Vector2(tempVector2.X, yVelocity); } velocity = tempVector2; scale = random.Next(1, 11); upwardForce = -10; dead = false; } #endregion #region Update and Draw public void Update(GameTime gameTime) { elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds; fireParticleAnimation.Update(gameTime); Vector2 moveAmount = velocity * elapsed; xTile.Dimensions.Location newPosition = new xTile.Dimensions.Location(worldLocation.X + (int)moveAmount.X, worldLocation.Y + (int)moveAmount.Y); worldLocation = newPosition; velocity.Y += upwardForce; if (fireParticleAnimation.finishedPlaying) { dead = true; } } public void Draw(SpriteBatch spriteBatch) { spriteBatch.Draw( fireParticleAnimation.image.Image, new Rectangle((int)drawLocation.X, (int)drawLocation.Y, scale, scale), fireParticleAnimation.image.SizeAndsource, Color.White * fireParticleAnimation.image.Alpha); } Fireball explosion event: public override void Update(GameTime gameTime) { if (enabled) { float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds; foreach (Heart_of_Fire.World_Objects.Particles.FireParticle particle in explosionParticles.ToList()) { particle.Update(gameTime); if (particle.Dead) { explosionParticles.Remove(particle); } } collisionRectangle = new Microsoft.Xna.Framework.Rectangle((int)wrldPstn.X, (int)wrldPstn.Y, 5, 5); explosionCheck = exploded; if (!exploded) { coreGraphic.Update(gameTime); tailGraphic.Update(gameTime); Vector2 moveAmount = velocity * elapsed; moveAmount = horizontalCollision(moveAmount, layer); moveAmount = verticalCollision(moveAmount, layer); Vector2 newPosition = new Vector2(wrldPstn.X + moveAmount.X, wrldPstn.Y + moveAmount.Y); if (hasCollidedHorizontally || hasCollidedVertically) { exploded = true; } wrldPstn = newPosition; worldLocation = new xTile.Dimensions.Location((int)wrldPstn.X, (int)wrldPstn.Y); } if (explosionCheck != exploded) { for (int i = 0; i < 90; i++) { explosionParticles.Add(new World_Objects.Particles.FireParticle( new Location( collisionRectangle.X + random.Next(0, 6), collisionRectangle.Y + random.Next(0, 6)), contentMgr)); } } if (exploded && explosionParticles.Count() == 0) { //enabled = false; } } }

    Read the article

  • Good resources for JavaScript 2D game programming?

    - by DJCouchyCouch
    As an exercise, I've decided to look into JavaScript for game programming. While it's far from being the best language for that, I do like the idea that it's cross-platform and it's always available as a web page. So I thought I'd see what I could do with it. Specifically, I'd like to make a 2D tile-based game of some kind. Where can I find resources to do that? I'm sure this question's come up before, but I can't find any reference to it.

    Read the article

  • Clicking on clues and other objects in a 2D cluedo like game

    - by Anearion
    I'm a java/android programmer, but I don't have any experience in game programming, I'm already reading proper books, like "Pro Android Games", but my concerns are more about the ideas behind game programming than the techniques themselves. I'm working on a 2D game, something like Cluedo to let you understand the genre. I would like to know how should I act with the "scenes", for example, a room with a desk, TV, windows and a lamp. I need to make some items tappable and others not. Is it common to use one image (invisible to the user) with every different item a different color, then call the getColor() method on the image? Or use one image as background, and separate images for all the items? If the latter, how can I set the positioning? and should I use imageView or imageButton? I'm sorry if those are really low quality questions, but as "outsider" ( I'm 23 and still finishing my university ) it's pretty hard learn alone.

    Read the article

  • "Time Control" in a 2d Platformer

    - by Woody Zantzinger
    I am making a 2d platformer where the player can press a button, and restart the level, only their previous character will also run the level at the same time, like they are traveling back in time. I know other games have done this before, and the way I have thought of doing it is to make the game character have a set of actions (Idle, Jumping, Walking Left etc.) and then detect changes in those actions and log them into a list along with the game time. So then when I need the character to run the level again on its own, I can just go through the list changing its actions at the right time. Is this the best way to do it? Does anyone have any experience in this? Thanks.

    Read the article

  • OpenGL 2D Rasterization Sub-Pixel Translations

    - by Armin Ronacher
    I have a tile based 2D engine where the projection matrix is an orthographic view of the world without any scaling applied. Thus: one pixel texture is drawn on the screen in the same size. That all works well and looks nice but if the camera makes a sub-pixel movement small lines appear between the tiles. I can tell you in advance what does not fix the problem: GL_NEAREST texture interpolation GL_CLAMP_TO_EDGE What does “fix” the problem is anchoring the camera to the nearest pixel instead of doing a sub-pixel translation. I can live with that, but the camera movement becomes jerky. Any ideas how to fix that problem without resorting to the rounding trick I do currently?

    Read the article

  • Tips for building an AI for a 2D racing game

    - by declique
    I have a school project to build an AI for a 2D racing game in which it will compete with several other AIs (no collision). We are given a black and white bitmap image of the racing track, we are allowed to choose basic stats for our car (handling, acceleration, max speed and brakes) after we receive the map. The AI connects to the game's server and gives to it several times a second numbers for the current acceleration and steering. The language I chose is C++, by the way. The questions are: What is the best strategy or algorithm (since I want to try and win)? I currently have in mind some ideas found on the net and one or two of my own, but I would like before I start to code that my perspective is one of the best. What good books are there on that matter? What sites should I refer to?

    Read the article

  • Alternatives to multiple sprite batches for achieving 2D particle system depth

    - by Ergwun
    In my 2D XNA game, I render all my sprites with a single sprite batch using SpriteSortMode.BackToFront and BlendState.AlphaBlend. I'm adding a particle system based on the App Hub particles sample. Since this uses SpriteSortMode.Deferred and BlendState.Additive, I will need to have two SpriteBatch.Begin / SpriteBatch.End pairs: one for 'regular' sprites, and one for particles. In my top-down shooter, If I want to have explosions appear under planes, but above the ground, then I believe I will have to have three Begin/End pairs, first to draw everything under the explosions, then to draw the explosions, then to draw everything above the explosions. If I want to have particle effects at multiple different depths, then I'm going to need even more Begin/Endpairs. This is all easy to code, but I'm wondering if there is an alternative way to handle this?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >