Questions tagged [side-scroller]

95 questions
0
votes
1 answer

Different image drawn for same object

I am having a problem with my images in my game. I am using an ImageLoader class which was written by my teacher. I create the two Image variables like this: private static Image healthPic = ImageLoader.loadCompatibleImage("Health.gif"); private…
archangel
  • 112
  • 9
0
votes
1 answer

Creating a vertical side-scroller, having trouble with arraylists and logic (Java)

I am in my second year of programming, and only know Java. However for my class, we have to create a vertical side-scroller. My set-up is that I have an ArrayList for enemy ships, and an ArrayList for player rockets. I draw the 2 rockets in precise…
0
votes
2 answers

What tile storage structure to use on a side scroller?

I am developing a 2d side scroller in slick2d which i would like to be tile based, but I don't really know how to store the tiles. My game has infinite dynamicly generated terrain and is interactable (a bit like a mix of minecraft and terraria). I…
Philipp
  • 876
  • 10
  • 23
0
votes
2 answers

Coin Collecting Function for game in Python

I am currently working on creating a function for my side scroller game in pyhton 3.2.3 and pygame that allows the main character to collect coins. What I am trying to do is when my character's postion is equal to the money's postition, the money…
user2950875
  • 89
  • 3
  • 13
0
votes
1 answer

Drawing and scrolling paths performance issues

Hi I'm doing and endless sidescroller game where the terrain looks like a tunnel which is infinite. I managed to randomly generate the tunnel using this code: private void createPaths() { if(startingPath) { pathBottom.setLastPoint(0,…
keysersoze
  • 2,562
  • 4
  • 21
  • 22
0
votes
1 answer

Sidescrolling Box2D Game

When creating Box2D sidescroller game, is it performance friendly to scroll through every object and move it (for example by x axis) as it does in the following code snap: for(Body b: bodies) { b.setTransform(-1, b.getPosition().y,…
Vilda
  • 1,675
  • 1
  • 20
  • 50
0
votes
1 answer

Cocos2d V3 - Getting current sprite position?

Probably quite a simple question! I'm making a side scrolling shooter game using Xcode5, with Cocos2d Version 3. When the main character (on the left of the screen) flies up and down, I want the enemy (on the right of the screen) to follow him along…
0
votes
1 answer

Flash AS3; how to play an entire animation then stop

I'm currently trying to make an 'attack' animation. However has to have a cool down (of about 2-3 seconds). Whilst I can get it to do that, the problem I'm currently having is that the animation cuts out. What I am after is the animation to play in…
NeoKuro
  • 49
  • 1
  • 7
0
votes
1 answer

Looping sprite scrolling background

I'm new in WebGL and I decided to try the Phaser.js library. I'm having some trouble with background scrolling (games like runner and side scrollers). I've seen how it works in PIXI.js, but I cant do / find a solution for Phaser. Pixi.js…
Rincew1nd
  • 196
  • 5
  • 20
0
votes
1 answer

AS3 What causes lag with side scrollers?

I've been programming a side scroller based on a tutorial found in a book. My friend did the same, and his is working perfectly. I've only really changed a few variable names around (I've also done animations differently) but for some reason, when…
NeoKuro
  • 49
  • 1
  • 7
0
votes
0 answers

Flash CS6 AS3: Why are collisions teleporting instead of blocking

So I wasn't sure how to word this question - if anyone has any better ideas, feel free :) But essentially, my sidescroller's collisions are behaving oddly. I have a 'border' box (_boundaries) to the left of the start position, to prevent characters…
0
votes
1 answer

AS3 Collision Detection - Jumping pushes character through floor

Wellp, I've looked everywhere, and I'm as green as they come at this.. I've recently started playing with AS3 because I want to learn it, so I began building a simple platformer deal. I think I know what my problem is, but finding the solution has…
0
votes
0 answers

2d sidescroller moving background in java

I have been following a 2d side scroller tutorial in java and have got the basics working, I changed the code a bit to make it so that the tiles and background are always moving, this worked as i intended. The relevant code is below: Within the…
0
votes
1 answer

2D Camera translations

I'm using OpenGL. For my tiles, I'm using a display list and I'm just using immediate more for my player (for now). When I move the player, I want to center him in the center of the window, but allow him to jump around on the y axis and not have the…
user1650305
0
votes
1 answer

Using for loop to draw blocks on ground

I am using slick2d to make a mario type clone game. We have 50x50 images we are using as blocks that was going to be on the floor. Whenever I put this code into the for loop, I can see the block being drawn and redrawn all the way to the end of…
Sam Haito
  • 113
  • 1
  • 1
  • 6