Skip to main content
Share Your Experience: Take the 2024 Developer Survey
7 votes
Accepted

Unity2D jumping inconsistancy

I'd recommend changing Input.GetKey("space") to Input.GetKeyDown("space"). This way the check is only performed on the initial ...
Chris McFarland's user avatar
3 votes
Accepted

Programmatically creating a continuous scrolling background in Game Maker: Studio

To dynamically scroll through a very large background made up of smaller frames, there are many different solution; the main idea though is quite the same. The main idea Think of your fifteen ...
liggiorgio's user avatar
  • 4,855
3 votes
Accepted

How can I easily create/edit a level for a scrolling shooter game?

The reason you might not find any good literature about this subject is because the best solution always depends on the game, its architecture, its scope and your team's preferred workflow. Possible ...
Philipp's user avatar
  • 120k
3 votes

Why do old platformers typically scroll to the right?

The answer to this is a synergy of a number of factors. Most people are right handed. Most languages are written from left to right. When placing objects, people typically start to the left and ...
ROGRat's user avatar
  • 114
2 votes
Accepted

Good item distribution for 2d scroller game

The frequency of bonus items would mostly affect the time players spend to acquire the necessary amount and buy a new skin. So, it comes down to the cost of the skins, the movement speed and the ...
interphx's user avatar
  • 395
2 votes
Accepted

Procedural sidescroller world gen algorithm by seed

You'd solve this the same way as you do in 3D. In 3D games with procedurally generated landscapes, you can often see a distant mountain that's located in a different generation site than the one you'...
DMGregory's user avatar
  • 135k
2 votes
Accepted

2d side scroller slope physics and collisions

It's really no different than sloped 2d case Consider the following picure. In this instance, to move over the ramp you would just move using the slope of the ramp. Easy right? y = mx+b kind of ...
Krupip's user avatar
  • 1,763
2 votes

How to smoothly move camera when the player is climbing a diagonal staircase in 2D tile-based side-scroller?

As Jelle van Kampen mentions in his answer; this is a valuable resource: Itay Keren - Scroll Back: The Theory and Practice of Cameras in Side-Scrollers I'll provide my implementation of a camera ...
Felsir's user avatar
  • 4,067
2 votes
Accepted

How to smoothly move camera when the player is climbing a diagonal staircase in 2D tile-based side-scroller?

In the scenario you describe, there are two points that could improve the smoothness of your camera: (1) the position of the camera with respect to the player, and (2) the movement of the camera ...
Jelle van Campen's user avatar
2 votes

How can I easily create/edit a level for a scrolling shooter game?

Currently I know only of two ways. pre-defined If your levels are limited and should always (basically) be the same then you are good to go to create the levels with as Unity scene. 30 levels, 30 ...
monty's user avatar
  • 384
2 votes
Accepted

How to create large Sidescrolling Map in Godot?

Godot will not draw 2D objects out of view. So, do not worry about GPU resources. You can confirm this yourself. With the game running, go to the Debugger panel (you can find it on the bottom of Godot ...
Theraot's user avatar
  • 27.1k
2 votes

How would I incorporate gravity and gravity affecting obstacles into A* pathfinding in a 2d side-scrolling game?

A* is very smart but also very dumb. It is a graph search algorithm; that means that A* assumes that any two connected points in the graph are reachable without checking back into the game itself to ...
glfmn's user avatar
  • 21
1 vote
Accepted

What was the rationale behind the updating of 'changed' tiles in John Carmack's Adapatie Tile Refresh?

I haven't heard of this algorithm before, but I think I understand what you're missing. 'Jolt' the screen back by 16 pixels, load in the next tile from the world map from the main memory to the ...
Kevin Reid's user avatar
  • 5,498
1 vote
Accepted

8-way aiming in run 'n' gun

I would suggest making a visual representation of what your joystick or D-pad is doing, so you can "see" your different input strategies. You could make a plane that lights up in segments in ...
Clay Rehling's user avatar
1 vote

Same scroll speed across devices with different DPI

Are you sure you need to go as deep as to device pixel ratio? If it's a browser-based game, then you have access to the viewport-percentage units like vmin, <...
badunius's user avatar
  • 166
1 vote
Accepted

How do you partition a level and create screen transitions out of these partitions?

Both options are viable. But separating your game into multiple scenes can have various advantages. It's better for performance to have less "stuff" in the scene at once (while Unity can do some ...
Philipp's user avatar
  • 120k
1 vote
Accepted

2D vehicle collision detection and rotation

The answer is there's no silver bullet. You're doing discrete physics, and therefore you're missing a lot of information. For example you don't know which point on the car collided first, you can only ...
gjh33's user avatar
  • 681
1 vote

Rendering Tilemap Tile Layer Side by Side for Infinite/Endless Runner Game

if i understand right , you missed to check this. if, your MAP_PIECE is 2nd you must add(if moving right) previous MAP_PIECE's width if, your MAP_PIECE is 3rd you must add MAP_PIECE's width x2 if, ...
Levon Ayvazyan's user avatar
1 vote

Camera scrolling hiccups

Are you measuring the rendering rate using external tool like FRAPS, etc? If not, I would first suggest that. As far as troubleshooting goes, try lowering the framerate to anything lower than the ...
ForeverZer0's user avatar
1 vote

How to implemement smooth side scrolling in a DOS game?

I may have to see if I can use the port call. As of now, I do it via software which is a lot of loop de doo. First I pre string 4 320x200 images together while slicing them into 10x200 segments, ...
Michael Russo's user avatar
1 vote

Procedural sidescroller world gen algorithm by seed

If you know your maximum width of sprite -- then you can check for the presence of any sprite between your screen.X - maxSpriteWidth to screen.x + screen.width. If the scale of your objects is truly ...
Jimmy's user avatar
  • 9,029
1 vote

Programmatically creating a continuous scrolling background in Game Maker: Studio

I figured out a workaround. As i posted before, I don't know for sure if the code above works but if it doesn't you can try this one out.It is based on the one above but I also put variables in case ...
konkrz's user avatar
  • 11
1 vote

Offsetting ground texture doesn't work in WebGL

for texture scrolling you should use "Repeat" in import settings instead of "clamp"
Yevhen's user avatar
  • 1,470
1 vote
Accepted

Prevent tires from tunneling in 2d sidescrolling car game

Your code is a bit confusing to follow, due to poor indentation, useless commented code and lack of intermediate variables width a meaningful name. That said, I can locate your problem to in the ...
MrBrushy's user avatar
  • 411
1 vote

A single libgdx gamescreen with pop-up menu, getting ready, hud and game over?

Yes. It is possible. Any of the scene2dUI widgets, like Table, inherit from Actor. Actor ...
spectacularbob's user avatar
1 vote

A single libgdx gamescreen with pop-up menu, getting ready, hud and game over?

You should probably take a look at Scene2D's Window class. Think of it as a screen that just overlays other screens. It's also a Table, which means you can add ...
Charanor's user avatar
  • 7,870
1 vote

How do I randomly position objects without overlap?

If you use a tile-based level layout where a grid cell either contains a platform or not, then you implicitly solve the problem of preventing overlap. Indeed, it can happen in two ways: Additive ...
Rohan's user avatar
  • 131
1 vote

Should I move the world or move the player?

Other answers are good, but I'd like to add a few points of what's better, hoping to help someone who tries to make the same decision for a different project. Moving the Player: It's simple, ...
Tom Tsagkatos's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible