Questions tagged [2d-games]

2D games are drawn in a two-dimensional space using two-dimensional objects. To represent its position, each game object will have an x and a y coordinate.

2D games are drawn in a two-dimensional space using two-dimensional objects. To represent its position, each game object will have an x and a y coordinate, but not a z coordinate unlike in 3D games.

This can range from top-down games, like dwarf fortress, to side-scrolling ones, like platformers. It would refer to any games where the character / objects can move freely in two dimensions (e.g. left-right & up-down).

Related tags:

Remember there is also a special StackExchange site: Game Development

1116 questions
4
votes
1 answer

How does delta_time work on python arcade?

I’m going through the tutorials on python arcade and would like to know how/why a function works. There is a function named on_draw(delta_time) I looked around the code for arcade but can’t figure out how the library knows to keep the clock running.…
user1026169
  • 5,345
  • 5
  • 21
  • 35
4
votes
1 answer

Java Socket Server lagging with two clients

I'm new to StackOverflow lol, but I've been relying on this website for awhile. I have a question regarding a Java socket server that I created. Upon connection (client and server), my application creates a thread for that client. This is an…
AlbertGeno
  • 59
  • 3
4
votes
1 answer

Perform "catching up" when game is re-opened

What's a good way to handle "catching up" on all the actions that should have happened while a game was closed? Example: Tiny Towers. There are supplies, shops, customers: When a person closes the game and opens it the next day, the app has to…
bzle
  • 43
  • 5
4
votes
1 answer

LibGDX collision bounding Rectangle

I'm creating some rectangles surrounding my sprites for my player and bullet class to detect collisions with the overlaps method in Intersector class of LibGDX. I have a question: When I instantiate Player and Bullet, I create a bounding box around…
magna_nz
  • 1,243
  • 5
  • 23
  • 42
4
votes
2 answers

C++ Snake clone: timer function ignores given stop time and stops at it's own fixed time

I'm trying to make a Snake clone using C++ and OpenGL/GLUT. However, I've been having trouble programming the short time intervals allowed for input between movements. I've tried a few timing methods, and I ended up making a class for it (as you'll…
user3152847
4
votes
2 answers

Best way to store game-wide variables

I have an options Screen for things like Difficulty, Resolution, Full Screen, etc but I'm struggling to find the best way to store/obtain these variables at game time. The way I've currently decided to do it is to create a 'Constants' class which…
R-nold
  • 242
  • 2
  • 11
4
votes
3 answers

Simultaneous keyboard input (diagonal game movement)

I'm working on a 2D game in Node where the character needs to move diagonally. This is a top-down, text-based game purely in a Node environment (no browser, so I don't have nice keydown/keyup events at my disposal). I'm using the keypress library to…
Maros
  • 1,825
  • 4
  • 25
  • 56
4
votes
1 answer

Java: Using Swing for programming games

I am relatively new to game development. I have been developing games and studying game development for 2-3 months now. I use Java. I have always used Swing for my graphics (aka, the entire game is displayed on a JPanel, using a Graphics2D object).…
Aviv Cohn
  • 15,543
  • 25
  • 68
  • 131
4
votes
2 answers

SKAction scaleBy: duration: SpriteKit

I have a trouble trying to make one circle big and small using [SKAction scaleBy: duration:] SKAction *scaleDown = [SKAction scaleBy:0.2 duration:1.8]; SKAction *scaleUp= [scaleDown reversedAction]; SKAction *fullScale = [SKAction…
Alex Delgado
  • 984
  • 11
  • 19
4
votes
2 answers

C / C++ - How to manage the cycles in a video game?

I have already made some video games in C (small personal project). And the problem I encountered every time is the same, how to manage the cycles in a game. For example, I coded a snake in SFML. I handled the cycles with the frame rates: 5 frame…
Elfayer
  • 4,411
  • 9
  • 46
  • 76
4
votes
2 answers

Game/animation mockup/prototype tool

Advanced mockup/prototype tool that can be used for game/animation prototyping wanted. I need to add my images, then scale, rotate, screw, move them, and then get all the parameters: coordinates, angels, scale %. All mockups that I've seen don't…
Maxim Lavrov
  • 326
  • 5
  • 14
4
votes
2 answers

2D rendering - algorithm to identify islands and apply "beaches"?

I'm playing with 2D games programming. My toy project is a sailing game with explorable islands and more, but at the moment I'm trying to find the best way to apply "beaches" (i.e. soft ends) to the otherwise fairly rough islands. Tile size is…
Leonard
  • 3,012
  • 2
  • 31
  • 52
4
votes
1 answer

What is the easiest 2D game library to use with Scala?

I need to integrate a scala library for reinforcement learning that works on scala 2.9.1 with a 2D game library. If it uses SBT that would be awesome. I was looking at scage, however the current master branch is broken, it works on maven, and the…
placeybordeaux
  • 2,138
  • 1
  • 20
  • 42
3
votes
1 answer

Recommended Gem to build a very simple browser game in Ruby on Rails

I am building a very simple game with Ruby on Rails. Two players are supposed to play a very simple game against each other (you can imagine a simple game like Tic-Tac-Toe). But it is expected that thousands of tic-tac-toe instances are being played…
Farnaz
  • 143
  • 1
  • 1
  • 10
3
votes
2 answers

Collision detection involving very quickly rotating object

I am working on a 2D game which includes high-speed projectiles that will impact high-speed (and potentially very quickly rotating) polygonal target objects. I have been experimenting and searching for a robust collision detection algorithm that…
1 2
3
74 75