Flat two-dimensional space. Positions represented with `x`, `y` coordinates.

learn more… | top users | synonyms

0
votes
0answers
5 views

Portable 2D graphics library that can run server-side [on hold]

I'm in the process of searching for a fairly portable C# library that will allow me to do 2D drawing operations for generating images. Ideally the library would be able to run under ASP.NET 5. I've ...
0
votes
0answers
20 views

Need some help with 2d art [on hold]

im looking for some guide or tutorial about how to make this kinda of 2d art (and what is it called ?): http://i.imgur.com/Mx6woCC.jpg only tutorials ive found so far are pixel art tutorials which i ...
-3
votes
0answers
36 views

Which is the best Platform/Engine for a beginner for developing an Android game with following specifications [closed]

This is a very general question for which I wouldn't mind getting equally general answer. I want to develop a simple 2D android game with following specifications: 1> A 3D object that rotates in all ...
0
votes
0answers
33 views

marching squares alike algorithm with holes and multiple contours?

I'm looking for a similar algorithm to marching squares one that could handle holes and multiple "islands" like in the image below. Is there anything that could provide sets of points for ...
8
votes
3answers
181 views

Using full resolution of depth buffer for 2D rendering

I'm working on a front-to-back renderer for a 2D engine using an orthographic projection. I want to use the depth buffer to avoid overdraw. I have a 16-bit depth buffer, a camera at Z=100 looking at ...
3
votes
5answers
1k views

Trying to implement gun cooldowns in C#

