Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (702)
Games in Android Showcase (203)
games submitted by our members
Games in WIP (775)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2
1  Games Center / WIP games, tools & toy projects / Re: Fusion on: 2016-06-14 04:01:29
Can this thread be moved to the "Showcase" category(or do I have to start a new one there) ?
2  Game Development / Game Mechanics / Re: [LibGDX] Rotate around a shape in a non-circular motion on: 2016-06-14 00:49:30
How can I get the vertice coords?

The black shape is being rendered like this:
1  
2  
3  
4  
5  
6  
        sr.begin(ShapeRenderer.ShapeType.Filled);
        sr.setColor(Color.BLACK);
        sr.circle(this.x, this.y, this.radius, segments);
        sr.setColor(Color.GREEN);
        sr.circle(this.x, this.y, this.radius / 4);
        sr.end();
3  Game Development / Game Mechanics / [SOLVED][LibGDX] Rotate around a shape in a non-circular motion on: 2016-06-14 00:36:56
I am trying to rotate these circles around the black shape. Currently, they are rotating in a circular motion, but I want them to travel from vertex to vertex.



Rotation code:
1  
2  
3  
4  
  //central is the black shape
         angle += delta * rotSpeed * direction;
        x = MathUtils.cos(angle) * central.radius + central.x;
        y = MathUtils.sin(angle) * central.radius + central.y;


Thank you guys very much for helping me!
4  Games Center / WIP games, tools & toy projects / Re: Orbus: A team-based multiplayer. Collect orbs and sabotage the enemy to win! on: 2016-06-11 08:02:45
I love the art style and the gameplay is very similar to agaro. What libraries are you using?
5  Games Center / WIP games, tools & toy projects / Re: Malevolent Primeval LIBGDX PC ANDROID IOS on: 2016-06-10 03:45:44
I like the art style. You should put up a download link so we can play it
6  Games Center / WIP games, tools & toy projects / Re: Fusion on: 2016-06-05 23:50:15
Alright, will do! Thank you  Smiley
7  Games Center / Showcase / Re: Retronix - a Xonix clone in Java (cross-platform, open source) on: 2016-06-05 07:37:43
Very fun and addicting. Nice job! Grin Grin
8  Games Center / WIP games, tools & toy projects / Fusion on: 2016-06-05 04:49:15
Introduction
Hello everyone. I started writing Fusion about a month ago using LibGDX. This app is only available on android at the moment.

Game mechanics and objective
The objective of this game is to tap as many orbiting circles as possible to prevent the central shape from collapsing. For every orbiting circle tapped, the central grows by a random factor and a random amount of new orbiting circles form. The more orbiting circles present, the faster the central collapses. There is also a tutorial mode.


 



Please let me know if you have any suggestions, comments or concerns about this game. Thank you guys very much! Cheesy
All art and sound made by me. Music by: http://ericskiff.com/music/

Download on Google Play!

EDIT: Now on Google Play!
9  Game Development / Networking & Multiplayer / Re: Cannot host a game without port forwarding on: 2015-12-17 02:39:49
How can I setup a relay server?
10  Game Development / Networking & Multiplayer / Re: Cannot host a game without port forwarding on: 2015-12-14 04:58:27
There is also Google Play Services.

Can kryonet be integrated with google play?

If not, I will probably use this API.
11  Game Development / Networking & Multiplayer / Cannot host a game without port forwarding on: 2015-12-14 02:23:25
Kryonet(the library I am using) requires a user to be within the same network or forward their ports to host a game server.
Is there a way so users do not need to port forward while still using kryonet or are there other libraries out there that can fufill this task?

Thank you!
12  Game Development / Networking & Multiplayer / [SOLVED] Server discovery on: 2015-12-11 03:57:19
I am writing a multiplayer android app and I am using Kryonet for networking. Does Kryonet support server discovery outside LAN? If it doesn't, how would a multiplayer game support server discovery?

