A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

-1
votes
2answers
637 views

How do I make a sprite blink on an HTML5 canvas?

I'm thinking of the flashing effect many games have when a character gets hit and takes damage. Something like overlaying a lighter color on visible sprite pixels for a second.
-1
votes
1answer
118 views

How do i load, render and trasnform 2D images using Direct3D 11 API? [closed]

In my small game project using DirectX 11 API, I created a Direct3D device, and can draw 3D meshes, using web tutorials and a book. But I cannot figure out how to load, transform (rotate, scale, ...
2
votes
1answer
65 views

How to draw portion of a sprite in libGDX

Let's say i have a sprite like this: and i want to draw the lower portion of it, only the yellow color.. Initially the sprite has dimensions 10x10, i want it to be drawn 10x3 Do i have to ...
2
votes
1answer
470 views

Efficient billboarding sprites in Unity 5

What's the most efficient way to do billboarding sprites in Unity 5? I want to make a forest of sprite trees in 3d space. Those sprites need to face the camera at all times. I am working on VERY ...
6
votes
1answer
1k views

Unity3D - How to tessellate 2D sprites?

I use dynamic vertex lighting on 2D sprites. On larger sprites the lighting is uglier than on smaller ones. This is because every sprite is just a quad of two triangles. Not enough vertices there for ...
0
votes
1answer
3k views

Bad quality of the sprite in Unity

I need to import a few sprites (background platform and sky) into my game scene but it seems that their quality after importing into Unity is too bad (they are blurred). The original resolution of ...
1
vote
3answers
80 views

How to handle transparent pixels in a spritesheet

I am trying to correctly handle transparent pixels. I have a spritesheet that gave me the following: The green body is the ground physics body and the gray body around the sprite is the sprite's ...
1
vote
1answer
376 views

Unity 2D: Sprites/Diffuse is making my character weird, like an antialias

i'm trying to put light and shadows on my 2D character but when i set the material on it to Sprites/Diffuse, it's kinda putting a strange smooth on my pixels. Without diffuse: With diffuse: And ...
0
votes
1answer
145 views

How to modify the Unity sprite renderer (or create a custom one) that can display the sprites on the X-Z plane?

Prefix: I am NOT trying to rotate a sprite 90 degrees by it's transform, this changes what is up/down and forward/backwards for the object. I need the sprite displayed on the X-Z plane in comparison ...
3
votes
3answers
154 views

How do I get rid of this coloured border on my sprite?

I'm working on a 2D game in Unity. My triangle sprites display in-game with a line along one of the transparent sides: Larger view here. You might need to zoom somewhat. It's quite obvious on the ...
2
votes
1answer
13k views

How can I programatically generate sprite instances in Unity?

I want to create a block-based puzzle game that generates blocks as they are required, however I cannot seem to find any good information on how to do something like this using Unity's new sprite ...
0
votes
2answers
608 views

Optimizing file-size of a sprite-sheet for a 2D game

I have a question regarding the method of creating a sprite-sheet so that it will not consume to much disk space and still preserve graphics quality. I was researching about this topic and found ...
0
votes
1answer
125 views

After collision of two objects change the sprite and move in its direction

I've searched a lot for this question but there was no answer that could solve the problem I'm having. I'm new to unity and a very naive developer.I'm making a game in unity using c# and it's like a ...
0
votes
1answer
68 views

Is it better to use an image component or to draw on a canvas?

I am developping a small 2D RPG with JavaFX, although my question might apply to any toolkit or even any language for the matter. I have two choices to display the characters, the scenery, the items ...
5
votes
5answers
520 views

Should I ask my artist to make Sprites in full resolution or can I scale them up?

I'm started with Unity development and my artist asked me what size she should make the sprites for the game. They are all pixel art and she didn't know if she should make them on Photoshop on a ...
5
votes
2answers
4k views

Clipping a SpriteBatch Draw() in XNA

Is there any way to enable a temporary clipping mask in XNA while using a SpriteBatch? I'm drawing a bunch of Texture2D objects and Sprites in a given rectangle, and I want to make sure that said ...
0
votes
1answer
71 views

Use spritesheet frames as particles?

I want to use frames from a spritesheet as particles for my emitter. I load my spritesheet with : game.load.spritesheet('particles_sheet', 'http://stuff.lck.io/luckyslot/sprite_sheet.png', 50, 50, ...
1
vote
2answers
83 views

Is it possible to control what script is active on what sprite/object in Unity?

I have 2 objects, and I have a script which makes the player change their characteristics. I applied the script to both, and as you'd expect, pressing X button does the color, size, translation change ...
1
vote
0answers
88 views

Unity sprites are no longer batched after the object rotates/moves

With Unity 5 and access to the profiler, I'm running our game through some stress tests so I can find where our performance issues are. While testing having 1024 units on the screen with 4 selection ...
0
votes
0answers
42 views

Efficiently creating animation sprites

I'm currently developing a simple 2d game on LibGDX. The core game logic is in place, but the assets are simply taking forever to create. My current method to create each animation frame is to ...
1
vote
2answers
667 views

How do I create and implement a sprite sheet for my SFML game?

I have a game I am currently working on, and I have created 6 16 frame animations for my player character. Currently each of these are saved as seperate .jpg files, which are about 1.5x bigger than I ...
2
votes
1answer
104 views

Replacing a sprite for another on runtime (Unity3D)

I need to replace the sprite of a face down card for another sprite (of a face up card). This is the C# script attached to the face down card: using UnityEngine; using System.Collections; public ...
-1
votes
1answer
119 views

How to handle pathfinding and path following with sprites the same size as the grid?

The game I am working on is currently using 32X32 collision boxes. I have implemented a working AI (A* - path finding method) which is based on the Grid Size. Lets say that I use that 16x16 grid , ...
7
votes
3answers
462 views

Unity2D tall grass

I'm using Unity to create a 2D top-down game. Everything has been great so far, but I have come into a problem that I fail to solve properly. I want to implement "tall grass areas" where part of the ...
0
votes
0answers
20 views

organised sprite sheets for hobby game dev [duplicate]

does anyone know of any good sources of sprite sheets? I have found many good sites like spritedb and found a nice source on somewhere called sigtutorials . However, am I just being dumb or are they ...
0
votes
1answer
408 views

How to render the sprites for a 2D soft body physics system

This is not a question as to how to achieve soft body physics, but rather if I have a mass-spring system how to modify a sprite with that information. I am using unity so I dont have access to vector ...
2
votes
1answer
108 views

SNES Limitations: Number of stored Graphics?

There are plenty of resources that tell you how many sprites can appear on a screen for a SNES game and how many per scanline. There is even answers for the number of tilemaps. But when I ask the ...
0
votes
0answers
20 views

Calculating bounding rect of a sprite

I'm trying to calculate the bounding rect of a bullet image. Iw2DDrawImage draws an image with topleft to -width/2, -height/2, and I set the transform to Position, now the bounding rect's x,y should ...
0
votes
1answer
73 views

How to trim a sprite?

I have a spritesheet: var spriteSheet = new createjs.SpriteSheet({ // ... frames: { width:520, height:600, regX: 260, regY:300 } // ... }); I am computing it's physics body as follows: ...
0
votes
0answers
118 views

2D GLSL Lighting and Sprites

I'm trying to make a 2D game engine, and I really want to support ambient light as well as multiple point lights that you can define the color, intensity, radius, etc from uniforms in glsl shaders. ...
4
votes
1answer
424 views

How can I update a sprite sheet without affecting the sprites already being used?

Every time I overwrite my sprite sheet with additional or updated sprites, I have to reattach the textures to all of my Animations and Sprite Renderers. How can I update a sprite sheet without ...
1
vote
1answer
93 views

Sprite animation with “overlapping” animations?

I'm trying to implement my own sprite animation system, and so far I've got it working quite nicely. I store each animation as a "take" which basically denotes the row of the animation in the sprite ...
0
votes
0answers
62 views

Updating sprite Rect each frame

I have made a struct which sets 4 variables that define a rect void setDestSize(int width, int height) { Width = width; Height = height; } void ...
1
vote
1answer
2k views

Unity3D sprites vs Mesh Quads - Depth, Blending, Shadows

I'm new to unity but not new to game development. In my OpenGL ES 2.0 (mobile) games I create a vertex array of all my "sprites" and stuff it in a VBO. Then draw them as I need them one at a time, ...
0
votes
1answer
306 views

How to deal with different resolutions in a 2D game? [duplicate]

For example, you have a sprite of mario with a size of 20px x 20px. This sprite however was made for a game resolution of 1000px x 1000px. What if you want to provide a different game resolution as ...
1
vote
0answers
51 views

How to append to a sprite sheet? [closed]

Are there any sprite sheet tools for appending? Or really an guides to using a sprite sheet in an efficient way. Some sort of excellent tools have got to exist! Thank you!
0
votes
0answers
63 views

separate fixed-size animation sheet into texture atlas

I'd like to separate a 64px x 512px spritesheet into eight 64px 64px images in Adobe photoshop cs 5 so I can use a Texture Packer image atlas rather than a fixed spritesheet. Is this possible? If ...
0
votes
1answer
86 views

Sprites and Box2d

I'm starting to see how box2d works now, except I dont know how to scale the screen to diffrent screen sizes and how i can convert Sprite sizes to box2d units. I know box2d uses meters and such, but ...
0
votes
0answers
162 views

AndEngine: get color or trasparence in a sprite

In my app I want detect when the touch in a sprite in in the trasparence and not, my code class is this: package org.andengine.examples; import android.graphics.Bitmap; import android.util.Log; ...
1
vote
1answer
345 views

How can I create JSON sprite sheet data from a regular sprite sheet?

I want to use some art from OpenGameArt for my game. The piece I want to use is a sprite sheet containing a bunch of sprite tiles compiled into a single PNG: I want to create a JSON file with the ...
0
votes
1answer
113 views

Make continuos movements with controllers in LibGDX

I've been trying to make the OUYA controlers work with a LibGDX Framework Practice Game. Everything is working perfectly expected for one thing : The movements are not continuos. The problem is, ...
1
vote
2answers
127 views

What is the purpose for drawing vertices and shapes in OpenGL (or DX), if a game is using sprites?

Something I do not understand. All the tutorials on OpenGL, DirectX, or other, always show you how to draw a shape and then change its vertices, move it around and so on. But all the games I know ...
0
votes
1answer
86 views

Pygame - Increase and decrease the image size

I'm creating a 2D game where the player shoots cannon balls.. To give the impression of movement, i want the cannon ball to increase size untill half of the path, and then decrease untill it reach the ...
0
votes
1answer
178 views

Assigning multiple game objects to a single sprite (Unity)

I've been making a pokemon game clone on my own with Unity, as I'm a beginner and just trying to learn. Up until now I've been splicing the town pictures and manually putting them together, but this ...
0
votes
1answer
118 views

How can I cycle through sprites when the player touches some UI element?

if(Input.GetKey("y")){ gameObject.GetComponent<SpriteRenderer>().sprite = Characters[0]; } if(Input.GetKey("u")){ ...
6
votes
2answers
1k views

Is white the best base color to start with when planning to shade sprites within Unity?

I'm looking into prototyping a game in Unity which will consist of solid square sprites / tiles. I figure I can represent different types of objects with different colors for each of the tiles in the ...
1
vote
1answer
61 views

How can I implement the ability to 'cut' sprites into arbitrary shapes?

I want to create a game where you have scissors that cut a sprite in a shape that you create by dragging your finger on the screen. My problem is that I can't figure out how can I cut my sprite in ...
1
vote
2answers
2k views

LibGdx sprite rotation vs Box2D physics rotation problem

LibGdx sprite rotation vs Box2D physics rotation problem Tearing my hair out on this one. I am an experienced software developer, but very new to LibGdx and Box2D development. I am writing a game ...
1
vote
2answers
326 views

Collision between Mesh Plane and 2D Sprite

I've just recently started programming using Unity and made a couple of games with it, I'm trying out more and more advanced stuff as I do more games, but right now... I'm trying to make a game ...
0
votes
1answer
154 views

Dealing with multiple 2d sprite animations for the same object

I am using libGDX for a 2d game. Some of my in-game objects have animations, for example a soldier in top-down view that has a walking animation. That is working fine. Now, while walking, this ...