Questions tagged [2d]

2D refers to two dimensional space where coordinates are represented with X and Y values.

Questions using this tag should be about 2D math, design or graphics problems.

3511 questions
28
votes
3 answers

How does a 2D game like Zelda handle the character being behind buildings where only part of him is shown?

I'm trying to develop a simple Zelda-style game. I found this very useful topic How did LoZ: A Link to the Past handle sub-tile collisions? that I'm using as reference to develop my collision detection mechanism. However, there's something I've…
Tinadm
  • 443
  • 4
  • 6
11
votes
5 answers

What's a good 2D game engine or framework to work on right now?

Basically, I'm looking for a good, 2D game engine to build a platformer/contra-like shooter on to bolster (and when I say bolster, I really mean start) my portfolio. I use the words "right now" in the title because I've read through some questions,…
Phil Quinn
  • 231
  • 2
  • 6
9
votes
3 answers

Marching squares: Finding multiple contours within one source field?

Principally, this is a follow-up-question to a problem from a few weeks ago, even though this is about the algorithm in general without application to my actual problem. The algorithm basically searches through all lines in the picture, starting…
TravisG
  • 4,402
  • 4
  • 36
  • 59
7
votes
2 answers

Best Game Engine/Framework and Language for 2D actor/sprite intensive game

I'm new to the game dev world. I have a rather large project in mind (I learn by setting myself challenges :P ) and I'm wondering what the best engine/framework/language is for a 2D game with thousands of sprites/actors on screen at a time. Bare…
Grungetastic
  • 81
  • 1
  • 4
5
votes
3 answers

What's a good Game development platform for a platformer game with these characteristics?

Yes, I know, the best way to make an indie game is to learn to code. I've got some scripting experience, but I want to do worldbuilding with already-existing tools (and communities surrounding those tools), and I've been really impressed with games…
Joe
  • 59
  • 2
4
votes
2 answers

Commercial 2D game engines?

I know that there are several open-source/free 2D game engines out there; I am just wondering about commercial ones (if any). The idea of wanting of looking for a commercial engine is for support and continual updates. Off the bat I know that there…
Extrakun
  • 2,742
  • 4
  • 26
  • 34
4
votes
1 answer

What is the advantage of using "pixel coordinates" in a 2D engine?

From the Godot feature list: Work in pixels as your units, but scale to any screen size and ratio. Reading the documentation they also use pixel coordinates to update the position of objects move( Vector2(0,1) ) #move down 1 pixel per physics…
Maik Klein
  • 443
  • 3
  • 11
3
votes
2 answers

Pseudo 3D curve problem

I've converted CodeinComplete's Pseudo 3D road routine to use SDL2 - unfortunately for some reason the curves are incredibly jarring (both entering and leaving it). I've also converted it to GLBasic, and get the same effect there too (although…
MrTAToad
  • 51
  • 4
2
votes
1 answer

repeating 2D world

I have a 2D world of 50*50meters and a viewport of 15*10meters. Current situation: if(player.x>World.WORLD_WIDTH){ player.x = 0; } if(player.x<0){ player.x = World.WORLD_WIDTH; } if(player.y>World.WORLD_HEIGHT){ player.y =…
Nut
  • 327
  • 1
  • 2
  • 8
2
votes
1 answer

2D zooming in on a spot

The 2D library I have to work with has the following function to draw images to screen: DrawImage(img, x, y, width, height) Given this, I'm looking to show the entire image but then "zoom" in on a specific spot over time. I can do the over time…
user441521
  • 792
  • 2
  • 7
  • 15
1
vote
1 answer

How to keep player in the center of the screen but let him move to the edge of the map without moving camera there?

In my rpg-styled (top-down perspective) 2d game, I want my player to be at the center of the screen, while the entire world moves, giving the effect of player movement. I can make that, but my problem is at the edges of the game-world, I want the…
anonymous
  • 514
  • 1
  • 8
  • 21
1
vote
1 answer

Graphics.drawImage will only fill a small portion of my control

I'm trying to create a map class for a simple 2D game. The map has an array(100,100,5) of string, returning the kind of tiles to draw ( with 5 possible layers from 0 to 4) players will move on the 2nd layer, the background of the game is on layer…
1
vote
1 answer

Gluing Model and View Data Together But Separating Concerns

I've built a couple of 2D games that are roughly MVC; that is, the main game data and logic are separated into the model (and possibly controllers), and I have a bunch of screens/states that just pull stuff from the model class and draw that on…
ashes999
  • 11,261
  • 9
  • 59
  • 95
1
vote
2 answers

How to 2D shadow image transformations

I'm writing a 2D top-view game and I will have to draw shadows. Sun will always be at North-West. My game has, for example, tanks. I have tank image and tank's shadow image: My idea is to draw first the shadow image, then (on top of shadow), the…
bux
  • 147
  • 10
1
vote
1 answer

Dynamic Sort order For walking in front and behind stuff

I'm using tile maps, and I'm having a difficult time with the concept of walking both in front of things, and behind things and having the layers sort order show properly. Take the image below, I need it to behave like #1 AND #2, so that if you walk…
Vandel212
  • 135
  • 5
1
2 3