A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

0
votes
2answers
29 views

Unity 2D - Instantiate a GameObject and scale it every second

I want to make a bomb-like game object, that when instantiated, takes 2 seconds to charge, and then some other event triggers. The problem is I can't make it scale smoothly for 2 seconds, and then ...
-1
votes
1answer
33 views

How can I set up a pixel-perfect camera using OpenGL and orthographic projection?

I am creating a 2D game using OpenGL and orthographic projection. For sprites, I use textured quads (actually two triangles). I want the pixel art textures for the sprites to be displayed in a ...
-1
votes
0answers
30 views

Level Backgrounds [duplicate]

I'm developing a game using libGDX but am still new, especially when it comes to designing sprites etc. So far for my sprites I've used only GIMP. However, for my game I also need different level ...
2
votes
2answers
57 views

Unity2D: Rendering multiple sprites as a single one

I'm creating NPCs in Unity 2D using C#, and I have 16x16 sprites for body, helmet, clothes and weapon. All these have a tile set which has been split in unity. I'd like to be able to render one of ...
1
vote
0answers
51 views

Gradient fill color on circular sprite

I have a white circle sprite. I know how to change its color to a solid fill color. using GetComponent<Renderer>().material.color. But how would I give it a gradient fill color. I've been ...
0
votes
0answers
20 views

Sprites power of 2 are better? [duplicate]

I was starting a Unity project, and wanted to have tilesets of 20x20, but the graphic designer mentioned that tiles like 8x8 or 16x16 are better, because it being power of 2. I asked what was the ...
1
vote
1answer
31 views

SFML Library Not Rendering Sprite Texture Updates When Accessing Sprite From Lower In Framework Heirarchy

So currently I am working on a framework for a game utilising the SFML graphics library and in one of the classes representing a renderable object in the framework there is an sf::Sprite that is used ...
1
vote
1answer
20 views

How to iterate a sprite group correctly in Pygame avoiding “maximum recursion depth exceeded”?

I'm making a game and I have almost finished it, but I'm usually finding the error RuntimeError: maximum recursion depth exceeded when I iterate a sprite group. This is an example and the group is ...
0
votes
1answer
30 views

Java: Exported JAR file doesn't load images

I am using Netbeans to create my game. The images do seem to load when I run it in Netbeans. However, the built jar file only leaves me with a blank screen. This is how I call the images in my game. ...
0
votes
0answers
36 views

speed/power trade-offs in sprite-based vs shader-based games?

I'm trying to understand how expensive (speed-wise and battery-wise) certain shader-based code is compared to the sprite-based code I'm used to. I apologize up front that this question is a bit ...
1
vote
1answer
27 views

Aspect ratios for sprites in Unity3d

I'm using Unity3D version 5.0. I'm wondering what the best way to deal with changing resolutions in Unity is. In Swift I can just use the @x2/@x3 in order for it to pick the correct sprite for it ...
0
votes
1answer
29 views

Efficient method to export a lot of pre-rendered sprites from 3D models

I have a lot of 3D Characters and I wish to use them in a 2.5D game as Sprites; in doing this I have to render them from a fixed camera angle and since each should have its own atlas file containing ...
1
vote
0answers
38 views

Editing sprite shading to change perspective?

I'm currently developing an RPG in Java with some of my friends, and one of my tasks is to do the pixel art. I'm a beginner at it, but I know that I'll get better in time. I recently finished the ...
0
votes
3answers
95 views

In Unity3D, how can I improve image clarity?

The same images that appear clearly in Adobe Flash appear blurry in Unity. My game uses quads, cubes and sprites. I've tried the game on Android, iPhone, Mac and PC, but the image appears ...
0
votes
1answer
28 views

Bouncing projectile off of sprite, the sides work but top and bottom do not

I'm having a problem bouncing a projectile off a sprite, we've been asked to move the projectile using the equations of motions which makes things a little more difficult but as far as I can see what ...
-2
votes
1answer
44 views

Sprite disappears after adding a material to it

I have background which is FirsLayer, order in layer 0 and platform over it which is FirstLayer, order in layer 1. Once I add a material to the platform, the layer doesn't seem to change but it ...
0
votes
5answers
161 views

How to properly pass sprites to a std::vector without destroying the sprite's texture in SFML?

From the official SFML tutorials, The White Box Problem:- "When you set the texture of a sprite, all it does internally is store a pointer to the texture instance. Therefore, if the texture is ...
-2
votes
1answer
33 views

addChild does not work in Flash [closed]