Thank you!  Grin Grin
13  Game Development / Networking & Multiplayer / [SOLVED]Sending coordinates efficiently over the network on: 2015-10-09 03:35:38
Note: the library I am using is kryonet
I am sending over 4 packets for positioning over the network:
DX(delta X), DY(delta Y) and the X and Y coordinates

My approach is to create a temporary "network" variable to check if  the value of one of those variables has changed.
If it changes, it is sent over the network.

The following code is in my update method:

Update method in the player class:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
if(this.dx != this.netDX)
      {
         PacketUpdateDX packet = new PacketUpdateDX();
         packet.dx = this.dx;

         network.client.sendUDP(packet);

         this.netDX = dx;
      }
     
      if(this.dy != this.netDY)
      {

         PacketUpdateDY packet = new PacketUpdateDY();
         packet.dy = this.dy;

         network.client.sendUDP(packet);

         this.netDY = dy;
     
      }
     
      if(this.x != this.netX)
      {

         PacketUpdateX packet = new PacketUpdateX();
         packet.x = this.x;

         network.client.sendUDP(packet);

         this.netX = x;
     
      }

      if(this.y != this.netY)
      {

         PacketUpdateY packet = new PacketUpdateY();
         packet.y = this.y;

         network.client.sendUDP(packet);

         this.netY = y;
     
      }


Server reception of the packets
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
if(o instanceof PacketUpdateX){
               PacketUpdateX packet = (PacketUpdateX) o;
               players.get(c.getID()).x = packet.x;

               packet.id = c.getID();
               server.sendToAllExceptUDP(c.getID(), packet);

            }else if(o instanceof PacketUpdateY){
               PacketUpdateY packet = (PacketUpdateY) o;
               players.get(c.getID()).y = packet.y;

               packet.id = c.getID();
               server.sendToAllExceptUDP(c.getID(), packet);

            }else if(o instanceof PacketUpdateDX){
               PacketUpdateDX packet = (PacketUpdateDX) o;
               players.get(c.getID()).dx = packet.dx;

               packet.id = c.getID();
               server.sendToAllExceptUDP(c.getID(), packet);

            }else if(o instanceof PacketUpdateDY){
               PacketUpdateDY packet = (PacketUpdateDY) o;
               players.get(c.getID()).dy = packet.dy;

               packet.id = c.getID();
               server.sendToAllExceptUDP(c.getID(), packet);

            }


Client side reception of the packets
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
if(o instanceof PacketUpdateX)
      {
         PacketUpdateX packet = (PacketUpdateX) o;
         SpaceoidsClient.players.get(packet.id).x = packet.x;      
      }else if(o instanceof PacketUpdateY)
      {
         PacketUpdateY packet = (PacketUpdateY) o;
         SpaceoidsClient.players.get(packet.id).y = packet.y;      
      }else if(o instanceof PacketUpdateDX)
      {
         PacketUpdateDX packet = (PacketUpdateDX) o;
         SpaceoidsClient.players.get(packet.id).dx = packet.dx;
      }else if(o instanceof PacketUpdateDY)
      {
         PacketUpdateDY packet = (PacketUpdateDY) o;
         SpaceoidsClient.players.get(packet.id).dy = packet.dy;
      }


