Questions tagged [side-scroller]

95 questions
24
votes
1 answer

How can I make an infinite side scrolling background in Phaserjs?

I'm using phaser.js to make a game and I cannot find any tutorials on how to make the background scroll infinitely. I'd like the background to tile/repeat sideways, and infinitely as the character moves right. I am currently using a camera and…
mage
  • 626
  • 2
  • 8
  • 18
14
votes
2 answers

2D side scrolling camera view in html5

I was wondering how I could go about making a camera-like view where I could scroll a level within a canvas element just like this: http://playbiolab.com/
Oni Enzeru
  • 459
  • 2
  • 6
  • 12
6
votes
2 answers

How to prevent multiple AJAX calls when using JQuery scroll event handler during lazy-loading?

I load data into my DIV with AJAX using 3 different functions. I am trying to prevent multiple AJAX calls when the browser scroller remains at the bottom of the DIV that I am lazy-loading data into. This works but sometimes (just sometimes) the…
HiDd3N
  • 494
  • 6
  • 23
3
votes
3 answers

Continuous Touch/Moving Swift & SpriteKit

I am creating a Side Scroller Mario-like game in Swift and SpriteKit. I am currently moving the player yet you have to keep clicking and then it moves. What I am wishing is if you hold it it will move and you will not have to rapid click the…
3
votes
2 answers

how to ensure only sprites visible in the viewport are ever drawn

I am attempting to create a 2d scrolling XNA game as a learning exercise, but have run into some issues with the scrolling background. I am loading a level from a text file, parsing through to create the appropriate tiles and store them in a matrix…
Pectus Excavatum
  • 3,593
  • 16
  • 47
  • 68
3
votes
1 answer

Get slerp to work just as LookAt(x,Vector3.Right) does

Ive been working over a sidescroller shooter game. Ive got my sidescroller shooter character to look around with these : chest.LookAt(mousepos, Vector3.right); & chest.LookAt(mousepos, Vector3.left); (Left when the character is turned to the left…
2
votes
3 answers

Side scrolling a tile map, Map getting messed up

I succesfully generate my tile map and it works but when i want to scroll it the top line of tiles is moving and all the tiles is dragged of screen.. Its hard to explain, Imagine this is the tiles: X XXXXXXXXXXXXXXXXXXXXXXXXXX //Here it starts to…
User
  • 1,458
  • 3
  • 16
  • 40
2
votes
0 answers

Automatically scrolling to my player using p5.js, but it does not work

This is what I've tried, but it just doesn't work in p5.js I basically need a line that "renders only the visible portion of the game area on canvas" Essentially, I need help fixing my function that makes an auto scroller for my game when the player…
user14475233
2
votes
0 answers

Disabling side-scrolling works on desktop but not mobile

I'm applying the following CSS to successfully disable side-scrolling when viewing a site via desktop: html, body { max-width: 100% !important; overflow-x: hidden !important; } However, when viewing the site on a mobile browser, side…
mbeachey
  • 59
  • 1
  • 5
2
votes
1 answer

Make a Defender-like "world" with SKTileMapNode

Defender is an ancient game that presents a virtual world, a horizontal scroller, in a loop. The camera view only portrays a portion of the world at any given time. The player can fly in both directions around this world, continuously. How could…
Confused
  • 6,048
  • 6
  • 34
  • 75
2
votes
1 answer

JavaFX Side-Scrolling game: How to generate interactive objects in "extended" scene

So I am trying to create a 2D side-scrolling javafx game. So far I used AnimationTimer to control movement of my character. But now I am kind of stuck trying to make the stage move. I can move non-interactive elements using AnimationTimer again. But…
user3271166
  • 573
  • 1
  • 6
  • 17
2
votes
1 answer

Best practice for moving characters in a game using JavaFX?

I'm making a simple sidescrolling game in JavaFX, and have done a bit of research. However, before I get really started, I wanted to make sure I was using the conventional way of creating a game. I had the following idea: Player Characters/Enemies…
user3517454
  • 217
  • 2
  • 11
2
votes
1 answer

Fast way to find a number in an array of objects in JavaScript

I need to check whether or not an object is in distance to show it to the screen ( its a side scroller video game ) So far i have this: for ( var i=0; i < Coins.length; i++ ) { var obj = Coins[i]; if ( worldObj.distance > obj.distance &&…
2
votes
2 answers

How to only draw tiles (sprites) visible on the screen

I am trying to create a simple 2d scrolling game as a learning exercise in monogame (XNA). Currently I load tile information from a text file, creating an array (tiles[,]) with a tile object storing information about where the tile is written and…
Pectus Excavatum
  • 3,593
  • 16
  • 47
  • 68
2
votes
1 answer

How to create a simple side scroller game

I'm still pretty new to game programming and any tutorial that I have worked with stuck to only games with the initial screen. I want to start creating my own games but there are a few things that I still need to learn. One of them is how to create…
D34thSt4lker
  • 447
  • 1
  • 5
  • 12
1
2 3 4 5 6 7