A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

2
votes
2answers
817 views

Card game - creating card Listener

I am making a card game where there are 21 cards on hand and 2 options from where user can draw cards to his hand and throw a card from hand. I am new on game development and I'm following the ...
1
vote
1answer
67 views

Polygons and actionlisteners Libgdx

I've been browsing these forums for a while now and I nearly always am able to find an answer without having to ask my own question! Such a great community! This is the first time I've been stumped ...
0
votes
1answer
34 views

Did they remove Sprite sorting layers from Unity?

I can't figure out how to set it. I thought it was a setting on the sprite renderer but it doesn't seem to be there? Google isn't turning up any results.
0
votes
2answers
397 views

How to fix overly blurred texture / image in unity?

so, I'm not sure what caused this, let image below do the explanation : How to fix the overly blurred texture in unity? It's so frustrating, since I can't get it right, because when I tried it in ...
3
votes
3answers
960 views

Frameskipping in Android gameloop causing choppy sprites (Open GL ES 2.0)

I have written a simple 2d platform game for Android and am wondering how one deals with frame-skipping? Are there any alternatives? Let me explain further. So, my game loop allows for the ...
1
vote
1answer
391 views

Cocos2d/Cocos2d-x Attaching an arrow (sprite) to another body sprite (person)

I am trying to set up a simple bow and arrow game. When the arrow hits the enemy body, the arrow's body is deleted and the arrow sprite continues to update, keeping the position correct in relation to ...
1
vote
0answers
23 views

Renderable object abstraction

In my engine I have 2 types of 2D renderables: sprites and groups (and maybe primitives later). Sprites are just textured quads and groups are multiple renderables grouped in a single object. I have ...
0
votes
1answer
46 views

How do I fix a delay between the first and second KeyEvent

I recently got really interested in making my own little game. As I have no real game development background I'm still figuring stuff out, but I encountered a little problem. While working on the ...
0
votes
2answers
96 views

Calculate ticks for animation delay

Hi guys I am trying to calculate the correct elapsedTime for each frame in my animation. Example I have a sprite called stance that has 20 frames I want to give each frame a tick delay property that ...
0
votes
1answer
167 views

Unity draw part of sprite sheet

Im working in Unity and im finding the animator isnt working for what im trying to do in my 2d game. What I want to do is build a specific animation using sprite sheets, then be able to reuses that ...
2
votes
2answers
68 views

object smooth orbital limit around another object depending on mouse drag

I am working in Unity. I have special objects that can each be dragged freely around in 2d. The objects cannot get too close to other objects (minimal Vector3.distance allowed is 1.5f). I also have ...
0
votes
1answer
82 views

Isometric scene in SpriteKit

I tried play with spritekit in isometric grid. But i can't understand how to fix level. import SpriteKit import XCPlayground let view:SKView = SKView(frame: CGRectMake(0, 0, 1024, 768)) ...
1
vote
1answer
242 views

How can I spawn a sprite based on a condition after the game starts?

How do I spawn a sprite anytime later in the game when the game starts? I'm using FlashDevelop with Flixel. I did try it in override public function create(): void. It works only in the beginning. I ...
0
votes
1answer
73 views

Positioning partials of character sprite animations

I'm not entirely sure how to best explain what I'm doing. Maybe I'm going about this completely the wrong way. If any of you find that that is in fact the case, I would appreciate it if you told me ...
2
votes
1answer
1k views

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone. Here are pictures demonstrating the problem: http://brandonyuh.minus.com/mFpdTSgN17VUq On the desktop ...
0
votes
2answers
79 views

2D top down RPG animation architecture problem

I have a problem with my sprite animations right now. I have different animations and sequences for each character so an specific archer might do a ranged attack in which he just plays one animation ...
0
votes
2answers
38 views

Black lines on sprites

I am having the issue as seen below while using a textureAtlas with libgdx. I haven't found anyone else with the issue so I decided to ask here. Here is an image of the textures in the game screen: ...
1
vote
1answer
763 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 ...
2
votes
2answers
745 views

