A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

4
votes
2answers
437 views

Geometry vs sprites

I'm developing an android game, where the enemies are geometrical shapes. Performance is a main goal for me so I was wondering if defining shapes directly in OpenGL would be more efficient than using ...
4
votes
1answer
2k views

Should I be subclassing CCSprites?

When I am working with cocos2d I can add CCSprites to the layer or 'stage' and manipulate them. Now, to do my ongoing calculations for movement AI and such, things that will always run, should I: ...
4
votes
3answers
9k views

Are there any good 2D fighting game engines that can be used to make a commercial product?

I'm looking for a good 2D fighting game engine based on sprites. I really dont care much about which language that it is programmed in. Specifically I'm looking for an engine I can use for a game I ...
4
votes
1answer
2k views

Mixing sprite drawing with 3D primitive drawing in XNA?

In my game, I have a base Note class, and various subclasses of Note. In addition, I have a NoteCollection class which contains a collection of these Note objects and draws them to the screen. ...
4
votes
1answer
143 views

cost of texture change vs color change

How would I go about determining the difference in cost between changing the render color of an object every frame vice changing the texture (same sheet, just changing the source rectangle) every ...
4
votes
2answers
1k views

LibGDX stretching 2d graphics

I have a problem with stretching sprites in LibGDX. I have one png file for the sky in the game (1 x 1000px) and I want to render it 1000 x 1000px sprite.setSize(pixelWidth,pixelHeight); I want to ...
4
votes
1answer
1k views

Orthographic Camera Zooming

In XNA I am using a spritebatch to render a board. I have created a camera class which can provide me a view and projection matrix. Currently I am supplying the view matrix to my sprite batch when I ...
4
votes
1answer
272 views

Letting the user draw a Polygon Body and Image

In my game, I want to provide the user with a drawing feature. By free hand drawing, the user creates a polygon shape. Then, in my game implementation, I have to create a body for the found vertices ...
3
votes
1answer
722 views

How do I make a jumping dolphin rotate realistically?

I want to program a dolphin that jumps and rotates like a real dolphin. Jumping is not the problem, but I don't know how to make the rotation. At the moment, my dolphin rotates a little weird. But I ...
3
votes
1answer
884 views

How do I make a 2D character aim their gun toward the mouse?

Heli Attack is a perfect example of the shooting mechanic I'd like. The character aims perpetually toward the mouse. What's going on here? From what I've read so far, you could separate the arm and ...
3
votes
2answers
18k views

How are 8/16 bit sprites created?

I already found this question, but it only talks about the kind of software used - not the actual methods. Were they drawn at a high resolution first and then shrunk down? Or did you just zoom way in? ...
3
votes
2answers
700 views

SpriteSheet Animation with XNA

Hi i'm working on my First 2D Game with XNA and I have a little problem. To give a running effect to my Sprite, I scroll through a SpriteSheet with this code(running right): if (AnimationDelay == 6) ...
3
votes
2answers
696 views

Better to use fixed sprite size or variable sprite sizes in a sprite sheet?

you have N frames for an animation (an idle animation for example) of a 2D character. What is the best resolution to use for each frame? The problem is that if you save the N frames such that each of ...
3
votes
3answers
462 views

What's the best place to showcase my pixel art?

I recently started learning spriting/pixel art to help propel my game development endeavors and I've gotten to the point where I'd like to start sharing it for comments, critiques and other feedback. ...
3
votes
4answers
546 views

Is character movement with an animated sprite controlled by the animation itself or moved manually?

How is a walking animation of a given character designed? I can see two possible ways: The first way is to draw each frame of the animation such that, if the frames are displayed at position (0,0), ...
3
votes
2answers
525 views

Sprites are sometimes blurry in Flash

I am playing around with drawing an SVG sprite (imported in through [Embed]). Depending on the coordinates of the image, sometimes it appears more crisp than others. The following image shows how at ...
3
votes
1answer
611 views

Collision and response between sprites?

What is an easy way to have sprites collide and react to the collision? E.g. if I'm writing a game in XNA or with Canvas 2D and need to write the code myself very simply.
3
votes
2answers
2k views

How can i create sprite sheet from 3d model (3D studio max)

I built simple 3D model of a car, with simple animation in which it's wheels are turning. Now i want to create a sprite sheet, the only way i know how to do it, is to render manually 20 frames from ...
3
votes
3answers
4k views

what is more expensive 2D sprites or 3D models?

Me and my friends are programmers.We decided to try ourselves in game design. As we don't want to find ourselves in debts, we decided to avoid investors. We want to develop and publish a couple of ...
3
votes
2answers
1k views

How do you set the movement speed of a sprite?

I'm using Slick 2D/Java to play around with graphics. Getting an image to move is easy: Input input = gc.getInput(); if(input.isKeyDown(sprite.up)){ sprite.y--; }else if ...
3
votes
2answers
1k views

What is causing these visual artifacts on my OpenGL sprites?

What could be the cause of the defects in my characters sprite? I am using OpenGL ES 2.0. I draw my sprites in a sprite batch that uses UV coordinates from one large texture atlas. If you look around ...
3
votes
2answers
968 views

Managing animations

I'm developing a 2d game that requires sprite based animations. I was thinking about which is the most convenient way to manage many of these sprites all together with timings. I already know how ...
3
votes
2answers
1k views

OpenGL ES 2.0: 2D game rendering, no performance gain with glDraw call batching

I just did a small benchmark. To my surprise batching sprites into a single draw call doesn't give any significant performance boost. Following are my results: Hardware: iPod touch 4 Extra info: ...
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 ...
3
votes
1answer
282 views

Combining multiple sprites vs separate sprites