EDIT: I solved this problem on my own
14  Game Development / Newbie & Debugging Questions / Re: [Kryonet] Problems with sending ArrayList over network on: 2015-09-09 03:21:10
Thank you! This solved my problem  Grin Grin
15  Game Development / Newbie & Debugging Questions / Re: [Kryonet] Problems with sending ArrayList over network on: 2015-09-09 03:02:32
How would I apply the BulletSerializer class in my code?
16  Game Development / Newbie & Debugging Questions / Re: [Kryonet] Problems with sending ArrayList over network on: 2015-09-08 03:43:48
Server registration of classes:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
server = new Server();
      server.getKryo().register(ArrayList.class);
      server.getKryo().register(Bullet.class);
      server.getKryo().register(PacketAddPlayer.class);  
      server.getKryo().register(PacketAsteroids.class);
      server.getKryo().register(PacketRemovePlayer.class);
      server.getKryo().register(PacketUpdateAcceleration.class);
      server.getKryo().register(PacketUpdateBullet.class);
      server.getKryo().register(PacketUpdateDeath.class);
      server.getKryo().register(PacketUpdateFlames.class);
      server.getKryo().register(PacketUpdateHit.class);
      server.getKryo().register(PacketUpdatePosition.class);
      server.getKryo().register(PacketUpdateRotation.class);
      server.getKryo().register(PacketUpdateStats.class);
      for(int i = 0; i < server.getKryo().getNextRegistrationId(); i++)
      {
         System.out.println("Registering: " + server.getKryo().getRegistration(i).toString());
      }
      server.bind(port, port + 1);
      server.start();
      server.addListener(new SpaceoidsServer());
      System.out.println("The server is ready");


Client registration of classes:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
      this.ip = ip;
      this.port = port;
      client = new Client();
      client.getKryo().register(ArrayList.class);
      client.getKryo().register(Bullet.class);
      client.getKryo().register(PacketAddPlayer.class);  
      client.getKryo().register(PacketAsteroids.class);
      client.getKryo().register(PacketRemovePlayer.class);
      client.getKryo().register(PacketUpdateAcceleration.class);
      client.getKryo().register(PacketUpdateBullet.class);
      client.getKryo().register(PacketUpdateDeath.class);
      client.getKryo().register(PacketUpdateDeath.class);
      client.getKryo().register(PacketUpdateFlames.class);
      client.getKryo().register(PacketUpdateHit.class);
      client.getKryo().register(PacketUpdatePosition.class);
      client.getKryo().register(PacketUpdateRotation.class);
      client.getKryo().register(PacketUpdateStats.class);
      client.addListener(this);

      client.start();
      try {
         client.connect(5000, ip, port, port + 1);
      } catch (IOException e) {
         reason = e.toString();
         e.printStackTrace();
      }
   


Packet for sending the bullets:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
import java.util.ArrayList;

import com.waleed.Spaceoids.entities.Bullet;

public class PacketUpdateBullet{
   
   public int id;
   public final int MAX_BULLETS = 4;
   public ArrayList<Bullet> bullet;

}
17  Game Development / Newbie & Debugging Questions / [SOLVED]Problems with sending ArrayList over network on: 2015-09-08 03:08:22
Hello javagaming community.
I am working on a multiplayer game using kryonet. I am trying to send an arraylist over the network but everytime I send the it, the server crashes and there is no exception thrown.
How can I fix this bug? Huh Huh

Sending the bullets over the network:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
public void update(float delta)
{
//networkBullets and bullets are arraylists
if(networkBullets != bullets)
      {
  //send bullets over to the server
         PacketUpdateBullet packet = new PacketUpdateBullet();
         packet.bullet = bullets;
         network.client.sendUDP(packet);

         networkBullets = bullets;
      }
}


Adding to the bullets arraylist:
1  
2  
3  
4  
5  
6  
7  
8  
public void shoot() {

      if(bullets.size() == MAX_BULLETS) return;
      bullets.add(new Bullet(x, y, radians));
      Jukebox.play("shoot");
      Spaceoids.cam.project(new Vector3(x, y, 0));

   }