Unity 2D Alpha cutout layer for Sprites

I'm trying to make a simple Fog of War effect for my 2d game, similar to these: . I want to have a sprite layer of black and then have a sprite to cut out itself from the black layer, leaving a ...
1
vote
1answer
64 views

Unity3D (2D) - Make sure Item Dragged Is Top Item Visually

I am using Unity 5 and making a 2D game in which many sprites will be stacked on top of each other and can then be moved by dragging. Sometimes when the users goes to drag from a pile, ones that aren'...
1
vote
1answer
49 views

Basic Animation Concept - Stuttering Sprites (Java)

The Problem I have some sprites animating across my screen (some spaceships). I alter their X coordinates (like -5, for animation) in my game loop. I want the animation to happen faster, however ...
0
votes
0answers
12 views

Setting useImmersiveMode to true makes a moving sprite blink in a LibGDX game

I'm developing a simple game where i have gravity and a body which jumps when i touch the screen and a sprite displaying in its position. All is good until i set useImmersiveMode to true on ...
0
votes
1answer
26 views

Sprite update issue

I'm currently implementing Box2D with LIBGdx and i'm having issue on update, as you can see on this video : https://www.youtube.com/watch?v=D3Nph6yftTQ whenever my player move or the camera move the ...
0
votes
1answer
65 views

Sprite Sheet Texture not being rendered

I'm making space invaders (in OpenGL/SDL) and I've run into a problem when trying to draw the sprite for the spaceship from the spritesheet. In my entity class, I have a pointer for the sprite that ...
1
vote
1answer
83 views

How should I animate sprites with separate body parts?

I am not an artist. I have a 2D Sprite broken up into different body parts that I want to animate. I know how to do it in Unity, but every artist I know would prefer to use Flash. I am trying to ...
0
votes
1answer
47 views

Unity 2d sprite repeated as background

I'm a web developer with over 12 years of experience and I'm moving my first steps in game development in the latest days. Specifically I'm playing with Unity and trying to understand how it works and ...
0
votes
1answer
30 views

Gaussian blur spritesheet/texture atlas without clipping edges

I'm trying to apply a Gaussian blur to a shadow to soften them a bit. I can apply the blur fine, but the problem is that I end up with this: Instead of this: Which isn't great. The image is part ...
0
votes
2answers
92 views

Positioning 2D (non-UI system) game objects

As an old Flash dev I'm slightly confused about how you position game objects on the screen in Unity since game objects have no width or height (only a scale). Let's say I have a container gameobject ...
0
votes
1answer
40 views

How can I make my character 'flip' in Game Maker?

I want my character to 'flip' or 'mirror' when I press 'A' or 'S'. Thing is, I've placed the origin everywhere on the character and he seems to only face one direction. Video showing what I see: ...
2
votes
2answers
524 views

Gamemaker Running Animation Flashing, showing single frame, and displaying jump and run sprites at same time

EDIT: I changed the origin of the run sprite to the center, and it is no longer hovering above the jumping sprite. It now flashes in the same location as the run sprite when moving to the side. ...
1
vote
1answer
98 views

libGDX upload z-axis of sprite to graphics card

Background: I want to obtain each fragments position via vertex interpolation to then calculate the light vector for phong shading (L = [Fragment pos] - [light source pos]). Problem: At the moment I ...
0
votes
0answers
27 views

Unity3d how to correctly using tilesets

currently I am using external tilesets like this: Load texture from file to Texture2D Texture2D tx2 = new Texture2D(2, 2); tx2.filterMode = FilterMode.Point; tx2.wrapMode = TextureWrapMode.Clamp; ...
0
votes
0answers
61 views

How can I export Flash XML that includes the symbol name used each frame?

After creating animations in Flash, I use Export Motion XML to get the animation data I need, which includes things like the xy movement, rotation, scale, etc. It includes everything I need EXCEPT ...
3
votes
1answer
120 views

