Java is both a popular programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms.
0
votes
0answers
15 views
Minecraft Modding - Is Pacman still protected by copyright? [on hold]
I'm not sure if I'm using the term 'copyright' correctly, but I was thinking about making a Pacman mod for Minecraft, and I was wondering if I could do it safely. Can I get in trouble for making this ...
0
votes
0answers
6 views
I have been working on my Java game for a while, now I would like to get into networking, what resources are effective for java networking? [on hold]
After working on my game for a few months, I want to now begin to do some networking with it. All my previous games have not included any networking so I feel it is a good time to get started.
I am ...
0
votes
0answers
12 views
Java Slick2D TextArea Enter Key Is Being Ignored
So I am creating a small program, and I need to add a Slick2D TextArea object to the screen. It works fine, but whenever I press the enter key, it does not go to the next line.
Here is the code that ...
0
votes
0answers
15 views
Libgdx Camera Position and Zoom Snaps into position instead of smooth animation
I have tried implementing a smooth Camera zoom method in libgdx, in which the method zoom interpolates between two vlaues of zoom amount i.e initial * final. The problem howevever is that the camera ...
0
votes
0answers
16 views
How to use Android Sensor, only in x axis
I have seen some tutorials but they are very complicated and they are about the three axes (x,y,z). So I want a code that moves an object or more (for example) to the right or the left when the ...
-3
votes
0answers
24 views
Need help with code to move a circle and rectangle from one point to another [on hold]
Can someone please give me simple code such as what is used in java web games. How do to move any object got from somewhere.
Where should I go to find this out? thanks
it doesnt need to be java but ...
0
votes
0answers
18 views
What do I need to know making game server [on hold]
First, sorry about my English.
I got a requiment about create a game server ( multiplayer ) using Java and Websocket. But now, i dont know the start point. Never develop a game server before, all my ...
0
votes
1answer
32 views
java Move vehicle towards the mouse
Hello I have a game like asteroids and I have my ship on the screen and he points towards the mouse. I want to know how to move towards the mouse so if I press w I will drive towards the mouse and if ...
0
votes
0answers
7 views
Find fastest rotation left or right to face an object [duplicate]
im working on a competition where i am creating an AI for a game that the host has published and made for this event, i have two commands for turning my car and that is left and right, spinning on the ...
-1
votes
2answers
49 views
How to make a proper cache on user computer?
Currently when launching the client of the game, it connects to the server and loads all the cachedata in a normal form (= folders, .txt files and .png files). However I don't like that the players ...
0
votes
0answers
31 views
Problem with collision detection , Libgdx
I have a main character called main_sprite and I need to check for collision with another object called enemySprite . In case there is a collision, it should set velocity to 0. Here are my classes :
...
0
votes
0answers
24 views
Developing flash like game in android? [on hold]
I want to know how can i make a flash like game in android.which tools do i need to use for this.I have come across Starling but is there any other tools available for game development in android? I ...
1
vote
1answer
49 views
LibGdx - Move sprite in the direction of other sprite
I'm kind new to LibGdx and I'm still learning. I'm working on a small game project to learn this nice framework. However, I'm having some issues with my game. My game is a top down shooter. There is a ...
0
votes
0answers
16 views
animation with libgdx and tiled
I'm sucking with a problem.
i'm making a 2d game with libgdx and TiledMap, i mad a map with tiled.
I have to move the character from one square(32pixel) to another square,the problem is that i have ...
0
votes
0answers
12 views
Libgdx. Sprite won't stop moving;
I can't stop a sprite from moving.
Here's my code:
boolean moving;
Gdx.input.setInputProcessor(new Input(){
public boolean touchDown(int screenX, int screenY, int pointer, int ...
0
votes
0answers
16 views
Can't get lwjgl natives on ubuntu [on hold]
So I'm trying to convert my windows workspace to my ubuntu setup and encountered some problems. It's asking for absolute path.
Here's what my setup looks like: http://i.imgur.com/6LRz5Q3.png
Keep in ...
1
vote
1answer
32 views
How do I make my main character move towards an object? LibGDX/Java
What I want to happen is for my player to bounce from spring to another. For example take the illustration below:
Here's my code (what I've tried to do so far). This gets called in an ...
1
vote
0answers
22 views
Libgdx simple movement with velocity [on hold]
Ok so this is driving me nuts. I've followed 3 tutorials now and I'm trying to get simple velocity to work and it just doesn't want to work for me. I have an open space and I want the character to be ...
0
votes
0answers
18 views
NullpointerException when calling Handler in other class [closed]
I want to show a game over screen when the player dies.
How I want to do this:
I have a handler in the game class which listens for incoming messages.
When the handler receives the message: 0, it ...
0
votes
1answer
24 views
Exception in thread “main” java.lang.UnsatisfiedLinkError in eclipse +slick2d +lwjgl [closed]
I am using eclipse and latest slick2d + lwjgl. I got this error after trying out hello world code in slick2d wiki. http://slick.ninjacave.com/wiki/index.php?title=Hello_World
Exception in thread ...
1
vote
1answer
36 views
LibGDX Android Application only running once
I'm having trouble trying to figure out why my LibGDX game only runs successfully once on Android.
Assuming the game has not been installed on the device, when I run the application from eclipse the ...
0
votes
0answers
18 views
Images not scaling properly in LibGDX when using “batch.setProjectionMatrix(camera.combined);”
I am trying to put Assets into my game but when i put in the line of code "batch.setProjectionMatrix(camera.combined);", which from my knowledge scales the Asset to the size of the window it appears ...
1
vote
1answer
35 views
LibGDX/Java - Trying to find the vector from one object to another
I want to add springs in my game that work like the ones in sonic - i.e. if you can't get over an obstacle you have to hit a spring which sends the main character flying towards another spring that ...
0
votes
1answer
48 views
How to build an AIManager class
I'm trying to figure out how to write a good AIManager class in Java in order to manage the AI of all the objects in my game.
From another post of mine, an user has suggested to do the following:
...
0
votes
2answers
59 views
LibGDX - Best way of scrolling background
I'm new to LibGDX and i'm trying to implement a screen where i have a guy running and the ground under him scrolling to give impression he is really running in a sidewalk for example.
The ground ...
0
votes
1answer
72 views
How can I store tile maps as PNG images?
I want to let players of my top-down game save, load and share worlds as PNG images. How do I read the colors in a PNG file or change them?
I imagine something like this:
BufferedImage mapImg = ...
1
vote
1answer
60 views
Help with Resolving Pixel Perfect Collision
Hi I'm having trouble resolving "Collision detection between axis-aligned bounding box and bitmap (pixel perfect) terrain on a Worms type game". (Read previous question to find more information about ...
0
votes
2answers
52 views
Delay in bullets
I made my character shoot but the amount of bullets he shoots is way too much. I'm trying to add a delay between bullets. I've tried this:
int shootTime = System.currentTimeMllis();
public void ...
0
votes
0answers
44 views
Using Java as a scripting language for games - Performance and Portability [closed]
I am writing my own 3D game engine in C++ and I am stuck on choosing the right scripting language for defining the game logic. I want to use Java as the scripting language but the performance and ...
0
votes
2answers
34 views
Gradual rotation of an object in Java
I'm using Java to learn some movement algorithm. I would like to implement the "wandering" algorithm, but in order to do it, i should understand how to rotate an Object gradually.
Actually, my Player ...
-1
votes
1answer
48 views
Sprite movement only works the first time, can't figure out why
In my libGDX game I have finally managed to get the sprite to move the way I want him to but for some reason my desired outcome only works the first time I run the code. If I try to run it again, he ...
0
votes
1answer
23 views
Libgdx particle effect to show one after being updated the position [closed]
I have made a game, to draw the effect every circle.
Every time i will update the particle effect position and redraw it.
My function is here:
effect = new ParticleEffect();
...
0
votes
1answer
50 views
How does one write a wrapper for a game server? [closed]
From what I gathered, wrappers mimic the game server in question, receiving packets from client and sending them to the server (and vice versa). It acts like a bridge between the client and server, ...
0
votes
2answers
115 views
Where the physics should be put
I'm studying a book of artificial intelligence applied to games. It shows several algorithms for each argument (movements, path finding.. ecc). Unfortunately (but obviously) it does not explains how ...
1
vote
2answers
149 views
Are shaders the only way to implement 2d lighting?
I'm working on a 2d top down game with libgdx and I think i got the basics. No want I want to implement lighting, I don't know anything about lighting. I want just to have some light sources and ...
0
votes
0answers
28 views
Box2D replace Fixture not working as expected
I am using box2D to develop a simple game, and I am using the Physics body editor by Aurelien Ribon to load the fixtures into bodies.
I have written the following method which should scale my ...
0
votes
0answers
38 views
Pausing an animation in Libgdx [on hold]
How would I pause an Animation from the LibGdx animation class? I've followed tutorials that teach me how to animate a sprite sheet but none to pause it. I'm trying to make an animation play once ...
0
votes
2answers
65 views
Libgdx: different speed on different devices
I am running a simple Libgdx app that I have wrote, on my Android phone and Android tablet and I am getting the unexpected result of having different velocities when a body is moved. To move the body ...
2
votes
4answers
147 views
How can I avoid sending the full game state so often?
I'm making a real-time 2D MMORPG in Java. Currently data all surrounding NPCs' and players' data is sent so frequently that the client crashes—it can't handle the data quickly enough. I'm sending data ...
1
vote
2answers
83 views
Breakout Collision Detection: Ball gets trapped inside block
I'm writing a breakout clone where blocks to hit can be of various sizes and the projectile can move at different speeds, and I seem to be having some trouble getting the collision detection perfectly ...
-1
votes
0answers
31 views
Can't figure out why my sprite isn't moving [on hold]
In my libGDX game I'm trying to make it so that the player character moves left and right depending on which side of the screen you press. However, when I run my code, I keep getting a null pointer ...
0
votes
1answer
59 views
How can I split my entity manager class into a gameworld class and gamerenderer class?
I currently have a libGDX game where I have an entity manager class which is called in the gamescreen. Instead, I would like to utilise it in a gameworld class and a gamerenderer class, but I cannot ...
0
votes
0answers
27 views
save and view snapshot image from android device
I'm having a problem with saving image into an android device this is what i did
My java class :
package com.test.app;
import com.unity3d.player.UnityPlayerActivity;
import android.os.Bundle;
...
0
votes
0answers
30 views
Partitioning a Tiled map
In my 2d platformer with libGdx, my maps are quite large (eg. 200x200). The player character is only 2 tiles high. I use Box2d for collision, so in my tiled map I have layers for terrain, ...
0
votes
1answer
77 views
How to resolse collision between moving and static AABB?
What I have is a map represented as list of Rectangles and player's rectangle. Also I have function to determine depth of the collision:
Point TestAABBAABB(Rectangle a, Rectangle b) {
...
2
votes
1answer
36 views
Collision detection between axis-aligned bounding box and bitmap (pixel perfect) terrain
Working on a Worms-type game, I have my objects in bounding boxes and they sit on the pixel terrain.
Currently I am able to successfully do the collision detection for objects when they enter the ...
1
vote
0answers
73 views
How to make a sword swing effect
I'm working on a 2d java game on Slick engine and I always wondered how to make swing effects when striking with a sword? How to code something like this? ...
0
votes
0answers
34 views
Simulate juggling : how throw and grab objects with JBOX2D
There is an object which simulates a ball and another which simulates a hand (square).I want to be able to catch the ball and throw it with a projection force with the hand on JBOX2D. Any sample code ...
-1
votes
1answer
53 views
How can I implement input handling into my game?
I'm making a libgdx game where the player dodges falling objects. To move the player I have it set so that on desktop he moves left and right when you press A and D respectively. I am trying to ...
0
votes
1answer
48 views
How to get used Resources by State/Map etc?
I'm now managing the Loading of my Resources and I got a Question in my mind.
How does my Resource Manager know which Sprites,Sounds, etc. are used by the Map I want to load?
First I thought of files ...