My aim is to allow my player to shoot 3 bullets at a time. Between shooting these 3 bullets the player should wait a very small interval (so that they don't all get fired at the same time) - call this ...
2
votes
3answers
217 views

Algorithm for dividing a 2D grid into organic looking plates

the title pretty much says it all: How could one go about segmenting a 2D grid into smaller parts? My goal here is to create tectonic plates for further procedural world generation Details to ...
0
votes
2answers
112 views

Basic C# Script in Unity3D for firing a bullet (not working)

working on a 2D top-down view game. Im trying to get my player to fire a bullet when spacebar is pressed. I added a component to my player (a bullet sprite) and placed it under his gun (so you can't ...
0
votes
2answers
65 views

Moving a character depending on the direction he is facing (C#/Unity3D)

Right now I have a small soldier on the screen that moves with W, A, S, D and rotates / changes direction with the arrow keys. What I want to happen is when the player's direction changes (by using ...
0
votes
1answer
35 views

How to read a custom map format [closed]

I am trying to create a custom map format for my own little 2D RPG, so my question is rather how do I manage reading and creating a custom map format properly and flexible. First off, I am writing my ...
0
votes
1answer
8 views

Importing .anim files created using the Unity Animation controls

Our artist created some .anim files using the built-in Unity Mecanim system (where you use keyframes and drag various body parts to construct the animation). However, now we're trying to export them ...
1
vote
1answer
57 views

Unity3D: Storyboard-esq animation - a beginners question

As part of an interactive book I'm developing in Unity3D, I'm attempting to make an introductory scene that consists of moving lots of objects at different times - usually when another animation has ...
-1
votes
1answer
36 views

Java libgdx get clicked square without iter

I would like to detect which square is clicked without iterating over all elements! i don't want to do this anymore for all elements. if( x >= this.getAnchorX()-HalfWidth && x <= ...
1
vote
2answers
80 views

Accessing a newly Instantiated Object

I currently am creating a script that allows the player character to attack by shooting orbs at foes. I have the current code to do that (not final code, for testing purposes): ...
0
votes
1answer
37 views

How to draw 2d above 3d scene?

I have an OpenGL(3.3)+GLEW application. I want to draw a black vertical rectangle at the left side of the window for writing some information on it, like fps (I use GLEW function for drawing text). ...
0
votes
1answer
28 views

Unity 2d - Destroying foreign object from script + seek explanation about destroying objects

I have simple emmiter which sending enemies toward player in center of screen. Player can shoot missile (also emmiter). I want to destroy enemy AND missile in same time. Here is my code attached to ...
0
votes
0answers
52 views

Unity changing texture of RawImage from code

I have a UI element, RawImage, which I would like to change the texture of based on which random number between 1 and 6 is generated. I want to change the picture of the dice, but I don't know how ...
0
votes
0answers
37 views

Need help solving an acute-triangle to find the distance to the outside of my object

I recently asked a question here: How would I check the range against the entirety of an enemy object, and not just it's transform.position? That was accurately answered, and works perfectly ...
3
votes
1answer
97 views

Optimizing the “visibility cone” calculations for a 2d game

I'm creating a simple 2D game and got a little bit stuck with this algorithm. What I wanted to achieve - and achieved - is to draw a visibility cone influenced by walls and other obstacles on the map. ...
2
votes
1answer
63 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 ...
0
votes
1answer
38 views

Entitiy spawn on Button press

I'm trying to create a little 2D-Zombie-Shoot game. I'm pretty much at the beginning of programming. At least, I can create a player that is moving with arrow keys and stuff. My question is: How do I ...
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 ...
1
vote
1answer
59 views

Proper way to divide a 2D climbing animation in Unity3D

I've got a 2D character that's going to climb up a 2D tile to his left or right and I've got a climbing animation consisting of three parts essentially: Animation for the character going from ...
0
votes
2answers
72 views

A 2D Camera Follow Script That Does Not Rotate?

I am attempting to make a 2D racing game. So far I have a player car (sprite) and a main camera. I would like to know how to make the main camera follow the player car while still showing signs of ...
2
votes
1answer
52 views

Multiple enemy collidiers

I currently have an enemy that upon collision kills the player with a kill script, I want to add another collider that acts as the visibility radius for said enemy. However, when adding another ...
2
votes
2answers
35 views

Unity2D Sprite flips camera when moving left and right

I am using the Unity Engine and coding in C#. I have a sprite as a parent with a main camera as a child so that the main camera follows the sprite. However, when pressing 'A' and 'D' to move the ...
1
vote
2answers
87 views

How to detect collision of a wall with grid movement?

I have this little game, where my player is moving around a simple level, using a grid based movement script (See code below). My problem is that I have tried to implement a 2D raycast, which has to ...
0
votes
1answer
65 views

Sharing Tiled Maps [closed]

Where can share my existing Tiled maps, as well as download and use other people's existing maps?
0
votes
0answers
39 views

2D animation customization based on 3D model

We're looking for a good pipeline to create animated assets for our 2D game. Characters are seen from isometric viewpoint, and there are several characters with the exact same animations (idle x 4 ...
2
votes
3answers
219 views

In a 2D top-down game, how can I create projectiles that have a height?

A 2D game called Deer Hunter has projectiles like this: Are the projectiles 2D or 3D models? How could I implement something similar?
0
votes
0answers
36 views

In Java swing, while handling a 2D top down game, how should I handle scaling for quality transformations (mainly screen rotation)

For my top down game, I plan to have screen rotation where entities don't rotate, but everything else does. I am using a raster array to store my image so I don't have to render things stacked on each ...
7
votes
2answers
383 views

In Unity, why is adding a Vector2 and a Vector3 ambiguous but assigning isn't?

Given the following two vectors: Vector3 v3 = Vector3.one; Vector2 v2 = Vector2.one; This line is ambiguous: v3 += v2; // Unity reports dimension ambiguity whilst this assignment isn't: v3 = ...
3
votes
1answer
92 views

Is creating a blend state like this possible?

I'm wanting to create a custom blend state that is similar to XNA's BlendState.Additive, but slightly different. I'm wanting something like the 'custom' output below: Is something like this ...
0
votes
2answers
99 views

How to keep a shape inside a rectangle

So i'm making a game which is based on randomly generated rooms and i need a way to keep the player inside them and make the player glide when he collides with the room's bounds. I currently have a ...
0
votes
1answer
71 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
48 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
749 views

What is AABBvsAABB Collision detection?

Currently studying Game Engineering at university and my lecturer has asked us to implement a collision manager. He asks us to use AABBvsAABB to build it, so then we can add the physics. My question ...
1
vote
1answer
32 views

Monogame - stopping a custom shader (drawable game component) when inside another drawable game component [closed]

I have run into a bit of trouble when using a custom shader (gaussian effect) within another drawable game component, as I cant figure out how to break out of the draw method, so the effect is applied ...
3
votes
1answer
78 views

How do I render an object's position trail of a constant length?

I want to show a trail of the last points that the object has been in, but I want that trail to always be a certain length, regardless of the object's speed. How can I do that? At the moment, I ...
1
vote
0answers
81 views

Create a 2D orbit trajectory like in angry birds space and a circular orbit

I am working on a 2D game, and I am working on adding some space physics : I need to find a way to create a circular orbit and an orbit like angry birds space ( the spiral trajectory ) . So there is 2 ...
1
vote
1answer
125 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 ...
2
votes
1answer
34 views

Java Libgdx: How do you add cells to a TiledMap?

I'm trying to make a Side-Scrolling game that will allow you to place/remove tiles. I'm using the TileMap Editor to render the custom Tilemap but is there any way to add tiles? I have it where I can ...
0
votes
1answer
49 views

Any way to visualize how will game objects look on different screens?

After completing my game and sending it to a bunch of friends with different devices, they complained about how some game buttons were too small. (I have developped a touchscreen game but after ...
0
votes
1answer
64 views

Unity 2D: Change one instanced prefab then make all the others on the scene like it

I want to get this thing working: I have a prefab with coins, some obstacles and enemies, and i want it to be instantiated each time the player got to the right or left on the stage, to make the stage ...
0
votes
2answers
136 views

Is it possible to use one if statement for each level scene?

I'm working on a platform game where you as a player have to collect logs, to keep on all the fires in the level. Each campfire has a timer, which ensures that every x number of seconds the animation ...
0
votes
1answer
74 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 ...
1
vote
0answers
31 views

2D Polygon Collision push direction with large polygons

I have a collision detection/resolution implementation that uses the Separating Axis Theorem. Detection and such works perfectly fine, as well as resolution for most objects/shapes in my game. ...
0
votes
0answers
68 views

Creating a 2D game on the X-Z plane instead of the X-Y plane in Unity, any adverse effects or challenges with this?

After coming to the realization that some things I wish to do in a 2D RTS are easier to do on the X-Z plane instead of the default X-Y plane, I'm considering moving my game over to the other plane. ...
1
vote
2answers
67 views

How can I detect a perfect passageway for collision detection?

The problem is when I move diagonal it moves fractions of units and therefore my coordinates might be a fraction of a unit say (40,400) might be actually (40.12,400.40) but another problem is my pink ...
0
votes
1answer
61 views

2d Collision detection response equation doesn't work

I am currently doing some game engine programming as a hobby. I have been working on getting the collision detection working for a while now, and I'm at my wits end with it. I started with this ...