Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (512)
Games in Android Showcase (121)
games submitted by our members
Games in WIP (577)
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]
1  Java Game APIs & Engines / Java 2D / Re: Fake 3d effect? on: 2013-03-13 20:12:28
*achieve* not archieve. And to answer your question, you just have to research and do it. You will probably fail the first time, it happens to the best of us. Just re-write the game and try to do things different. I don't have any experience with the kind of game you want to program, but I would imagine its either a bunch of 2D sprites that are textured to look 3D, or its actually 3D with 2D sprites. If its 3D, I imagine you would want to lock the rotation of the game so you can't rotate the tiles around the 'y' axis. Then you would want to translate the tiles along a vertical line to achieve the 3D effect. However, you still will use 2D tiles. Unless you go 3D with the tiles, which might be a bit much; you would have to load the tiles as models and I imagine it wouldn't be very efficient.
I may be completely wrong, I've never created a game like that, but that's how I would start!

sorry not english Smiley...thanks for the correction. I appreciate your advice!
I dont like doing things by tentatives...i like studyng the theory first and then applyng to reduce time

so i'm looking for someone that can give me a solid advice or tutorial to start with!
2  Java Game APIs & Engines / Java 2D / Re: Fake 3d effect? on: 2013-03-13 18:14:20
Defining what is a "3D" or "2D" game is a complex issue that has been discussed many times.

What will really help you is to determine what you need each individual component to be.

Do you need 3d graphics?
Do you need 3d gameplay?

You can mix and match both, having a purely 2d gameplay (like super mario) with fully 3d graphics (like in, for example, Super Smash Brothers Brawl).

You could have 3d gameplay with 2d sprites and effects, like in the original GTA games.

Find out what you want to do to determine what you need to do it.


that's it
i want 3d gameplay with 2d sprites and effects....how to archieve it? i'm TOTALLY new to it
3  Java Game APIs & Engines / Java 2D / Re: Fake 3d effect? on: 2013-03-13 15:51:31
nice!
So if i want to make a game with that perspective...i should stick with libgdx and using the orthographic camera?
4  Java Game APIs & Engines / Java 2D / Re: Fake 3d effect? on: 2013-03-13 15:47:04
i have to understand...




A game like command and conquer tiberian sun is 2d or 3d?

5  Java Game APIs & Engines / Java 2D / Re: Fake 3d effect? on: 2013-03-13 15:39:34
thanks for the replies...
I already was looking on LibGDX and it looks also pretty simple to use.
But why do i have to make my own methods? Doesn't libGdx have it? I've seen for example that there is already a orthographic camera coded...



and what about MonkeyEngine? I'm not alone and i could use the help of my brother that is really good on drawing...
6  Java Game APIs & Engines / Java 2D / Re: Fake 3d effect? on: 2013-03-13 15:25:24
so that game shown on the video is 3d?
7  Java Game APIs & Engines / Java 2D / Fake 3d effect? on: 2013-03-13 15:12:39
Hi guys...
After i made a multiplayer 2d shooter watched from above, i want to make another game that is far better than the first.
Essentially i want to make something like shown on the video below:
http://www.youtube.com/watch?v=yT6lGRfXBWQ

how to archieve that fake 3d effect?
And which library is the best to work on a simil-isometric view like that one on the video or like GTA2?
8  Game Development / Networking & Multiplayer / Re: [KRYONET] Problems with chat on: 2013-02-07 08:07:50
Someone can help me? i'm really tired, i'm not able to understand where the problem is...i would like that the client receives packets automatically, instead it seems like that it receives packets only after i write something on...

UPDATE: the problem is the scanner methods that blocks the receiving of packets...i tried a client version without scanner, and one with scanner....the packets arrives good in the one without scanner....how can i solve the problem?
9  Game Development / Networking & Multiplayer / [KRYONET] Problems with chat on: 2013-02-06 16:55:17
Hi there, i'm new to java network programming. I'm starting to use Kryonet to implement in my game a multiplayer mode.

To understand things, i was tryng to make a simple chat but things doesnt work well here is the code:

I made a Client project and a Server project, both have the same setting or rather a Body Class, a NetworkListener Class and a Packet class that is the same for client and server projects.

CBody:
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  
46  
47  
48  
49  
import it.client.Packet.*;
import java.io.IOException;
import java.util.Scanner;

import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryonet.Client;

public class CBody {
   private Client client;
   public static Scanner scanner;
   public static String nickname;
   
   public CBody() throws IOException{
      scanner = new Scanner(System.in);
      client = new Client();
      NetworkListener nl = new NetworkListener();
      client.addListener(nl);
      nl.init(client);
      client.setKeepAliveTCP(1000);
      registerPackets();
      client.start();
      System.out.println("Scegli il nickname: ");
      nickname = new String(CBody.scanner.nextLine());
      System.out.println("Hai scelto il nick: "+nickname+".");
      System.out.println("Enter Ip:\n");
      client.connect(5000,scanner.nextLine(),54555,54777);
     
     
   }
   