I have a character which can hold ten types of weapons. Should I: Create ten sets of animations for the character with each weapon Create animations for each weapon, and programmatically draw them ...
3
votes
2answers
2k views

Turning model from 3ds max file into sprite

I'm planning to buy animated 3D assets to render and use as 2D sprites in my game, but i don't know anything about 3ds max or own any software. How do i render the animations (i need top-down ones) to ...
3
votes
1answer
468 views

How to prepare a sprite for a game?

For example, I created my character drawing on Paint.NET using the Pencil tool and now it's a sprite like asset. If I want him to move do I need to create many different poses for him and render them ...
3
votes
1answer
109 views

Pygame collision detection less frequent when objects are increased

I currently experiencing an issue in pygame where whenever i increase the number of objects e.g. platforms, rocks for a in range(150): rock = Rock(0,0) OR incresing the range which they spawn ...
3
votes
1answer
119 views

How to make a map surface object

I'm making a 2d tile based game. In pygame I could create a map like this: screen = pygame.display(resolution) map = pygame.Surface(width, height) for tile in all_tiles: map.blit(tile) ...
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 ...
3
votes
1answer
2k views

How to “swing” bounding box and update collision for sprite swinging a weapon?

I have a simple question about sprite swinging weapons. I am making an RPG and would like something other than stabby-swords, so why not swinging swords? I have a bounding rectangle for them, and the ...
3
votes
2answers
5k views

Cocos2d rotating sprite while moving with CCBezierBy

I've done my moving actions which consists of sequences of CCBezierBy. However I would like the sprite to rotate by following the direction of the movement (like an airplane). How sould I do this with ...
3
votes
2answers
667 views

XNA 4.0: Trouble Aligning an Animating Sprite (Texture Origin)

I'll try to explain this as best as I can. I'm trying to build a game where there exists a "Surfer" who is surfing down a rail. I have a sprite sheet for the surfer however I have been running into ...
3
votes
3answers
1k views

How to animate a character from a sprite sheet?

I'm making an online game, and I had been using a blank square as the character until recently. Now I want to add a real, animated character. I downloaded a free sprite sheet which has 12 (3x4) ...
3
votes
1answer
368 views

Space Invaders-type game: Keeping the enemies aligned with each other as they turn around?

OK, so here's the lowdown of the problem I'm trying to solve. I'm developing a game in PyGame that's a cross between Space Invaders and Columns. I'm trying to make the motion of the enemies similar ...
3
votes
3answers
8k views

Bounding box of a rotated rectangle (2d)

I can see this has been asked before in various ways. I am struggling to work it out though hence asking again. 2d sprite that moves and rotates. I'm looking to contain it in a bounding box as it ...
3
votes
3answers
405 views

How can I get a list of sprites which are being drawn in the current viewport using XNA?

Just starting out using XNA to draw 3D scenes and have a question about determining which objects are currently visible. If I load many thousands of sprites and shapes in a scene, then render the ...
3
votes
2answers
734 views

How to store character moves (sprite animations)?

So I'm thinking about making a small rpg, mainly to test out different design patterns I've been learning about. But the one question that I'm not too sure on how to approach is how to store an array ...
3
votes
2answers
2k views

Scrolling 2D sprites on a map with a camera

I'm working on a 2D sprite-based strategy-type game (ok, full disclosure: it's a tower defense game), and I'm having a problem getting the actors to behave correctly when I move the camera. I've got ...
3
votes
1answer
79 views

How do I edit a Texture2D at run-time to visually indicate connected tiles?

I'm making a 2D sandbox game in C# and MonoGame, and I have a couple of tile sprites. These tile are loaded in-game as Texture2Ds. I want to have blocks visually connect to adjacent blocks. An ...
3
votes
2answers
1k views

SDL2 sprite batching and texture atlases

I have been programming a 2D game in C++, using the SDL2 graphics API for rendering. My game concept currently features effects that could result in even tens of thousands of sprites being drawn ...
3
votes
1answer
296 views

Collision detection for sloping tiles

I've been looking into adding 'sloping' tiles into my platform game and my first attempt at collision detection with these tiles has produced some promising results (considering it's a first attempt), ...
3
votes
1answer
213 views

Sfml: Sprite scale transformation animation

Is there any way to animate a transformation on sf::Sprite like setScale or setPosition? ie: sprite.setScale(0.5f,0.5f);. I want the transition between normal and half scale be smooth. Thanks!
3
votes
2answers
551 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. ...
3
votes
2answers
3k 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 ...
3
votes
4answers
3k views

How to move a sprite automatically using a physicsHandler in Andengine?

I use a DigitalOnScreenControl (knob with a four-directional arrow control) to move the entity and the entity which is bound to a physicsHandler. physicsHandler.setEntity(sprite); ...
3
votes
1answer
688 views

How do you get textures out of a png file

I have 1 png of many different textures. I want to use these textures in my iphone game using cocos2d. I found the program "Zwoptex" where you can combine many textures to one png and create a plist ...
3
votes
1answer
117 views

Need some advice on a java api to use for a 'presentation display board' - based on game 2d/3d tech

As part of the project i am working on I am looking to produce some software that works on a LCD display (think call center info boards) and displays various graphs (the bars grow etc in realtime, so ...
3
votes
2answers
1k views

Unity - Part of the sprite is covered in shadow

I have a sprite with Transparent/Cutout/Diffuse shader. Recieving shadows is turned on in SpriteRenderer. The light is a pointlight and I am using deffered rendering path. However when I am above or ...
3
votes
1answer
174 views

How can I render a wave effect like the one used in California Games' surfing mini-game?

Well, I'm trying to study XNA, and I'm trying to make a California Games-inspired surfing game. I got the surfer guy done, and it's working very well but I don't have any idea on how I should draw ...