Have been trying to understand this problem for two weeks. When I use addChild(movieclip) in the Main.as file, it works. When I try to use it in a function in a separate class file it does not work. ...
9
votes
1answer
362 views

Why are 16×16 pixel tiles so common?

Is there any good reason for tiles (e.g. Minecraft's) to be 16×16? I have a feeling it has something to do with binary because 16 is 10000 in binary, but that might be a coincidence. I want to know ...
1
vote
1answer
40 views

Android - animating spritesheets

I'm creating a basic endless runner game on Android using SurfaceView. I have background that recreates itself constantly, which was simple enough. One problem I've always had is getting my head ...
0
votes
0answers
31 views

How to use collision masks and overlap_area in pygame?

So, I've been prototyping a game, and I've been using sprite collision, and it's not cutting it any more. I read up on the documentation about masks and overlap area: ...
2
votes
1answer
81 views

How to divide sprite sheet, but keeping the in same png?

first post here, but couldn't find an exact answer in your database, so guess I'll have to ask. I want to know how it is possible to create a ".META" file for a .png so you can extract individual ...
1
vote
3answers
117 views

2D Sprites vs UI Image Scripts in Unity

I am doing a 2D casual puzzle where the user can drag and drop some pieces into a board. The pieces are 2 or 3 or 4 tiles. Each tile may have text over the sprite. Target platform: Mobiles and ...
0
votes
1answer
44 views

Would flipping a sprite depending on direction be too inhibitive for modders? [closed]

For a game I'm making (similar to games like Terraria, Starbound etc.) I want to ensure that the framework is as modder friendly as possible. This leads me to wonder if it would be too inhibitive to ...
0
votes
1answer
51 views

Move Sprite in direction of rotation

I have the following code. void Update () { if (Input.GetAxis("Vertical")!=0) { GetComponent<Rigidbody2D>().AddForce(-transform.right); } ...
0
votes
0answers
9 views

Set FilterMode.Point to all GameObject children?

I want to scale a GameObject using FilterMode.Point. However it seems I need to apply FilterMode.Point to all children individually if I want them to uses nearest neighbor when scaling up. Is there a ...
0
votes
1answer
84 views

Resize sprite to match camera width?

I'm trying to resize my small background sprite to match the screen width of the user's device. This is what I'm trying // Use this for initialization void Start () { // Set filterMode ...
1
vote
1answer
53 views

What size should I scale my sprites to before importing them to Unity?

I'm developing a game with an 8bit look. I want to target iOS and Android devices. The real resolution for my backgrounds is 108 x 192. Should I should put them in that same resolution and scale ...
0
votes
2answers
84 views

How would I create classes for each map tile instead of using a tmx? LibGdx

I am making a top down style game using LibGdx that I want to be randomly generated each new game load. I already have the algorithm to generate the array for what tile should be what. But i'm ...
0
votes
0answers
22 views

Sprite animation in Java? [duplicate]

I know this question has been asked many times but none of the answers were very clear to me. I'm working on a small Java RPG, and so far I can control a character (drawn onscreen with a .PNG sprite) ...
0
votes
1answer
105 views

Unity 2D - scale sprite according to screen width

So I have a square sprite (width == height) and I want to scale it so that both width and height are exactly one fifth of the width screen. To find the desired pixel width I do: float ...
-1
votes
1answer
65 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
44 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 ...
1
vote
2answers
111 views

LibGDX: Easy way to draw partial sprites

I am surely overlooking something, but is there an easy to draw for example only half a sprite in LibGDX? I originally thought I could do this with setBounds() but this distorts the sprite.
1
vote
1answer
32 views

Update animation based on distance traveled instead of elapsed time?

2D sprite Animation is supposed to be based on the elapsed time from the previous update so that it runs (and looks the same) no matter the speed of the machine/device it's running on. The method ...
1
vote
1answer
202 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
99 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 ...
2
votes
1answer
156 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 ...
0
votes
2answers
328 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
91 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
36 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 ...
0
votes
1answer
93 views

Moving a Sprite using Mouse in SFML (setOrigin logic needed)

I trying to make a card game using SFML. I want to move the card relative to the position the player selects on the card. I managed to check if the card is pressed. However, when I click and drag, the ...
5
votes
5answers
392 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 ...
0
votes
1answer
59 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, ...
0
votes
1answer
85 views

How to properly give Image source for multiple sources?

I'm writing a script to change the image on the button based on previous selection. Another script is giving the CurrentAvatar variable once previous button is pressed. My problem is i can't seem to ...
1
vote
2answers
80 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
76 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
39 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
360 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
93 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 ...