Thank you for your support.
EDIT: Thank you chrislo27, VaTTeRGeR,  basil_ for helping me solving this problem
18  Games Center / WIP games, tools & toy projects / Re: GNetLib V0.0.0.3 (A Simple Java Networking Library) on: 2015-04-26 18:25:17
What happened to OP? This project could have went somewhere... Sad Sad
19  Games Center / WIP games, tools & toy projects / Re: GNetLib V0.0.0.2 (A Simple Java Networking Library) on: 2014-10-24 01:25:51
But still, how do I kick a client individually without having to kick all the clients?
20  Games Center / WIP games, tools & toy projects / Re: GNetLib V0.0.0.2 (A Simple Java Networking Library) on: 2014-10-23 00:30:14
Is there a way to kick one specific client from the server(I'm using ClientShutdownPacket by the way)?

My code:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
if(packet.getPacketName().contentEquals("UserPacket"))
            {
               users.add(packet.getEntry("username").toString());
               String test = users.get(0);
               System.out.println(packet.getEntry("IP"));
               
               boolean kick = in.nextLine().contains("kick: ");
                 if(kick)
                 {
                    String[] x = in.nextLine().split(":", -1);
                    System.out.println(x[0]);
                    System.out.println(x[1]);
                   
                     ClientShutdownPacket shutdown = new ClientShutdownPacket(client);
                     client.connected = false;
                     shutdown.addEntry("SHUTDOWN", true);
                     
                     client.sendPacket(shutdown);
                     
                 }
                     return;
            }
21  Games Center / WIP games, tools & toy projects / Re: GNetLib V0.0.0.2 (A Simple Java Networking Library) on: 2014-10-21 02:04:53
Thank you so muchhh  Grin Grin Grin Grin Grin Grin
22  Games Center / WIP games, tools & toy projects / Re: GNetLib V0.0.0.2 (A Simple Java Networking Library) on: 2014-10-20 23:02:30
When will v 0.0.0.3

Also @TehJavaDev:

Add me on skype: waleed.ahmad.ghazal
23  Games Center / WIP games, tools & toy projects / Re: GNetLib V0.0.0.2 (A Simple Java Networking Library) on: 2014-10-20 02:58:10
I am making a GUI and I want to put the logs in a JTextArea, but the only way I can is if I get the log(s) as a string and then append it.
24  Games Center / WIP games, tools & toy projects / Re: GNetLib V0.0.0.2 (A Simple Java Networking Library) on: 2014-10-20 02:35:54
Yes
25  Games Center / WIP games, tools & toy projects / Re: GNetLib V0.0.0.2 (A Simple Java Networking Library) on: 2014-10-20 02:30:13
I have been experimenting with the library, and I'm trying to get the debug log as a string, but I can't seem to do so. How can I do that?
26  Games Center / WIP games, tools & toy projects / Re: GNetLib V0.0.0.2 (A Simple Java Networking Library) on: 2014-10-20 01:43:44
Thanks for clarifying  Grin
27  Games Center / WIP games, tools & toy projects / Re: GNetLib V0.0.0.2 (A Simple Java Networking Library) on: 2014-10-20 01:19:46
What I really mean is the ability to make a client "become" the host, kind of like how online lobbies work.

A game with this feature, for example, would be Counter Strike: Global Offensive

This image can help clarify my idea:

28  Games Center / WIP games, tools & toy projects / Re: GNetLib V0.0.0.2 (A Simple Java Networking Library) on: 2014-10-20 01:03:35
Many multiplayer games have a lobby function to them. Is it possible to make a feature like that so the programmer does not have to write it but rather the library does a lot of it for us?
29  Games Center / WIP games, tools & toy projects / Re: GNetLib V0.0.0.2 (A Simple Java Networking Library) on: 2014-10-16 23:10:40
I love it! It's very user friendly  Smiley Smiley Cool
30  Games Center / WIP games, tools & toy projects / Re: Zombie Nauts [0.4.5] on: 2014-07-25 13:01:25
Really nice game! Keep up the good work
Pages: [1] 2
 
Lunch (57 views)
2016-12-06 16:01:40

ral0r2 (283 views)
2016-11-23 16:08:26

ClaasJG (416 views)
2016-11-10 17:36:32

CoffeeChemist (509 views)
2016-11-05 00:46:53

jay4842 (556 views)
2016-11-01 19:04:52

theagentd (580 views)
2016-10-24 17:51:53

theagentd (562 views)
2016-10-24 17:50:08

theagentd (512 views)
2016-10-24 17:43:15

CommanderKeith (506 views)
2016-10-22 15:22:05

Roquen (466 views)
2016-10-22 01:57:43
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!