1
vote
1answer
42 views

Problem with Sprite not jumping off of platform (using rectangles for collision Detection)

When my sprite is on top of the platform, he stays on top of it, thanks to the rectangles I made for him and the ground he stands on. but when I click "jump" he does not jump most of the time. I need ...
2
votes
1answer
37 views

Saving resource

I'm trying to develope a simple platformer on Java, I was wondering if is it better to handle the collissions in a level (player with floor, player with enemy ecc...) by a level handler class which ...
1
vote
1answer
304 views

What's the most memory efficient way to load a tiled map?

Currently I am working on a simple 2D platformer and I want to load a tiled map. What I've started working on is loading the tiles using a text file. My first question is simple: is a text file the ...
1
vote
2answers
172 views

Updating the jump in game

I am making a Java game and I want my game to run the same on any FPS so I'm using time delta between each update. This is the update method of the Player: public void update(long timeDelta) { ...
0
votes
0answers
759 views

Platform game: applying gravity and jumping [duplicate]

I am making a 2D platform game in Java but I don't know how to apply gravity and jumping on my player and other living creatures in game that it looks natural and that it is physical correct. I have ...
2
votes
1answer
290 views

Camera scrolling and game boundaries

I am making a platformer game in JBox2D and LWJGL that has a scrolling camera, but I have hit a wall with the boundaries of the camera. Essentially what I have right now is a Box2D world that is ...
0
votes
1answer
918 views

How can I implement infinite scrolling by scrolling the background's texture, not the quad? [duplicate]

I'm writing a 2D platformer game on Java with LWJGL. I'm doing this just for the sake of learning and not the result itself, so when I decided to implement scrolling I did it two ways I could invent ...
0
votes
1answer
534 views

Platform game collisions with Block

I am trying to create a platform game and doing wrong collision detection with the blocks. Here's my code // Variables GTimer jump = new GTimer(1000); boolean onground = true; // The update method ...
1
vote
2answers
306 views

How do I make a Java gave without a JFrame?

I am working on an arcade-like game, and so far, I have been using JFrame. All the action occurs in the JFrame basically. However, I've noticed that a lot of games that you install on a computer ...
4
votes
5answers
1k views

Should my game handle collisions in the Player object?

I'm making a 2D platform game. Right now I'm just working on making a very generic Player class. I'm wondering if it would be more efficient/better practice to have an ActionListener within the Player ...
2
votes
1answer
559 views

How to load chunks of 2d map segments when player reaches a certain point?

In my 2d platformer (made with Java and Slick2d), random maps are made by combining different segments together and displaying them one after the other. My problem is that I can't load too many ...
3
votes
1answer
1k views

How do I implement smooth movement in a Box2D platform game?

I have implemented a character in JBox2D which moves with the help of a wheel rotating at the bottom of it. The movement is the best result I've had 'till now but it's a little glitchy when the ...
3
votes
3answers
413 views

3d platformer with 2d point of view

I made my first 2d platformer game using java + swing. Now I want to achieve the same gameplay adding 1 dimension. I think this will require opengl knowledge. I know the basics but i don't ...
6
votes
1answer
543 views

Appropriate level representation / data stucture for a 2D platfrom game?

I'm about to program a copy of Mario in Java. I'm thinking on 2 representations/data structures for the levels but I'm not sure which one should I choose: A 2D integer array. A quadtree to divide ...
4
votes
2answers
4k views

Starting Java 2D Platformer using LWJGL [closed]

Getting started on a 2d platforming project in java. I've decided on using LWJGL and OpenGL, but I don't quite know where to start. What is typically the first thing one would work on with a ...