A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

0
votes
1answer
66 views

How to determine the best approximate direction [duplicate]

I want to determine which sprite to use when one agent is "facing" another agent. My game is 2d, and uses 8-directional movement. Deciding which sprite to use for movement is easy enough since there ...
2
votes
1answer
388 views

Moving sprites based on Delta time - consistent movement across all devices with different resolutions

This is the formula I am currently using to move my sprites across the screen: Examples below only deal with X coordinates to keeps things as short as possible. Initial variable declarations: float ...
1
vote
1answer
3k views

LibGdx : Animations not working on custom actor

I have this code for rendering a sprite, retrieved from a TextureAtlas public class SpriteActor extends Actor { private Sprite sprite; public SpriteActor(TextureAtlas atlas, String spriteName) { ...
6
votes
1answer
1k views

Mip Maps on 2D Sprite causing black line above. Why is this?

I am new to Unity. I'm trying it out and using Futile for a code-first approach, but still importing textures using the Unity system. The problem I'm having is that when I use mip maps to scale large ...
3
votes
2answers
1k views

scaling point sprites with distance

How can you scale a point sprite by its distance from the camera? GLSL fragment shader: gl_PointSize = size / gl_Position.w; seems along the right tracks; for any given scene all sprites seem nicely ...
0
votes
5answers
1k views

Collision detection logic

Edit 2 In the following picture sprite1 (the red square) is hitting the platform from the left, so: sprite1_rightEdge>platformSprite leftEdge would be true, so I can simply reposition ...
1
vote
2answers
355 views

Sprite not rotating around its centre after Scaling at its centre

If I scale a sprite at its centre, then try to rotate it around its centre as well, the rotation does not occur around its centre. If you need to rotate, for example a scaled ball,the way its working ...
1
vote
1answer
218 views

How to attach one sprite to another in LibGDX?

I want to attach one sprite to another so that it is always located at the 'bottom' of the other sprite, regardless of how the main sprite is rotated.
0
votes
2answers
150 views

Sprites: Are there any tools to scale sprites individually without using Photoshop/GIMP? [closed]

I am using TexturePacker as tool to pack my 2D sprites, it is good but it doesn't provide the possibility to scale individual sprites to a specific scale. I am wondering whether there is any good ...
1
vote
1answer
332 views

Powers of 2 textures in Android 2d games?

I've read a lot about the importance of using powers of 2 png's for textures when using OpenGL ES. However, how does this relate to Google's own documentation regarding the resizing of graphics for ...
2
votes
3answers
291 views

Do larger sprite sheets improve performance in html 5 games?

I know when I did some game development with XNA they recommended that we try to group are sprites into fewer sheets because the graphic card could process it faster. Does this also apply to web based ...
0
votes
1answer
438 views

Drawing more that one quad with only one glDrawArray call…?

Edit After initially thinking that my sprite batch test was faster than calling each sprite individually, it appears that is not the case!! :-( With a single set of GL calls for a each sprite, I can ...
3
votes
0answers
439 views

Optimal OpenGL 2D Sprite Batching (Best Practice)

I am working on simple 2D engine using OpenGL (3.3+) for rendering and was wondering what the optimal method of sprite batching would be. I plan to put all sprites into one (or fewer) texture atlases. ...
2
votes
1answer
5k views

Managing sprite sheets for animation [closed]

I am trying to use a sprite sheet for animation but I'm having some trouble with my implementation. The three key things that I require my code to do are: Play through a set of images once, for ...
0
votes
1answer
351 views

Displaying sprites in a 2.5D raycasting engine

I'm developing a raycasting engine like the one used in DOOM, Wolfenstein 3D, etc. My engine is capable of correctly displaying walls and textures on walls, but I'm stuck at sprites rendering. Given ...
0
votes
0answers
121 views

Flash CS6 Spritesheets and XNA

So new with Adobe Flash CS6 comes the new Feature to export Movie Clips as a Spritesheet which seems very nice! I have a few questions to CS6: http://imgur.com/enllkyL Its nifty but it lost its "up ...
2
votes
1answer
139 views

Get average tile color

In my 2D game I have TileSet class that loads the texture and creates Rectangle[] array which stores each tile coordinates. Pretty basic stuff. Now I'd like to also calculate and store the average ...
1
vote
1answer
452 views

Love2D : How can I keep up with lots of small sprites' collision data?

So I'm using a SpriteBatch to keep up with lots of small pieces for a falling-piece puzzle game. I have an array of Quads (for different color blocks), and they are randomly added to the ...
0
votes
2answers
1k views

How to scale a sprite with its center as origin?

I'm trying to zoom-in a sprite gradually from 0% to 100% (a sprite called SelectionBox), so it zooms from the middle of the sprite, not from the upper-left corner. I'm almost there, but I'm having ...
0
votes
1answer
291 views

Love2D : Problem rotating image in a SpriteBatch

I'm working on a falling blocks type of game with triangular pieces. I'm using a SpriteBatch to accumulate and remember the pieces and their locations. The problem is that when I rotate a scaled ...
-1
votes
1answer
207 views

Drawing multiple sprites with clear screen for every frame

I googled with best of my skills, but I cannot find any relevant answer to my problem. I'm making a game with an isometric view. I need to draw multiple sprites on the screen and before switching to ...
6
votes
1answer
750 views

2D animation: Animated 3D models or sprites with animation frames?

Starting out with new project, I am stuck choosing between: 3D textured model animated directly through the renderer 2D sprites and drawing each animation frame The game will be 2D platform, I ...
-1
votes
2answers
1k views

Moving a sprite towards an x and y coordinate

Given a sprite with an x and y coordinate, how would I move it toward another sprite with an x and y coordinate? I've already made it face towards the other sprite, and I've made it move towards the ...
-1
votes
2answers
1k views

Semi Transparent Background in Scene [closed]

In my game I want to create game over scene which is semi transparent so game scene become partially visible. Game over scene contain several button that are not transparent but I need only ...
2
votes
2answers
2k views

Common practice when handling sprite animation

Let's say I'm using the following sprite as a sample to try LibGDX Animation and TextureRegion. http://www.smackjeeves.com/images/uploaded/comics/7/8/78bc6b62fEySW.gif As you can see, the provided ...
0
votes
1answer
231 views

Revolve FlxSprites Around a Central FlxSprite in Flash Game made with Flixel

I have been working on a Flash game made in Flash Builder using the Flixel library. I have been trying to dynamically create a group of FlxSprites , and revolve them around a player controlled class ...
1
vote
0answers
141 views

What program generates character sprite sheets like this? [duplicate]

I see template sprites like this a lot but cant find what program creates them. To clarify I am looking for the program or generator that is creating the characters not laying them out. I've seen the ...
-3
votes
1answer
208 views

java app goes too slow in android os [closed]

The problem is that my java app contains too many animated sprites and it runs very slowly on android system. Does the usage of .gif animation instead of sprite animation will improve the speed? I ...
0
votes
2answers
109 views

Returning The Position Of A Sprite Drawn & Updated By A List [closed]

My problem is this, when iceBoy hits any of the newGrounds in the ground.groundAmmount list, it will return the specific position of this newGround so that i can set iceBoy's position based on the ...
0
votes
2answers
166 views

Why does my sprite animation sometimes runs faster? [closed]

I don't know why each time I call the Update_Animation function, my sprite animation runs faster. Is it caused by gameTime? How to fix it? Here's the relevant code: class Character { // ...
1
vote
2answers
817 views

Drawing Sprites in Android OpenGL efficiently?

I want to basically give myself some sprite drawing functions (making use of openGL) such as; draw(Texture,x,y) I want to do this using OpenGL-ES 2.0 on Android. Since the textures can be varying ...
0
votes
1answer
537 views

Using depth buffer on a sprite

I am following this guide: http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:tiled_maps Trying to create a tiled map that also supports multiple layers. The guide says that a way is to use ...
1
vote
2answers
186 views

Defect in polygon sorting [closed]

I have a 2D game with sprites that come from texture atlases. I'm trying to resolve the sorting of my sprites for rendering. I want two sprites to be ordered by their order of insertion, or z-order, ...
3
votes
2answers
2k views

Point Sprites vs Textured Quads in Open GLES 2.0

I'm wondering what would perform better, point sprites (GL_POINTS) or regular sprites (GL_TRIANGLES). Here's the scenario: I am developing a simple particle system to allow me to produce various ...
0
votes
4answers
825 views

How to combine multiple sprite sheets from multiple sources (Actionscript/Starling)

In starling, it's faster if you use BitmapText instead of traditional text. Which is well great except for one issue. Right now the sprite sheet I was making was with a single Fla. I just created the ...
1
vote
1answer
1k views

Sprite Animations in XAML for Windows Phone 8

I'm developing a 2D game for windows phone. It will feature rather simple 2D graphics and animations. I can get most things done using XAML an storyboards for animations. The performance is fine as ...
0
votes
1answer
197 views

xna: Methods for having sprite characters in 3d game?

Methods for having sprite characters in 3d game? I am making a game much like Doom. The world is 3d but objects and characters are 2d sprites. I am not asking about billboarding objects. I am asking ...
0
votes
1answer
290 views

Canvas background from sprite (HTML5)

I am starting to develop my fist bigger game in HTML5 and struggling a bit with sprites. I can cut out single items, but I need to repeat them as well. For example, I have a battle ground that ...
0
votes
1answer
873 views

Ligdx Box2d : convert box2d coordinates into screen coordinates

I'm new in libgdx and i have a little problem. I created a body in box2d and i want to assign it a sprite; for that i need to get the position of the body,then insert into the main loop the updated ...
8
votes
2answers
947 views

Following a path in a smooth fashion

I am currently making a 2d tower defense game with a static, predetermined lane that the enemies follow (i.e. towers cannot block the path and path finding is not the problem I am trying to solve). I ...
8
votes
7answers
2k views

What's the best way of transforming a 2D vector into the closest 8-way compass direction?

If you have a 2D vector expressed as x and y, what's a good way of transforming that into the closest compass direction? e.g. x:+1, y:+1 => NE x:0, y:+3 => N x:+10, y:-2 => E // ...
2
votes
1answer
3k views

Android: Improving surfaceView?

I'm using Surfaceview in my Android app. I have two threads, one for UI and another for rendering and updading the UI. I am limiting my frames per second to 30 fps and have employed frame-skipping ...
1
vote
0answers
195 views

Detect Sprites, they are in Shape or Not which random draw in Cocos2d

I have searched a lot on web and found some of help ful links as exact my question. Link 1 Link 2 But still i am not success to achieve this, i have done some of code lines, as like draw line by ...
4
votes
3answers
2k views

Smooth Sprite Movement - Don't Add Velocity to Position?

I am trying to figure out if there is a way to move a sprite smoothly on the screen at different speeds without stuttering, but keeping the effect that it's moving smoothly; especially at faster ...
0
votes
1answer
504 views

set TouchEvent to every particle in SpriteParticleSystem in andEngine livewallpaper

All I have working on andEngine Live wallpaper and I have use SpriteParticleSystem. I want to add touch event to every Sprite of SpriteParticleSystem and remove that sprite from scene. I have use ...
4
votes
2answers
487 views

Are 2D art assets typically created at their intended in-game display size?

I'm wondering if game makers create their sprites smaller than their intended in-game size in order to be more efficient or whether doing that produces unacceptable quality.
-6
votes
1answer
878 views

How can I make sprites like diablo's for my soon-to-be isometric rpg? Like in all directions [closed]

(xna newcomer)I can use blender(3d modelling tool). I just can't make people, but if I have to, I'd learn it. How can I do that? I plan on making a lot of armor sets, equipments too. How would I go ...
11
votes
1answer
580 views

How do I create multiple 2D spotlights?

I'm looking to create a 2D "spotlight" effect that allows a spotlight on multiple entities. I.e., as if several sprites were holding torches. For a single entity (one spotlight), I use a technique ...
1
vote
1answer
1k views

haxe level scrolling

How would level scrolling be implemented with haxe and nme? I started plying with haxe and currently the only way to display things on screen is by using nme.display.Sprite. I don't think changing ...
3
votes
2answers
154 views

How can I draw a texture line by line

I wish to draw a texture to the screen line by line (horizontal lines). Can I do this in xna? At first I wish to just start at the top of the texture, draw one single horizontal line of pixels and x ...