A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

1
vote
1answer
68 views

UI in Canvas-Games [closed]

I am quite new to programming with <canvas/> and WebGL, but very familiar in HTML5. So far, I have made to render some entities on the <canvas/>. Next would be to add a simple HUD to it. ...
0
votes
1answer
109 views

Load all bitmaps at once or only when needed?

I am starting to get a pretty hefty amount of bitmaps in my 2d game for android. I load them all in 3 colors to save some memory but the thing is, I load all of them when "Start game" is pressed, even ...
0
votes
1answer
201 views

How should I determine the bounding rectangles for frames within a sprite sheet? [closed]

I have a spritesheet for a character. The spritesheet has several rows, and each row represents an animation. The elements within a row might vary in width. How can I load the different sections of ...
4
votes
1answer
334 views

How should I handle sprite creation for customizable 2D characters?

I'm want to create avatar animations (sprites) for a browser-based MMORPG. The player is able to customize the character, and the content changes often (new weapons, armors, and so on). How can I ...
2
votes
1answer
248 views

How to split a 2D sprite tile set into individual sprites?

I see a lot of sprite catalogs for games provided as single PNG image, like the one below. I'm interested if I have to manually create tiles from that, or if there's some program that can split it ...
0
votes
1answer
103 views

What size textures do I need for a 2D grid based game if my tiles are larger than textures I have?

I'm building a grid-based game for iPad, and for usability purposes I've selected my game grid to be built of 75x75 squares. However, so far I've seen that the majority of (free)texture catalogs I can ...
1
vote
4answers
256 views

How to set speed of circular motion

Edit 2 - clarification Just to clarify, the issue I have at the moment is how I specify a time (in seconds) for a complete revolution to occur. My delta is fixed and is 1/ticks per second (1/60). ...
2
votes
2answers
129 views

Replicating no. of sprites without letting the app to slow down and crash

Is it possible that if I'm making a a simple drag-n-drop game, does making a new sprite via constructor with texture as a parameter makes the game slower and depletes more memory until it crashes or ...
2
votes
4answers
2k views

Unity: Flip Sprite Direction

I'm toying around with the new Sprite class in Unity, and I'm trying to work out how to change the direction the sprite is facing ("flip" it). I'm sure I can most likely just scale it across the x ...
1
vote
3answers
154 views

Inconsistent sprite velocity?