Scene2D Actor walking animation?

I used to extend my Player/Entity class with Sprite, that way I could create a walking animation using SetRegion and super(stilldown.getKeyFrame(0)); I've recently started porting everything over to ...
1
vote
2answers
288 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 ...
0
votes
1answer
82 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: https://www.pygame.org/docs/ref/...
6
votes
2answers
4k views

Rendering shadow sprites in cocos2d-x

I am writing a 2D game with cocos2d-x. I want to put a "shadow" sprite on a background sprite using the equation: MAX(0, Cd * 1 - Cs * S) where Cd is the destination color (that is, a background ...
4
votes
2answers
526 views

Jittery Movement, Uncontrollably Rotating + Front of Sprite?

So I've been looking around to try and figure out how I make my sprite face my mouse. So far the sprite moves to where my mouse is by some vector math. Now I'd like it to rotate and face the mouse as ...
1
vote
1answer
91 views

Android OpenGL Sprite Component Pattern

Ok so I have a 2D OpenGL project that was originally a class assignment, and now I am using it to experiment with and to broaden my knowledge. Originally, I had been using the Normalized Devices ...
1
vote
2answers
81 views

How can I add holes to a sprite? [duplicate]

I'd like to find a way to add holes caused by a 'bomb' to my floor sprite, a bit like what is in this game here. Basically there is a sprite (the green floor) and another sprite (the bomb) that ...
1
vote
0answers
28 views

Creating a large amount of sprites and animations [closed]

For my AP U.S. Government and Politics class, I am making a spinoff of Mortal Kombat. Because of time constraints, I'm using an open source version of the game and want to create new characters. I ...
4
votes
1answer
32k views

Change the sprite of a Object in Unity

Inside the script code of the the hero(object) I want add the possibility to change its sprite. So the player hits the space button and the sprite changes into the other sprite already added to the ...
0
votes
1answer
42 views

Unity sprite renderer uses standard 2D sprite instead of custom loaded one

I have loaded a 2D sprite from the filesystem and created a sprite from it, which I then attach to a SpriteRenderer. The game object appears in the scene but for some reason it doesn't seem to be ...
0
votes
0answers
20 views

Unet 2D sync problems

I've studied Unet but I still can't get it to work right :( I have 3 problems. The first: I can't force player 1 to always spawn from a specific spawn point (and same with player 2). Therefore I've ...
1
vote
1answer
120 views

How do I make a 2D sprite flash green when tapped?

I have a sprite that is based on an image of a gray circle. When the user touches the sprite, I want the sprite to flash green, as in I want the circle to appear to turn green for 0.2 seconds. I tried ...
1
vote
1answer
83 views

2D Sprite batching in OpenGL: How to send transformation data to GPU

OpenGL newbie here. So I'm trying to implement sprite batching to draw ~100 sprites per draw call. I've created a VBO that contains texture coordinates, vertex coordinates, color data (for tinting), ...
0
votes
0answers
28 views

Splitting spritesheets and making the background transparent

Is there a quick way of splitting and removing the background of a spritesheet that's taken from the web? I'm fine with downloading software, using a website or making use of any commands that libGDX/...
0
votes
1answer
116 views

Top down 2d orthogonal view with 3D elements (Unity)

I've decided to give Unity a go with my project. I want to create a 2d RPG perspective world, but with elements of 3D mixed in. So for instance, I think I might make trees and grass 3D, for this to ...
2
votes
0answers
39 views

How to store sprite data in a VBO?

I'm planning on rendering many sprites in my games, but I am not sure which method of storing their data to use. I haven't tried all of them yet, but I want to see if I also have anything important ...
1
vote
1answer
1k views

libgdx sprite position relative to body

Apologies if this is a reiteration, as I couldn't find another discussion of this over the past couple days. Issue: I'm using libgdx and box2d, and I'm currently updating the sprite's position to ...