   private void registerPackets(){
      Kryo kryo = client.getKryo();
      kryo.register(LoginRequest.class);
      kryo.register(LoginAnswer.class);
      kryo.register(PacketMessage.class);
      kryo.register(MsgBroadcast.class);
   }
   
   public static void main(String args[]){
      try {
         new CBody();
         
      } catch (IOException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }
     
   }
}


Network listener for CLient
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  
46  
47  
48  
49  
50  
import java.io.IOException;

import it.client.Packet.*;
import it.client.CBody;

import com.esotericsoftware.kryonet.Client;
import com.esotericsoftware.kryonet.Connection;
import com.esotericsoftware.kryonet.Listener;
import com.esotericsoftware.kryonet.Server;

public class NetworkListener extends Listener {
   
   private Client client;
   
   public void init(Client client){
      this.client = client;
   }
   
   public void connected(Connection c){
      System.out.println("[CLIENT]You have connected.\n");
      c.sendTCP(new LoginRequest()); // invio al server che un client sta loggando
   }
   
   public void disconnected(Connection c){
      System.out.println("[CLIENT]You have disconnected.\n");
   }
   
   public void received(Connection c,Object o){
      if(o instanceof LoginAnswer){ // sei stato accettato
         System.out.println("Chat inizializzata, inizia a chattare\n");
      }
      if(o instanceof MsgBroadcast){
         System.out.println("pacchetto ricevuto\n");
         String broadcast = new String();
         String writer = new String();
         broadcast = ((MsgBroadcast) o).text;
         writer = ((MsgBroadcast) o).nickname;
         if(CBody.nickname.equals(writer)) System.out.println("Hai scritto: "+broadcast);
         else { System.out.println(writer+" ha scritto :"+broadcast); }
      }
      String text = new String();
      if(CBody.scanner.hasNext()){
            PacketMessage msg = new PacketMessage();
            msg.nickname = CBody.nickname;
            msg.text = CBody.scanner.nextLine();
            c.sendTCP(msg);
       }
     
   }
}


Body for server
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  
import NetServer.Packet.*;

import java.io.IOException;


import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryonet.Server;

public class Body {
   private Server server;
   
   public Body() throws IOException{
      server = new Server();
      NetworkListener nl = new NetworkListener();
      registerPackets();
      server.addListener(nl);
      nl.init(server);
      server.start();
      server.bind(54555,54777);
     
   }
   
   private void registerPackets(){
      Kryo kryo = server.getKryo();
      kryo.register(LoginRequest.class);
      kryo.register(LoginAnswer.class);
      kryo.register(PacketMessage.class);
      kryo.register(MsgBroadcast.class);
   }
   
   public static void main(String args[]){
      try {
         new Body();
      } catch (IOException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }
   }
}


networklistener for server
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  
public class NetworkListener extends Listener {
   private Server server;
   
   public void init(Server server){
      this.server = server;
   }
   
   public void connected(Connection c){
      System.out.println("[SERVER]Someone has connected.\n");
   }
   
   public void disconnected(Connection c){
      System.out.println("[SERVER]Someone has disconnected.\n");
   }
   
   public void received(Connection c,Object o){
      c.setTimeout(0);
      if(o instanceof LoginRequest){ // se qualcuno manda un pacchetto di questo genere
         LoginAnswer loginAnswer = new LoginAnswer();
         loginAnswer.accepted=true;
         c.sendTCP(loginAnswer);
         
      }
      if(o instanceof PacketMessage){
         String text = new String();
         String nickname = new String();
         text = ((PacketMessage) o).text;
         nickname = ((PacketMessage)o).nickname;
         MsgBroadcast broadcast = new MsgBroadcast();
         broadcast.nickname = nickname;
         broadcast.text = text;
         System.out.println(nickname+" ha scritto: "+broadcast.text);
         //c.sendTCP(broadcast);
           server.sendToAllTCP(broadcast);
      }
   }
}


packet class for both
1  
2  
3  
4  
5  
6  
public class Packet {
   public static class LoginRequest { }
   public static class LoginAnswer { boolean accepted = false; }
   public static class PacketMessage {String nickname; String text; }
   public static class MsgBroadcast {String nickname; String text; int a;}
}



Basically the problem is that when a client write doesnt arrive ALWAYS to every client. Sometimes it looks like as it doesnt receive the broadcast message...server works perfectly infact server-side i see every message that clients right...but i want that clients are able to see what is written by the others....help me please
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

theagentd (12 views)
2014-10-25 15:46:29

Longarmx (52 views)
2014-10-17 03:59:02

Norakomi (45 views)
2014-10-16 15:22:06

Norakomi (34 views)
2014-10-16 15:20:20

lcass (39 views)
2014-10-15 16:18:58

TehJavaDev (68 views)
2014-10-14 00:39:48

TehJavaDev (68 views)
2014-10-14 00:35:47

TehJavaDev (60 views)
2014-10-14 00:32:37

BurntPizza (73 views)
2014-10-11 23:24:42

BurntPizza (45 views)
2014-10-11 23:10:45
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!