I'm moving my sprites using the following formula: Code that I'm using (Only shows sprite's X position being calculated but Y position is also being done) spriteGridX = 240/480; //I start out with ...
1
vote
1answer
176 views

Is it possible to achieve a smooth sprite animation with a fixed 60 FPS using Java 2D?

I've seen a lot of different game loops, and before implementing anything complicated I decided to start with a capped 60 FPS. My run method looks like this in my game thread: /** * Fixed Frames Per ...
1
vote
1answer
151 views

How can I improve the performance of texture switching without resorting to atlasing?

I'd like to use texture images that are not a sprite sheet or other form of texture atlas, mainly because I'll be consistently adding and swapping textures while I figure out the direction my game ...
1
vote
2answers
109 views

How to draw a rotated pixel perfect line by hand?

If you have a pixel perfect line like 1:16 pixels, and you want to draw that same line rotated by a degree, for example 45°, what would be the correct way to do that by hand? I know it should have ...
9
votes
1answer
3k views

Can Unity 2D be used to make pixel-art games?

I'm looking at the new 2D features introduced in Unity 4.3, and I think I might be missing something. To me it looks like they are designed for high-res 2D games, where scaling the sprites is ok, but ...
0
votes
0answers
33 views

2D collision beetween a sprite and an array of sprites [duplicate]

I am creating a simple Android jumper (think Doodle Jump or Abduction) using libGDX so I can get started in game programming. My problem is that I need to figure out a way to check for collision ...
1
vote
1answer
175 views

Limiting the speed of a dragged sprite in Cocos2dx

I am trying to drag a row of sprites using ccTouchesMoved. By that I mean that there is a row of sprites (they are colored squares) lined up next to each other and if I grab one with a touch the rest ...
1
vote
1answer
597 views

OpenGL ES 2.0. Sprite Sheet Animation

I've found a bunch of tutorials on how to make this work on Open GL 1 & 1.1 but I can't find it for 2.0. I would work it out by loading the texture and use a matrix on the vertex shader to move ...
1
vote
1answer
202 views

2D fighting bounding boxes

I'm prototyping a 2D platformer/brawler game for uni and I'm having some trouble with creating collision/bounding boxes. This is most likely going to end up on a Vita so I do have some library ...
1
vote
1answer
135 views

Sprite rotation

I'm using OpenGL and people suggest using glRotate for sprite rotation, but I find that strange. My problem with it is that it rotates the whole matrix, which sort of screws up all my collision ...
0
votes
1answer
312 views

GLSL billboard move center of rotation

I have successfully set up a billboard shader that works, it can take in a quad and rotate it so it always points toward the screen. I am using this vertex-shader: void main(){ vec4 tmpPos = (MVP * ...
0
votes
0answers
64 views

movement of sprites with kinect and xna

im working on a proyect with kinect sdk and xna 4.0. i need take the position of the hands and draw a sprite over it. im doing it directly and, because of that, i get a "trembling hands" effect. so, i ...
0
votes
1answer
123 views

Why does my goblin only choose a walk direction once? [closed]

I'm working on a simpe 2d canvas game that has a small goblin sprite who I want to get pathing around the screen. What I originally tried was a random roll that would choose a direction, the goblin ...
3
votes
2answers
481 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 ...
0
votes
0answers
22 views

Bones & Blood Sprite [duplicate]

I'm currently playing with a small 2d canvas game for fun. I'm looking for some images, primarily some bones and blood to be left in an XY position after killing an enemy. Does anyone know where I'd ...
2
votes
1answer
220 views

Drawing Sprites at Correct Z-Index without A Sprite Map?

My game is in HTML5 canvas, but I assume this concept applies to any language. In the past I've used a multi-dimensional array to keep track of sprite positions. Here is a simplified example: [ [ ...
0
votes
1answer
69 views

Getting a sprite from multiple sprites for right material pattern

Not sure how accurate the question was but I'll put it this way. I'm developing a game where player will construct his/her own stuff, like bridge, building etc. using cocos2d-iphone and Box2D. First ...
4
votes
2answers
590 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 ...
1
vote
0answers
63 views

Spawning a sprite later

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
2answers
171 views

Spritesheet vs single tiles

I am currently programming a 2d platformer and this is the first time I am coding a video game. Now I've downloaded the 'platformer art deluxe' package. In the tiles folder there are single tiles and ...
0
votes
2answers
77 views

How to define axis of Sprites in a CCAnimation?

I'm struggling to find how to define a kind of axis in my frames, when my sprite punches it moves back. I want to define the head as a pivot for the other sprites with different sizes. How can I ...
-4
votes
2answers
91 views

Is it possible to render controls inside controls in XNA?

I want to know if there is an easy way to render sprites in XNA inside other sprites or something similar (I don't know if sprite is the best or unique way to draw in XNA). For example, I want to draw ...
2
votes
2answers
326 views

How to implement pathfinding in this situation

So I'm creating a game for android using the libgdx library. I render the map from a tmx file and in it all the water tiles have the property of blocked. My player(a sprite) moves to where I ...
1
vote
2answers
127 views

Twitchy sprite movement

I'm having an issue with sprite movement, and I'm not sure how to deal with it. When I set a destination for my player sprite (by clicking the screen), it sets the player moving in that direction. ...
1
vote
2answers
153 views

Handling creation of enemy sprites in a level

I am trying to build an RPG tile-map based game. Currently I am going to set enemy sprites that will be repeating their motion in fixed path. Suppose that I have a level map, which has got width 3 ...
1
vote
0answers
117 views

Using fully cropped sprites with TexturePacker and Cocos2d

When using texturepacker, you can set your trim-mode to crop. This is nice, because when a sprite loads in cocos2d your bounding box will only be the visible area of your sprite - which is useful for ...
1
vote
1answer
100 views

Should I be using Reach or HiDef profile if I have large spritesheets?

I'm working on a platformer in monogame, that I want to use a large number of sprites for making up items and objects in the background. The main spritesheet I've created is 4095x3734, when I tried ...
1
vote
1answer
121 views

Efficient way to draw multiple separated quads

Let's assume I want to draw several separated (possibly textured) quads in Direct3D 9, each consisting of two triangles: How should I draw these for maximum performance, i.e. which of the following ...
1
vote
3answers
514 views

How to deal with characters picking up and dropping objects in a 2D game [duplicate]

I'm quite new to game development, so would like to get a consensus on methods of doing this. My game features a 2D character that is able to pick up and drop objects, for example, a stick. My ...
1
vote
0answers
266 views

Windows 8 C# Compile spritefonts for MonoGame without XNA

Hello Stack Exchange community. Recently, I've been attempting to in some way generate sprite-fonts into XNB files for use with MonoGame. The issue is however, as you may be aware, XNA is very ...
0
votes
1answer
124 views

How do you align the edges of sprites?

If you have SpriteA and SpriteB. SpriteB is a child of SpriteA. Does anyone have a mechanism to come up with the left, right, top, side of a boundingbox() of SpriteA? What I'd like to do is align ...
0
votes
1answer
237 views

C# XNA4 2D Collision Detection

I am working on a 2D engine in Xna and am running in a bit of trouble with Collision implementation. What I want to do is have an interface ICollidable that I can add to GameObjects that are ...
1
vote
1answer
1k views

How to switch sprite animations in cocos2d-x?

I have a "GameCharacter" class where I have a sprite for my main character in the game, I loaded the frames and animations correctly. I can switch between animations with single touches or swiping ...
3
votes
1answer
205 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 ...
3
votes
3answers
2k 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 ...
2
votes
1answer
188 views

Which camera angle is used for these sprites?

I am trying to replicate these sprites: But I am not managing to make sense of how it is done. The character is facing forward ( <--- ), but you can see the front of its body instead of just ...
1
vote
1answer
509 views

libgdx: how to manage entity classes [closed]

Good day sirs, I know this is a newbie question but I really need to ask it. I've been reading a lot of sample codes on libgdx, and I have seen entities(player, enemy, boss,etc.). my question is what ...
-2
votes
1answer
84 views

2D Vector Compass Direction [duplicate]

Relating to this question; What's the best way of translating a 2D vector into the closest 8-way compass direction? My query is if this would work in the following order(below) and if so, how ...
2
votes
3answers
377 views

XNA Rending Bottom Half of Video, How to fix?

First off, sorry if this is a repeat question i didn't see anything similar in my searches. The issue i am having.... When running an XNA game any Video objects & related Texture2D's are not ...
6
votes
1answer
526 views

How to create a character animation where the parts of the sprite change?

Let's say I'm creating a game (in Java or C++). In this game I have a character that can do a sword swing animation, but the character can equip different swords. Do I have to make an animation for ...
3
votes
1answer
127 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 ...